25#include "ns3/attribute-construction-list.h"
26#include "ns3/boolean.h"
27#include "ns3/config-store-config.h"
30#include "ns3/simulator.h"
31#include "ns3/string.h"
55 .SetGroupName(
"ConfigStore")
66 .AddAttribute(
"Filename",
67 "The file where the configuration should be saved to or loaded from.",
73 "Type of file format",
77 .AddAttribute(
"SaveDeprecated",
78 "Save DEPRECATED attributes",
118 "ConfigStore tried to read or write an XML file but XML is not supported.");
List of Attribute name, value and checker triples used to construct Objects.
AttributeValue implementation for Boolean.
std::string m_filename
store file name
void SetFilename(std::string filename)
Set the filename.
FileFormat m_fileFormat
store format
FileConfig * m_file
configuration file
static TypeId GetTypeId()
Get the type ID.
Mode
for ConfigStore operation
void ConfigureDefaults()
Configure the default values.
void SetFileFormat(FileFormat format)
Set the file format.
void SetSaveDeprecated(bool saveDeprecated)
Set if to save deprecated attributes.
void SetMode(Mode mode)
Set the mode of operation.
bool m_saveDeprecated
save deprecated attributes
void ConfigureAttributes()
Configure the attribute values.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Hold variables of type enum.
virtual void Attributes()=0
Load or save the attributes values.
void SetSaveDeprecated(bool saveDeprecated)
Set if to save deprecated attributes.
virtual void SetFilename(std::string filename)=0
Set the file name.
virtual void Default()=0
Load or save the default values.
virtual void Global()=0
Load or save the global 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 AttributeAccessor > MakeBooleanAccessor(T1 a1)
Ptr< const AttributeChecker > MakeBooleanChecker()
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
Ptr< const AttributeChecker > MakeStringChecker()
Ptr< const AttributeAccessor > MakeStringAccessor(T1 a1)
#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.
std::ostream & operator<<(std::ostream &os, const Angles &a)
Ptr< const AttributeChecker > MakeEnumChecker(int v, std::string n, Ts... args)
Make an EnumChecker pre-configured with a set of allowed values by name.