A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
config-store
model
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
59
class
ConfigStore
:
public
ObjectBase
60
{
61
public
:
66
enum
Mode
{
67
LOAD
,
68
SAVE
,
69
NONE
70
};
75
enum
FileFormat
{
77
XML
,
78
RAW_TEXT
79
};
80
85
static
TypeId
GetTypeId
(
void
);
86
virtual
TypeId
GetInstanceTypeId
(
void
)
const
;
87
88
ConfigStore
();
89
~ConfigStore
();
90
95
void
SetMode
(
enum
Mode
mode);
100
void
SetFileFormat
(
enum
FileFormat
format);
105
void
SetFilename
(std::string filename);
106
110
void
ConfigureDefaults
(
void
);
114
void
ConfigureAttributes
(
void
);
115
116
private
:
117
enum
Mode
m_mode
;
118
enum
FileFormat
m_fileFormat
;
119
std::string
m_filename
;
120
FileConfig
*
m_file
;
121
};
122
127
std::ostream &
operator <<
(std::ostream & os,
ConfigStore::Mode
& mode);
128
std::ostream &
operator <<
(std::ostream & os,
ConfigStore::FileFormat
& format);
131
}
// namespace ns3
132
133
#endif
/* CONFIG_STORE_H */
ns3::ConfigStore::m_file
FileConfig * m_file
configuration file
Definition:
config-store.h:120
ns3::ConfigStore
Introspection did not find any typical Config paths.
Definition:
config-store.h:59
file-config.h
ns3::ConfigStore::SetFilename
void SetFilename(std::string filename)
Set the filename.
Definition:
config-store.cc:157
ns3::ConfigStore::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
config-store.cc:48
ns3::ConfigStore::RAW_TEXT
Definition:
config-store.h:78
ns3::ConfigStore::Mode
Mode
for ConfigStore operation
Definition:
config-store.h:66
ns3::ObjectBase
Anchor the ns-3 type and attribute system.
Definition:
object-base.h:119
ns3::ConfigStore::NONE
Definition:
config-store.h:69
ns3::ConfigStore::XML
Definition:
config-store.h:77
ns3::ConfigStore::ConfigStore
ConfigStore()
Definition:
config-store.cc:81
ns3::FileConfig
base class for ConfigStore classes using files
Definition:
file-config.h:33
ns3::ConfigStore::m_mode
enum Mode m_mode
store mode
Definition:
config-store.h:117
ns3::ConfigStore::ConfigureDefaults
void ConfigureDefaults(void)
Configure the default values.
Definition:
config-store.cc:171
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition:
angles.cc:42
ns3::ConfigStore::SetFileFormat
void SetFileFormat(enum FileFormat format)
Set the file format.
Definition:
config-store.cc:151
ns3::ConfigStore::SetMode
void SetMode(enum Mode mode)
Set the mode of operation.
Definition:
config-store.cc:145
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::ConfigStore::LOAD
Definition:
config-store.h:67
ns3::ConfigStore::FileFormat
FileFormat
store format
Definition:
config-store.h:76
ns3::ConfigStore::m_fileFormat
enum FileFormat m_fileFormat
store format
Definition:
config-store.h:118
ns3::ConfigStore::ConfigureAttributes
void ConfigureAttributes(void)
Configure the attribute values.
Definition:
config-store.cc:164
ns3::ConfigStore::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition:
config-store.cc:75
ns3::ConfigStore::~ConfigStore
~ConfigStore()
Definition:
config-store.cc:137
ns3::ConfigStore::m_filename
std::string m_filename
store file name
Definition:
config-store.h:119
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
ns3::ConfigStore::SAVE
Definition:
config-store.h:68
Generated on Wed Nov 7 2018 10:01:48 for ns-3 by
1.8.14