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";
List of Attribute name, value and checker triples used to construct Objects.
AttributeValue implementation for Boolean.
void ConfigureDefaults(void)
Configure the default values.
std::string m_filename
store file name
void SetFilename(std::string filename)
Set the filename.
enum Mode m_mode
store mode
static TypeId GetTypeId(void)
Get the type ID.
FileConfig * m_file
configuration file
Mode
for ConfigStore operation
void ConfigureAttributes(void)
Configure the attribute values.
enum FileFormat m_fileFormat
store format
void SetSaveDeprecated(bool saveDeprecated)
Set if to save deprecated attributes.
void SetFileFormat(enum FileFormat format)
Set the file format.
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
bool m_saveDeprecated
save deprecated attributes
void SetMode(enum Mode mode)
Set the mode of operation.
Hold variables of type enum.
void SetSaveDeprecated(bool saveDeprecated)
Set if to save deprecated attributes.
virtual void Attributes(void)=0
Load or save the attributes values.
virtual void SetFilename(std::string filename)=0
Set the file name.
virtual void Global(void)=0
Load or save the global values.
virtual void Default(void)=0
Load or save the default values.
A dummy class (does nothing)
Anchor the ns-3 type and attribute system.
void ConstructSelf(const AttributeConstructionList &attributes)
Complete construction of ObjectBase; invoked by derived classes.
A class to enable loading of configuration store from a raw text file.
A class to enable saving of configuration store in a raw text file.
Hold variables of type string.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
A class to enable loading of configuration store from an XML file.
A class to enable saving of configuration store in an XML file.
Ptr< const AttributeChecker > MakeBooleanChecker(void)
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< const AttributeAccessor > MakeStringAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< const AttributeChecker > MakeStringChecker(void)
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeChecker > MakeEnumChecker(int v, std::string n, Ts... args)
Make an EnumChecker pre-configured with a set of allowed values by name.
std::ostream & operator<<(std::ostream &os, const Angles &a)