OpenRTM-aist  2.0.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 #include <string>
26 
27 namespace RTC
28 {
97  {
98  public:
99  // The list of default configuration file path.
107  static const char* const config_file_path[];
108 
109  // Environment value to specify configuration file
119  static const char* config_file_env;
120 
136  ManagerConfig();
137 
159  ManagerConfig(int argc, char** argv);
160 
172  virtual ~ManagerConfig();
173 
209  void init(int argc, char** argv);
210 
228  void configure(coil::Properties& prop);
229 
259  coil::Properties getConfig() const;
260 
261  protected:
291  void parseArgs(int argc, char** argv);
292 
328  bool findConfigFile();
329 
360  static void setSystemInformation(coil::Properties& prop);
361 
383  static bool fileExist(const std::string& filename);
384 
393 
401  std::string m_configFile;
402 
416  bool m_isMaster{false};
417  };
418 } // namespace RTC
419 #endif // RTC_MANAGERCONFIG_H
static const char * config_file_env
The environment variable to distinguish the default configuration file path.
Definition: ManagerConfig.h:119
Manager configuration class.
Definition: ManagerConfig.h:96
RT-Component.
std::string m_configFile
Manager&#39;s configuration file path.
Definition: ManagerConfig.h:401
void configure(coil::Properties &prop)
Specify the configuration information to the Property.
static void setSystemInformation(coil::Properties &prop)
Set system information.
void parseArgs(int argc, char **argv)
Parse the command arguments.
static bool fileExist(const std::string &filename)
Check the file existence.
void init(int argc, char **argv)
Initialization.
virtual ~ManagerConfig()
Destructor.
coil::Properties getConfig() const
Get the configuration.
static const char *const config_file_path[]
The default configuration file path for manager.
Definition: ManagerConfig.h:107
ManagerConfig()
Constructor.
coil::Properties Properties
Definition: RTC.h:72
bool m_isMaster
Manager master flag.
Definition: ManagerConfig.h:416
coil::Properties m_argprop
configuration properties from arguments
Definition: ManagerConfig.h:392
bool findConfigFile()
Find the configuration file.