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
/* -*- 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 XML_CONFIG_STORE_H
22
#define XML_CONFIG_STORE_H
23
24
#include <string>
25
#include <libxml/xmlwriter.h>
26
#include <libxml/xmlreader.h>
27
#include "
file-config.h
"
28
29
namespace
ns3
{
30
36
class
XmlConfigSave
:
public
FileConfig
37
{
38
public
:
39
XmlConfigSave
();
40
virtual
~XmlConfigSave
();
41
42
virtual
void
SetFilename
(std::string filename);
43
virtual
void
Default
(
void
);
44
virtual
void
Global
(
void
);
45
virtual
void
Attributes
(
void
);
46
private
:
47
xmlTextWriterPtr
m_writer
;
48
};
49
54
class
XmlConfigLoad
:
public
FileConfig
55
{
56
public
:
57
XmlConfigLoad
();
58
virtual
~XmlConfigLoad
();
59
60
virtual
void
SetFilename
(std::string filename);
61
virtual
void
Default
(
void
);
62
virtual
void
Global
(
void
);
63
virtual
void
Attributes
(
void
);
64
private
:
65
std::string
m_filename
;
66
};
67
68
}
// namespace ns3
69
70
#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:55
ns3::XmlConfigLoad::SetFilename
virtual void SetFilename(std::string filename)
Set the file name.
Definition:
xml-config.cc:297
ns3::XmlConfigLoad::Attributes
virtual void Attributes(void)
Load or save the attributes values.
Definition:
xml-config.cc:379
ns3::XmlConfigLoad::Default
virtual void Default(void)
Load or save the default values.
Definition:
xml-config.cc:303
ns3::XmlConfigLoad::~XmlConfigLoad
virtual ~XmlConfigLoad()
Definition:
xml-config.cc:291
ns3::XmlConfigLoad::m_filename
std::string m_filename
the file name
Definition:
xml-config.h:65
ns3::XmlConfigLoad::Global
virtual void Global(void)
Load or save the global values.
Definition:
xml-config.cc:341
ns3::XmlConfigLoad::XmlConfigLoad
XmlConfigLoad()
Definition:
xml-config.cc:287
ns3::XmlConfigSave
A class to enable saving of configuration store in an XML file.
Definition:
xml-config.h:37
ns3::XmlConfigSave::Attributes
virtual void Attributes(void)
Load or save the attributes values.
Definition:
xml-config.cc:180
ns3::XmlConfigSave::~XmlConfigSave
virtual ~XmlConfigSave()
Definition:
xml-config.cc:79
ns3::XmlConfigSave::Global
virtual void Global(void)
Load or save the global values.
Definition:
xml-config.cc:254
ns3::XmlConfigSave::m_writer
xmlTextWriterPtr m_writer
XML writer.
Definition:
xml-config.h:47
ns3::XmlConfigSave::SetFilename
virtual void SetFilename(std::string filename)
Set the file name.
Definition:
xml-config.cc:42
ns3::XmlConfigSave::XmlConfigSave
XmlConfigSave()
Definition:
xml-config.cc:36
ns3::XmlConfigSave::Default
virtual void Default(void)
Load or save the default values.
Definition:
xml-config.cc:101
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 Feb 6 2024 19:21:16 for ns-3 by
1.9.1