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
Ptr< const AttributeChecker > MakeStringChecker(void)
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.
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
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.
A dummy class (does nothing)
Hold variables of type enum.
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.
Ptr< const AttributeChecker > MakeEnumChecker(int v1, std::string n1, int v2, std::string n2, int v3, std::string n3, int v4, std::string n4, int v5, std::string n5, int v6, std::string n6, int v7, std::string n7, int v8, std::string n8, int v9, std::string n9, int v10, std::string n10, int v11, std::string n11, int v12, std::string n12, int v13, std::string n13, int v14, std::string n14, int v15, std::string n15, int v16, std::string n16, int v17, std::string n17, int v18, std::string n18, int v19, std::string n19, int v20, std::string n20, int v21, std::string n21, int v22, std::string n22)
Make an EnumChecker pre-configured with a set of allowed values by name.
void ConfigureAttributes(void)
Configure the attribute values.
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.