LRT14  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
ConfigPortMappings.h
1 #ifndef CONFIG_PORT_MAPPINGS_H_
2 #define CONFIG_PORT_MAPPINGS_H_
3 
4 #include <string>
5 #include <sys/types.h>
6 #include <sys/stat.h>
7 #include <unistd.h>
8 #include <ctype.h>
9 #include <WPILib.h>
10 #include <vector>
11 #include <sys/stat.h>
12 #include <sys/types.h>
13 
18 {
19 public:
20  static ConfigPortMappings* Instance();
21  static void Finalize();
22 
24 
25  void Load();
26 
30  static uint32_t Get(std::string name);
31 
32 private:
34  static ConfigPortMappings* m_instance;
35 
39  void LoadConfig(std::string path);
40 
41  std::list<std::string>* fileData;
42  std::map<std::string, map<std::string, uint32_t> >* portData;
43 
44  bool KeyExists(std::string section, std::string key);
45 
46  const static std::string ConfigPortMappings::CONFIG_FILE_PATH;
47  const static std::string ConfigPortMappings::COMMENT_DELIMITERS;
48 
49  DISALLOW_COPY_AND_ASSIGN(ConfigPortMappings);
50 };
51 
52 #endif