A Discrete-Event Network Simulator
API
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ns3::RawTextConfigLoad Class Reference

A class to enable loading of configuration store from a raw text file. More...

#include "raw-text-config.h"

+ Inheritance diagram for ns3::RawTextConfigLoad:

Public Member Functions

 RawTextConfigLoad ()
 
virtual ~RawTextConfigLoad ()
 
virtual void Attributes (void)
 Load or save the attributes values. More...
 
virtual void Default (void)
 Load or save the default values. More...
 
virtual void Global (void)
 Load or save the global values. More...
 
virtual void SetFilename (std::string filename)
 Set the file name. More...
 
- Public Member Functions inherited from ns3::FileConfig
virtual ~FileConfig ()
 

Private Member Functions

std::string Strip (std::string value)
 Strip out attribute value. More...
 

Private Attributes

std::ifstream * m_is
 Config store input stream. More...
 

Detailed Description

A class to enable loading of configuration store from a raw text file.

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

Constructor & Destructor Documentation

◆ RawTextConfigLoad()

ns3::RawTextConfigLoad::RawTextConfigLoad ( )

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

References NS_LOG_FUNCTION.

◆ ~RawTextConfigLoad()

ns3::RawTextConfigLoad::~RawTextConfigLoad ( )
virtual

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

References m_is, and NS_LOG_FUNCTION.

Member Function Documentation

◆ Attributes()

void ns3::RawTextConfigLoad::Attributes ( void  )
virtual

Load or save the attributes values.

Implements ns3::FileConfig.

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

References m_is, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Config::Set(), and Strip().

Referenced by ns3::load_clicked().

◆ Default()

void ns3::RawTextConfigLoad::Default ( void  )
virtual

Load or save the default values.

Implements ns3::FileConfig.

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

References m_is, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Config::SetDefault(), and Strip().

Referenced by ns3::load_clicked_default().

◆ Global()

void ns3::RawTextConfigLoad::Global ( void  )
virtual

Load or save the global values.

Implements ns3::FileConfig.

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

References m_is, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Config::SetGlobal(), and Strip().

◆ SetFilename()

void ns3::RawTextConfigLoad::SetFilename ( std::string  filename)
virtual

Set the file name.

Parameters
filenamethe filename

Implements ns3::FileConfig.

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

References m_is, and NS_LOG_FUNCTION.

Referenced by ns3::load_clicked(), and ns3::load_clicked_default().

◆ Strip()

std::string ns3::RawTextConfigLoad::Strip ( std::string  value)
private

Strip out attribute value.

Parameters
valuethe input string
Returns
the updated string

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

References NS_ASSERT, and visualizer.core::start().

Referenced by Attributes(), Default(), and Global().

Member Data Documentation

◆ m_is

std::ifstream* ns3::RawTextConfigLoad::m_is
private

Config store input stream.

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

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


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