A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
xml-config.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 XML_CONFIG_STORE_H
21
#define XML_CONFIG_STORE_H
22
23
#include "
file-config.h
"
24
25
#include <libxml/xmlreader.h>
26
#include <libxml/xmlwriter.h>
27
#include <string>
28
29
namespace
ns3
30
{
31
37
class
XmlConfigSave
:
public
FileConfig
38
{
39
public
:
40
XmlConfigSave
();
41
~XmlConfigSave
()
override
;
42
43
void
SetFilename
(std::string filename)
override
;
44
void
Default
()
override
;
45
void
Global
()
override
;
46
void
Attributes
()
override
;
47
48
private
:
49
xmlTextWriterPtr
m_writer
;
50
};
51
56
class
XmlConfigLoad
:
public
FileConfig
57
{
58
public
:
59
XmlConfigLoad
();
60
~XmlConfigLoad
()
override
;
61
62
void
SetFilename
(std::string filename)
override
;
63
void
Default
()
override
;
64
void
Global
()
override
;
65
void
Attributes
()
override
;
66
67
private
:
68
std::string
m_filename
;
69
};
70
71
}
// namespace ns3
72
73
#endif
/* XML_CONFIG_STORE_H */
ns3::FileConfig
base class for ConfigStore classes using files
Definition:
file-config.h:34
ns3::XmlConfigLoad
A class to enable loading of configuration store from an XML file.
Definition:
xml-config.h:57
ns3::XmlConfigLoad::Global
void Global() override
Load or save the global values.
Definition:
xml-config.cc:361
ns3::XmlConfigLoad::SetFilename
void SetFilename(std::string filename) override
Set the file name.
Definition:
xml-config.cc:315
ns3::XmlConfigLoad::Default
void Default() override
Load or save the default values.
Definition:
xml-config.cc:322
ns3::XmlConfigLoad::m_filename
std::string m_filename
the file name
Definition:
xml-config.h:68
ns3::XmlConfigLoad::Attributes
void Attributes() override
Load or save the attributes values.
Definition:
xml-config.cc:400
ns3::XmlConfigLoad::~XmlConfigLoad
~XmlConfigLoad() override
Definition:
xml-config.cc:309
ns3::XmlConfigLoad::XmlConfigLoad
XmlConfigLoad()
Definition:
xml-config.cc:304
ns3::XmlConfigSave
A class to enable saving of configuration store in an XML file.
Definition:
xml-config.h:38
ns3::XmlConfigSave::Global
void Global() override
Load or save the global values.
Definition:
xml-config.cc:272
ns3::XmlConfigSave::Attributes
void Attributes() override
Load or save the attributes values.
Definition:
xml-config.cc:192
ns3::XmlConfigSave::~XmlConfigSave
~XmlConfigSave() override
Definition:
xml-config.cc:84
ns3::XmlConfigSave::m_writer
xmlTextWriterPtr m_writer
XML writer.
Definition:
xml-config.h:49
ns3::XmlConfigSave::SetFilename
void SetFilename(std::string filename) override
Set the file name.
Definition:
xml-config.cc:46
ns3::XmlConfigSave::Default
void Default() override
Load or save the default values.
Definition:
xml-config.cc:107
ns3::XmlConfigSave::XmlConfigSave
XmlConfigSave()
Definition:
xml-config.cc:39
file-config.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
config-store
model
xml-config.h
Generated on Tue Nov 1 2022 22:59:45 for ns-3 by
1.9.3