|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
23 #include "ns3/abort.h"
24 #include "ns3/string.h"
26 #include "ns3/simulator.h"
27 #include "ns3/attribute-construction-list.h"
29 #include "ns3/boolean.h"
30 #include "ns3/config-store-config.h"
53 .SetGroupName (
"ConfigStore")
54 .AddAttribute (
"Mode",
61 .AddAttribute (
"Filename",
62 "The file where the configuration should be saved to or loaded from.",
66 .AddAttribute (
"FileFormat",
67 "Type of file format",
72 .AddAttribute (
"SaveDeprecated",
73 "Save DEPRECATED attributes",
113 NS_ABORT_MSG (
"ConfigStore tried to read or write an XML file but XML is not supported.");
200 default: os <<
"UNKNOWN";
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
std::string m_filename
store file name
AttributeValue implementation for Boolean.
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetSaveDeprecated(bool saveDeprecated)
Set if to save deprecated attributes.
Ptr< const AttributeChecker > MakeEnumChecker(int v, std::string n, Ts... args)
Make an EnumChecker pre-configured with a set of allowed values by name.
enum Mode m_mode
store mode
virtual void SetFilename(std::string filename)=0
Set the file name.
enum FileFormat m_fileFormat
store format
void SetMode(enum Mode mode)
Set the mode of operation.
A class to enable saving of configuration store in a raw text file.
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
void ConstructSelf(const AttributeConstructionList &attributes)
Complete construction of ObjectBase; invoked by derived classes.
Mode
for ConfigStore operation
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Hold variables of type enum.
FileConfig * m_file
configuration file
A class to enable loading of configuration store from a raw text file.
virtual void Global(void)=0
Load or save the global values.
bool m_saveDeprecated
save deprecated attributes
Ptr< const AttributeChecker > MakeBooleanChecker(void)
void ConfigureDefaults(void)
Configure the default values.
virtual void Default(void)=0
Load or save the default values.
Hold variables of type string.
A class to enable saving of configuration store in an XML file.
void SetFilename(std::string filename)
Set the filename.
A dummy class (does nothing)
void SetFileFormat(enum FileFormat format)
Set the file format.
virtual void Attributes(void)=0
Load or save the attributes values.
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
static TypeId GetTypeId(void)
Get the type ID.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Ptr< const AttributeChecker > MakeStringChecker(void)
void SetSaveDeprecated(bool saveDeprecated)
Set if to save deprecated attributes.
void ConfigureAttributes(void)
Configure the attribute values.
std::ostream & operator<<(std::ostream &os, const Angles &a)
A class to enable loading of configuration store from an XML file.
List of Attribute name, value and checker triples used to construct Objects.
Anchor the ns-3 type and attribute system.
Ptr< const AttributeAccessor > MakeStringAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.