Mass++ Common Libraries v2.7.5
 All Classes Namespaces Files Functions Variables Enumerations Macros
StatusManager.h
Go to the documentation of this file.
1 
11 #ifndef __KOME_OBJECTS_STATUS_MANAGER_H__
12 #define __KOME_OBJECTS_STATUS_MANAGER_H__
13 
14 #include <string>
15 #include <vector>
16 #include <map>
17 
18 namespace kome {
19  namespace objects {
24  class DATA_OBJECTS_CLASS StatusManager {
25  protected:
30  StatusManager();
31 
36  virtual ~StatusManager();
37 
38  protected:
40  std::map< std::string, std::string > m_statusMap;
41 
43  std::vector< std::string > m_statuses;
44 
45  public:
52  void setValue( const char* name, const char* value );
53 
60  const char* getValue( const char* name );
61 
68  bool hasStatus( const char* name );
69 
75  unsigned int getNumberOfStatuses();
76 
83  const char* getStatusName( const unsigned int index );
84 
91  const char* getStatusValue( const unsigned int index );
92 
99  void setToIniFile( kome::core::IniFile& ini, const char* section );
100 
107  void getFromIniFile( kome::core::IniFile& ini, const char* section );
108 
109  public:
115  static StatusManager& getInstance();
116  };
117  }
118 }
119 
120 #endif // __KOME_OBJECTS_STATUS_MANAGER_H__
std::vector< std::string > m_statuses
Definition: StatusManager.h:43
ini file management class
Definition: IniFile.h:30
status variables management class
Definition: StatusManager.h:24
std::map< std::string, std::string > m_statusMap
Definition: StatusManager.h:40