configuration.h

Go to the documentation of this file.
00001 
00014 #ifndef CONFIGURATION_H
00015 #define CONFIGURATION_H
00016 #include <iostream>
00017 #include <vector>
00018 #include <string>
00019 #include <map>
00020 
00021 using namespace std;
00022 
00023 namespace SMP{
00024 
00025 /*
00026 enum Setting{
00027     Watchdog,
00028     Signalwatchdog,
00029     Realtime
00030 };
00031 */
00032 
00034 class SMPConfiguration{
00035 private:
00036     //vector<string> setting;
00037     //vector<int> setting_value;
00038     map<string, int> settings;
00039      
00040 public:
00041     SMPConfiguration();
00042     ~SMPConfiguration();
00043     inline SMPConfiguration(const SMPConfiguration &c);
00044     inline int get_config(string config);
00045     inline void set_config(string config, int value);
00046 
00047     void print();
00048 };
00049 
00050 SMPConfiguration::SMPConfiguration(const SMPConfiguration &c)
00051 {
00052     settings = c.settings;
00053 
00054 }
00055 
00056 int SMPConfiguration::get_config(string config)
00057 {
00058     return settings[config];
00059 }
00060 
00061 void SMPConfiguration::set_config(string config, int value)
00062 {
00063     settings[config] = value;
00064 }  
00065 
00066 
00067 }
00068 #endif 

Generated on Fri Aug 31 15:41:42 2007 for SCREAMLinuxMiddleware(SLIM) by  doxygen 1.5.1