A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
config-store.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2009 INRIA
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Mathieu Lacage <mathieu.lacage@cutebugs.net>
18 */
19
20#ifndef CONFIG_STORE_H
21#define CONFIG_STORE_H
22
23#include "file-config.h"
24
25#include "ns3/object-base.h"
26
27namespace ns3
28{
29
60class ConfigStore : public ObjectBase
61{
62 public:
67 enum Mode
68 {
71 NONE
72 };
73
80 {
83 };
84
89 static TypeId GetTypeId();
90 TypeId GetInstanceTypeId() const override;
91
93 ~ConfigStore() override;
94
99 void SetMode(Mode mode);
104 void SetFileFormat(FileFormat format);
109 void SetFilename(std::string filename);
114 void SetSaveDeprecated(bool saveDeprecated);
115
119 void ConfigureDefaults();
123 void ConfigureAttributes();
124
125 private:
129 std::string m_filename;
131};
132
140std::ostream& operator<<(std::ostream& os, ConfigStore::Mode& mode);
148std::ostream& operator<<(std::ostream& os, ConfigStore::FileFormat& format);
149
150} // namespace ns3
151
152#endif /* CONFIG_STORE_H */
Introspection did not find any typical Config paths.
Definition: config-store.h:61
std::string m_filename
store file name
Definition: config-store.h:129
void SetFilename(std::string filename)
Set the filename.
FileFormat m_fileFormat
store format
Definition: config-store.h:127
FileConfig * m_file
configuration file
Definition: config-store.h:130
static TypeId GetTypeId()
Get the type ID.
Definition: config-store.cc:50
Mode
for ConfigStore operation
Definition: config-store.h:68
void ConfigureDefaults()
Configure the default values.
void SetFileFormat(FileFormat format)
Set the file format.
~ConfigStore() override
void SetSaveDeprecated(bool saveDeprecated)
Set if to save deprecated attributes.
FileFormat
store format
Definition: config-store.h:80
void SetMode(Mode mode)
Set the mode of operation.
bool m_saveDeprecated
save deprecated attributes
Definition: config-store.h:128
void ConfigureAttributes()
Configure the attribute values.
Mode m_mode
store mode
Definition: config-store.h:126
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition: config-store.cc:86
base class for ConfigStore classes using files
Definition: file-config.h:34
Anchor the ns-3 type and attribute system.
Definition: object-base.h:173
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition: angles.cc:129