OpenRTM-aist  1.2.1
ManagerConfig.h
Go to the documentation of this file.
1 // -*- C++ -*-
20 #ifndef RTC_MANAGERCONFIG_H
21 #define RTC_MANAGERCONFIG_H
22 
23 #include <coil/Properties.h>
24 
25 
26 namespace RTC
27 {
96  {
97  public:
98  // The list of default configuration file path.
106  static const char* config_file_path[];
107 
108  // Environment value to specify configuration file
118  static const char* config_file_env;
119 
135  ManagerConfig();
136 
158  ManagerConfig(int argc, char** argv);
159 
171  virtual ~ManagerConfig(void);
172 
208  void init(int argc, char** argv);
209 
227  void configure(coil::Properties& prop);
228 
258  coil::Properties getConfig() const;
259 
260  protected:
290  void parseArgs(int argc, char** argv);
291 
327  bool findConfigFile();
328 
360 
382  bool fileExist(const std::string& filename);
383 
392 
400  std::string m_configFile;
401 
416  };
417 }; // namespace RTC
418 #endif // RTC_MANAGERCONFIG_H
static const char * config_file_env
The environment variable to distinguish the default configuration file path.
Definition: ManagerConfig.h:118
Manager configuration class.
Definition: ManagerConfig.h:95
RT-Component.
std::string m_configFile
Manager&#39;s configuration file path.
Definition: ManagerConfig.h:400
static const char * config_file_path[]
The default configuration file path for manager.
Definition: ManagerConfig.h:106
bool fileExist(const std::string &filename)
Check the file existence.
coil::Properties getConfig() const
Get the configuration.
void configure(coil::Properties &prop)
Specify the configuration information to the Property.
void parseArgs(int argc, char **argv)
Parse the command arguments.
void init(int argc, char **argv)
Initialization.
Class represents a set of properties.
Definition: Properties.h:101
Property list class (derived from Java Properties)
ManagerConfig()
Constructor.
bool m_isMaster
Manager master flag.
Definition: ManagerConfig.h:415
coil::Properties m_argprop
configuration properties from arguments
Definition: ManagerConfig.h:391
bool findConfigFile()
Find the configuration file.
virtual ~ManagerConfig(void)
Destructor.
void setSystemInformation(coil::Properties &prop)
Set system information.