A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
xml-config.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009 INRIA
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Mathieu Lacage <mathieu.lacage@cutebugs.net>
7
*/
8
9
#ifndef XML_CONFIG_STORE_H
10
#define XML_CONFIG_STORE_H
11
12
#include "
file-config.h
"
13
14
#include <string>
15
16
// These are in #include <libxml/xmlwriter.h>,
17
// here we just need a forward declaration.
18
typedef
struct
_xmlTextWriter
xmlTextWriter
;
19
typedef
xmlTextWriter
*
xmlTextWriterPtr
;
20
21
namespace
ns3
22
{
23
24
/**
25
* \ingroup configstore
26
* \brief A class to enable saving of configuration store in an XML file
27
*
28
*/
29
class
XmlConfigSave
:
public
FileConfig
30
{
31
public
:
32
XmlConfigSave
();
33
~XmlConfigSave
()
override
;
34
35
void
SetFilename
(std::string filename)
override
;
36
void
Default
()
override
;
37
void
Global
()
override
;
38
void
Attributes
()
override
;
39
40
private
:
41
xmlTextWriterPtr
m_writer
;
///< XML writer
42
};
43
44
/**
45
* \ingroup configstore
46
* \brief A class to enable loading of configuration store from an XML file
47
*/
48
class
XmlConfigLoad
:
public
FileConfig
49
{
50
public
:
51
XmlConfigLoad
();
52
~XmlConfigLoad
()
override
;
53
54
void
SetFilename
(std::string filename)
override
;
55
void
Default
()
override
;
56
void
Global
()
override
;
57
void
Attributes
()
override
;
58
59
private
:
60
std::string
m_filename
;
///< the file name
61
};
62
63
}
// namespace ns3
64
65
#endif
/* XML_CONFIG_STORE_H */
ns3::FileConfig
base class for ConfigStore classes using files
Definition
file-config.h:23
ns3::XmlConfigLoad
A class to enable loading of configuration store from an XML file.
Definition
xml-config.h:49
ns3::XmlConfigLoad::Global
void Global() override
Load or save the global values.
Definition
xml-config.cc:359
ns3::XmlConfigLoad::SetFilename
void SetFilename(std::string filename) override
Set the file name.
Definition
xml-config.cc:313
ns3::XmlConfigLoad::Default
void Default() override
Load or save the default values.
Definition
xml-config.cc:320
ns3::XmlConfigLoad::m_filename
std::string m_filename
the file name
Definition
xml-config.h:60
ns3::XmlConfigLoad::Attributes
void Attributes() override
Load or save the attributes values.
Definition
xml-config.cc:398
ns3::XmlConfigLoad::~XmlConfigLoad
~XmlConfigLoad() override
Definition
xml-config.cc:307
ns3::XmlConfigLoad::XmlConfigLoad
XmlConfigLoad()
Definition
xml-config.cc:302
ns3::XmlConfigSave
A class to enable saving of configuration store in an XML file.
Definition
xml-config.h:30
ns3::XmlConfigSave::Global
void Global() override
Load or save the global values.
Definition
xml-config.cc:270
ns3::XmlConfigSave::Attributes
void Attributes() override
Load or save the attributes values.
Definition
xml-config.cc:187
ns3::XmlConfigSave::~XmlConfigSave
~XmlConfigSave() override
Definition
xml-config.cc:74
ns3::XmlConfigSave::m_writer
xmlTextWriterPtr m_writer
XML writer.
Definition
xml-config.h:41
ns3::XmlConfigSave::SetFilename
void SetFilename(std::string filename) override
Set the file name.
Definition
xml-config.cc:36
ns3::XmlConfigSave::Default
void Default() override
Load or save the default values.
Definition
xml-config.cc:97
ns3::XmlConfigSave::XmlConfigSave
XmlConfigSave()
Definition
xml-config.cc:29
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:18
xmlTextWriterPtr
xmlTextWriter * xmlTextWriterPtr
Definition
xml-config.h:19
src
config-store
model
xml-config.h
Generated on Fri Nov 8 2024 13:58:59 for ns-3 by
1.11.0