#ifndef INPUTPROCESSOR_H #define INPUTPROCESSOR_H #include #include #include class InputProcessor { public: /** * @brief Constructs a new InputProcessor, initializing internal fields to * defaults * */ InputProcessor(); /** * @brief Prompts the user for the file to open, and opens it as an ifstream * * @return true The stream was opened successfully * @return false The stream was unable to be opened successfully */ bool openStream(); /** * @brief Closes the open file stream * */ void closeStream(); /** * @brief Reads all words from the currently open stream, and stores them * internally in a vector of all words * */ void read(); /** * @brief Returns all the words parsed by this InputProcessor * * @return std::vector The vector containing all words */ std::vector getAllWords() const; private: /** * @brief The raw file input stream to read from * */ std::ifstream _fileIn; /** * @brief The vector containing all parsed words from the input stream * */ std::vector _allWords; }; #endif // INPUTPROCESSOR_H