A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
config-store.h
1 #ifndef CONFIG_STORE_H
2 #define CONFIG_STORE_H
3 
4 #include "ns3/object-base.h"
5 #include "file-config.h"
6 
7 namespace ns3 {
8 
34 class ConfigStore : public ObjectBase
35 {
36 public:
37  enum Mode {
38  LOAD,
39  SAVE,
40  NONE
41  };
42  enum FileFormat {
43  XML,
44  RAW_TEXT
45  };
46  static TypeId GetTypeId (void);
47  virtual TypeId GetInstanceTypeId (void) const;
48 
49  ConfigStore ();
50  ~ConfigStore ();
51 
52  void SetMode (enum Mode mode);
53  void SetFileFormat (enum FileFormat format);
54  void SetFilename (std::string filename);
55 
56  void ConfigureDefaults (void);
57  void ConfigureAttributes (void);
58 
59 private:
60  enum Mode m_mode;
61  enum FileFormat m_fileFormat;
62  std::string m_filename;
63  FileConfig *m_file;
64 };
65 
66 } // namespace ns3
67 
68 #endif /* CONFIG_STORE_H */
virtual TypeId GetInstanceTypeId(void) const
Definition: config-store.cc:55
implement the ns-3 type and attribute system
Definition: object-base.h:55
a unique identifier for an interface.
Definition: type-id.h:44