/* */ #ifndef _D_OPTION_PARSER_H_ #define _D_OPTION_PARSER_H_ #include "common.h" #include "SharedHandle.h" #include #include #include namespace aria2 { class Option; class OptionHandler; class OptionParser { private: std::deque > _optionHandlers; SharedHandle getOptionHandlerByName(const std::string& optName); public: ~OptionParser() {} void parse(Option* option, std::istream& ios); void parseDefaultValues(Option* option) const; void setOptionHandlers (const std::deque >& optionHandlers); void addOptionHandler(const SharedHandle& optionHandler); std::deque > findByTag(const std::string& tag) const; std::deque > findByNameSubstring(const std::string& substring) const; std::deque > findAll() const; SharedHandle findByName(const std::string& name) const; const std::deque >& getOptionHandlers() const; }; typedef SharedHandle OptionParserHandle; } // namespace aria2 #endif // _D_OPTION_PARSER_H_