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