A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
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
27
namespace
ns3
28
{
29
60
class
ConfigStore
:
public
ObjectBase
61
{
62
public
:
67
enum
Mode
68
{
69
LOAD
,
70
SAVE
,
71
NONE
72
};
73
79
enum
FileFormat
80
{
81
XML
,
82
RAW_TEXT
83
};
84
89
static
TypeId
GetTypeId
();
90
TypeId
GetInstanceTypeId
()
const override
;
91
92
ConfigStore
();
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
:
126
Mode
m_mode
;
127
FileFormat
m_fileFormat
;
128
bool
m_saveDeprecated
;
129
std::string
m_filename
;
130
FileConfig
*
m_file
;
131
};
132
140
std::ostream&
operator<<
(std::ostream& os,
ConfigStore::Mode
& mode);
148
std::ostream&
operator<<
(std::ostream& os,
ConfigStore::FileFormat
& format);
149
150
}
// namespace ns3
151
152
#endif
/* CONFIG_STORE_H */
ns3::ConfigStore
Definition:
config-store.h:61
ns3::ConfigStore::m_filename
std::string m_filename
store file name
Definition:
config-store.h:129
ns3::ConfigStore::SetFilename
void SetFilename(std::string filename)
Set the filename.
Definition:
config-store.cc:171
ns3::ConfigStore::m_fileFormat
FileFormat m_fileFormat
store format
Definition:
config-store.h:127
ns3::ConfigStore::m_file
FileConfig * m_file
configuration file
Definition:
config-store.h:130
ns3::ConfigStore::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
config-store.cc:50
ns3::ConfigStore::Mode
Mode
for ConfigStore operation
Definition:
config-store.h:68
ns3::ConfigStore::NONE
@ NONE
Definition:
config-store.h:71
ns3::ConfigStore::LOAD
@ LOAD
Definition:
config-store.h:69
ns3::ConfigStore::SAVE
@ SAVE
Definition:
config-store.h:70
ns3::ConfigStore::ConfigureDefaults
void ConfigureDefaults()
Configure the default values.
Definition:
config-store.cc:192
ns3::ConfigStore::SetFileFormat
void SetFileFormat(FileFormat format)
Set the file format.
Definition:
config-store.cc:164
ns3::ConfigStore::~ConfigStore
~ConfigStore() override
Definition:
config-store.cc:149
ns3::ConfigStore::SetSaveDeprecated
void SetSaveDeprecated(bool saveDeprecated)
Set if to save deprecated attributes.
Definition:
config-store.cc:178
ns3::ConfigStore::ConfigStore
ConfigStore()
Definition:
config-store.cc:91
ns3::ConfigStore::FileFormat
FileFormat
store format
Definition:
config-store.h:80
ns3::ConfigStore::RAW_TEXT
@ RAW_TEXT
Definition:
config-store.h:82
ns3::ConfigStore::XML
@ XML
Definition:
config-store.h:81
ns3::ConfigStore::SetMode
void SetMode(Mode mode)
Set the mode of operation.
Definition:
config-store.cc:157
ns3::ConfigStore::m_saveDeprecated
bool m_saveDeprecated
save deprecated attributes
Definition:
config-store.h:128
ns3::ConfigStore::ConfigureAttributes
void ConfigureAttributes()
Configure the attribute values.
Definition:
config-store.cc:185
ns3::ConfigStore::m_mode
Mode m_mode
store mode
Definition:
config-store.h:126
ns3::ConfigStore::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition:
config-store.cc:86
ns3::FileConfig
base class for ConfigStore classes using files
Definition:
file-config.h:34
ns3::ObjectBase
Anchor the ns-3 type and attribute system.
Definition:
object-base.h:173
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
file-config.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition:
angles.cc:159
src
config-store
model
config-store.h
Generated on Sun Mar 3 2024 17:10:55 for ns-3 by
1.9.1