A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::RawTextConfigSave Class Reference

A class to enable saving of configuration store in a raw text file. More...

#include "raw-text-config.h"

+ Inheritance diagram for ns3::RawTextConfigSave:
+ Collaboration diagram for ns3::RawTextConfigSave:

Public Member Functions

 RawTextConfigSave ()
 default constructor
 
 ~RawTextConfigSave () override
 destructor
 
void Attributes () override
 Load or save the attributes values.
 
void Default () override
 Load or save the default values.
 
void Global () override
 Load or save the global values.
 
void SetFilename (std::string filename) override
 Set the file name.
 
- Public Member Functions inherited from ns3::FileConfig
virtual ~FileConfig ()
 
virtual void Attributes ()=0
 Load or save the attributes values.
 
virtual void Default ()=0
 Load or save the default values.
 
virtual void Global ()=0
 Load or save the global values.
 
virtual void SetFilename (std::string filename)=0
 Set the file name.
 
void SetSaveDeprecated (bool saveDeprecated)
 Set if to save deprecated attributes.
 

Private Attributes

std::ofstream * m_os
 Config store output stream.
 

Additional Inherited Members

- Protected Attributes inherited from ns3::FileConfig
bool m_saveDeprecated
 save deprecated attributes
 

Detailed Description

A class to enable saving of configuration store in a raw text file.

Definition at line 36 of file raw-text-config.h.

Constructor & Destructor Documentation

◆ RawTextConfigSave()

ns3::RawTextConfigSave::RawTextConfigSave ( )

default constructor

Definition at line 40 of file raw-text-config.cc.

References NS_LOG_FUNCTION.

◆ ~RawTextConfigSave()

ns3::RawTextConfigSave::~RawTextConfigSave ( )
override

destructor

Definition at line 46 of file raw-text-config.cc.

References m_os, and NS_LOG_FUNCTION.

Member Function Documentation

◆ Attributes()

void ns3::RawTextConfigSave::Attributes ( )
overridevirtual

Load or save the attributes values.

Implements ns3::FileConfig.

Definition at line 144 of file raw-text-config.cc.

References ns3::StringValue::Get(), ns3::TypeId::GetAttribute(), ns3::TypeId::GetAttributeN(), m_os, ns3::FileConfig::m_saveDeprecated, ns3::TypeId::AttributeInformation::name, NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_WARN, and ns3::TypeId::AttributeInformation::supportLevel.

Referenced by ns3::save_clicked_attribute().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Default()

void ns3::RawTextConfigSave::Default ( )
overridevirtual

Load or save the default values.

Implements ns3::FileConfig.

Definition at line 66 of file raw-text-config.cc.

References ns3::TypeId::GetAttribute(), ns3::TypeId::GetAttributeN(), m_os, ns3::FileConfig::m_saveDeprecated, ns3::TypeId::AttributeInformation::name, NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_WARN, and ns3::TypeId::AttributeInformation::supportLevel.

Referenced by ns3::save_clicked_default().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Global()

void ns3::RawTextConfigSave::Global ( )
overridevirtual

Load or save the global values.

Implements ns3::FileConfig.

Definition at line 131 of file raw-text-config.cc.

References ns3::GlobalValue::Begin(), ns3::GlobalValue::End(), m_os, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

+ Here is the call graph for this function:

◆ SetFilename()

void ns3::RawTextConfigSave::SetFilename ( std::string  filename)
overridevirtual

Set the file name.

Parameters
filenamethe filename

Implements ns3::FileConfig.

Definition at line 58 of file raw-text-config.cc.

References m_os, and NS_LOG_FUNCTION.

Referenced by ns3::save_clicked_attribute(), and ns3::save_clicked_default().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_os

std::ofstream* ns3::RawTextConfigSave::m_os
private

Config store output stream.

Definition at line 49 of file raw-text-config.h.

Referenced by ~RawTextConfigSave(), Attributes(), Default(), Global(), and SetFilename().


The documentation for this class was generated from the following files: