A Discrete-Event Network Simulator
API
config-store.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2009 INRIA
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Mathieu Lacage <mathieu.lacage@cutebugs.net>
19  */
20 
21 #ifndef CONFIG_STORE_H
22 #define CONFIG_STORE_H
23 
24 #include "ns3/object-base.h"
25 #include "file-config.h"
26 
27 namespace ns3 {
28 
54 class ConfigStore : public ObjectBase
55 {
56 public:
57  enum Mode {
61  };
62  enum FileFormat {
63  XML,
65  };
66  static TypeId GetTypeId (void);
67  virtual TypeId GetInstanceTypeId (void) const;
68 
69  ConfigStore ();
70  ~ConfigStore ();
71 
72  void SetMode (enum Mode mode);
73  void SetFileFormat (enum FileFormat format);
74  void SetFilename (std::string filename);
75 
76  void ConfigureDefaults (void);
77  void ConfigureAttributes (void);
78 
79 private:
80  enum Mode m_mode;
82  std::string m_filename;
84 };
85 
90 std::ostream & operator << (std::ostream & os, ConfigStore::Mode & mode);
91 std::ostream & operator << (std::ostream & os, ConfigStore::FileFormat & format);
94 } // namespace ns3
95 
96 #endif /* CONFIG_STORE_H */
FileConfig * m_file
Definition: config-store.h:83
Introspection did not find any typical Config paths.
Definition: config-store.h:54
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: config-store.cc:75
void SetFilename(std::string filename)
static TypeId GetTypeId(void)
Definition: config-store.cc:48
Anchor the ns-3 type and attribute system.
Definition: object-base.h:68
enum Mode m_mode
Definition: config-store.h:80
void ConfigureDefaults(void)
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition: angles.cc:42
void SetFileFormat(enum FileFormat format)
void SetMode(enum Mode mode)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
enum FileFormat m_fileFormat
Definition: config-store.h:81
void ConfigureAttributes(void)
std::string m_filename
Definition: config-store.h:82
a unique identifier for an interface.
Definition: type-id.h:58