File: commandline_configuration.h

package info (click to toggle)
epiphany 0.7.0+0-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 7,532 kB
  • sloc: cpp: 6,404; ansic: 141; makefile: 78; sh: 7
file content (46 lines) | stat: -rw-r--r-- 1,468 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef COMMANDLINE_CONFIGURATION_H_
#define COMMANDLINE_CONFIGURATION_H_

#include "dephine.h"
#include "abstract_configuration.h"
#include <map>
#include <string>
#include <vector>


class CommandlineConfiguration : public AbstractConfiguration
{
	private:
		std::map< std::string, std::string> m_arguments;
		
		void parse_arguments(const std::vector<std::string>& arguments);
		
	public:
	
		CommandlineConfiguration(Sint32 argc, char* argv[]);
		
		bool get_string(const std::string& section_name, const std::string& object_name, std::string& value) const;
		
		bool get_int(const std::string& section_name, const std::string& object_name, Uint32& value) const;
	
		bool get_bool(const std::string& section_name, const std::string& object_name, bool& value) const;
	
	//	bool get_double(const std::string& object_name, double& value) const;
	
		void save(){};
		
		void remove_object(const std::string& section_name, const std::string& object_name){};
		
		void remove_section(const std::string& section_name){};
	
		void set_string(const std::string& section_name, const std::string& object_name, const std::string& value){};
	
		void set_int(const std::string& section_name, const std::string& object_name, const Uint32& value){};
	
		void set_bool(const std::string& section_name, const std::string& object_name, const bool& value){};
	
	//	void set_double(const std::string& object_name, const double& value){};
		
};

#endif /*COMMANDLINE_CONFIGURATION_H_*/