A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
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 <string>
26
27
// These are in #include <libxml/xmlwriter.h>,
28
// here we just need a forward declaration.
29
typedef
struct
_xmlTextWriter
xmlTextWriter
;
30
typedef
xmlTextWriter
*
xmlTextWriterPtr
;
31
32
namespace
ns3
33
{
34
40
class
XmlConfigSave
:
public
FileConfig
41
{
42
public
:
43
XmlConfigSave
();
44
~XmlConfigSave
()
override
;
45
46
void
SetFilename
(std::string filename)
override
;
47
void
Default
()
override
;
48
void
Global
()
override
;
49
void
Attributes
()
override
;
50
51
private
:
52
xmlTextWriterPtr
m_writer
;
53
};
54
59
class
XmlConfigLoad
:
public
FileConfig
60
{
61
public
:
62
XmlConfigLoad
();
63
~XmlConfigLoad
()
override
;
64
65
void
SetFilename
(std::string filename)
override
;
66
void
Default
()
override
;
67
void
Global
()
override
;
68
void
Attributes
()
override
;
69
70
private
:
71
std::string
m_filename
;
72
};
73
74
}
// namespace ns3
75
76
#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:60
ns3::XmlConfigLoad::Global
void Global() override
Load or save the global values.
Definition:
xml-config.cc:360
ns3::XmlConfigLoad::SetFilename
void SetFilename(std::string filename) override
Set the file name.
Definition:
xml-config.cc:314
ns3::XmlConfigLoad::Default
void Default() override
Load or save the default values.
Definition:
xml-config.cc:321
ns3::XmlConfigLoad::m_filename
std::string m_filename
the file name
Definition:
xml-config.h:71
ns3::XmlConfigLoad::Attributes
void Attributes() override
Load or save the attributes values.
Definition:
xml-config.cc:399
ns3::XmlConfigLoad::~XmlConfigLoad
~XmlConfigLoad() override
Definition:
xml-config.cc:308
ns3::XmlConfigLoad::XmlConfigLoad
XmlConfigLoad()
Definition:
xml-config.cc:303
ns3::XmlConfigSave
A class to enable saving of configuration store in an XML file.
Definition:
xml-config.h:41
ns3::XmlConfigSave::Global
void Global() override
Load or save the global values.
Definition:
xml-config.cc:271
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:85
ns3::XmlConfigSave::m_writer
xmlTextWriterPtr m_writer
XML writer.
Definition:
xml-config.h:52
ns3::XmlConfigSave::SetFilename
void SetFilename(std::string filename) override
Set the file name.
Definition:
xml-config.cc:47
ns3::XmlConfigSave::Default
void Default() override
Load or save the default values.
Definition:
xml-config.cc:108
ns3::XmlConfigSave::XmlConfigSave
XmlConfigSave()
Definition:
xml-config.cc:40
file-config.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
xmlTextWriter
struct _xmlTextWriter xmlTextWriter
Definition:
xml-config.h:29
xmlTextWriterPtr
xmlTextWriter * xmlTextWriterPtr
Definition:
xml-config.h:30
src
config-store
model
xml-config.h
Generated on Sun Mar 3 2024 17:10:55 for ns-3 by
1.9.1