14#include "ns3/attribute-construction-list.h"
15#include "ns3/boolean.h"
16#include "ns3/config-store-config.h"
19#include "ns3/simulator.h"
20#include "ns3/string.h"
44 .SetGroupName(
"ConfigStore")
55 .AddAttribute(
"Filename",
56 "The file where the configuration should be saved to or loaded from.",
62 "Type of file format",
68 "Save DEPRECATED attributes",
73 "OBSOLETE since ns-3.43 as it is no longer needed; deprecated attributes are saved "
74 "only if their value differs from their respective original initial value");
111 "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.
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.
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.
@ OBSOLETE
Attribute or trace source is not used anymore; simulation fails.
A class to enable loading of configuration store from an XML file.
A class to enable saving of configuration store in an XML file.
#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 > MakeBooleanChecker()
std::ostream & operator<<(std::ostream &os, const Angles &a)
Ptr< const AttributeChecker > MakeEnumChecker(T v, std::string n, Ts... args)
Make an EnumChecker pre-configured with a set of allowed values by name.
Ptr< const AttributeChecker > MakeStringChecker()
Ptr< const AttributeAccessor > MakeStringAccessor(T1 a1)
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)