1 #ifndef COMMANDLINE_CONFIGURATION_H_ 2 #define COMMANDLINE_CONFIGURATION_H_ 3 4 #include "dephine.h" 5 #include "abstract_configuration.h" 6 #include <map> 7 #include <string> 8 #include <vector> 9 10 11 class CommandlineConfiguration : public AbstractConfiguration 12 { 13 private: 14 std::map< std::string, std::string> m_arguments; 15 16 void parse_arguments(const std::vector<std::string>& arguments); 17 18 public: 19 20 CommandlineConfiguration(Sint32 argc, char* argv[]); 21 22 bool get_string(const std::string& section_name, const std::string& object_name, std::string& value) const; 23 24 bool get_int(const std::string& section_name, const std::string& object_name, Uint32& value) const; 25 26 bool get_bool(const std::string& section_name, const std::string& object_name, bool& value) const; 27 28 // bool get_double(const std::string& object_name, double& value) const; 29 save()30 void save(){}; 31 remove_object(const std::string & section_name,const std::string & object_name)32 void remove_object(const std::string& section_name, const std::string& object_name){}; 33 remove_section(const std::string & section_name)34 void remove_section(const std::string& section_name){}; 35 set_string(const std::string & section_name,const std::string & object_name,const std::string & value)36 void set_string(const std::string& section_name, const std::string& object_name, const std::string& value){}; 37 set_int(const std::string & section_name,const std::string & object_name,const Uint32 & value)38 void set_int(const std::string& section_name, const std::string& object_name, const Uint32& value){}; 39 set_bool(const std::string & section_name,const std::string & object_name,const bool & value)40 void set_bool(const std::string& section_name, const std::string& object_name, const bool& value){}; 41 42 // void set_double(const std::string& object_name, const double& value){}; 43 44 }; 45 46 #endif /*COMMANDLINE_CONFIGURATION_H_*/ 47