NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nfd::ConfigFile Class Reference

#include <config-file.hpp>

Inheritance diagram for nfd::ConfigFile:
Collaboration diagram for nfd::ConfigFile:

Classes

class  Error
 

Public Member Functions

 ConfigFile (UnknownConfigSectionHandler unknownSectionCallback=throwErrorOnUnknownSection)
 
void addSectionHandler (const std::string &sectionName, ConfigSectionHandler subscriber)
 setup notification of configuration file sections More...
 
void parse (const std::string &filename, bool isDryRun)
 
void parse (const std::string &input, bool isDryRun, const std::string &filename)
 
void parse (std::istream &input, bool isDryRun, const std::string &filename)
 
void parse (const ConfigSection &config, bool isDryRun, const std::string &filename)
 

Static Public Member Functions

static void throwErrorOnUnknownSection (const std::string &filename, const std::string &sectionName, const ConfigSection &section, bool isDryRun)
 
static void ignoreUnknownSection (const std::string &filename, const std::string &sectionName, const ConfigSection &section, bool isDryRun)
 

Detailed Description

Definition at line 47 of file config-file.hpp.

Constructor & Destructor Documentation

nfd::ConfigFile::ConfigFile ( UnknownConfigSectionHandler  unknownSectionCallback = throwErrorOnUnknownSection)

Definition at line 57 of file config-file.cpp.

Member Function Documentation

void nfd::ConfigFile::addSectionHandler ( const std::string &  sectionName,
ConfigSectionHandler  subscriber 
)

setup notification of configuration file sections

Definition at line 63 of file config-file.cpp.

Referenced by nfd::TablesConfigSection::setConfigFile(), nfd::CommandValidator::setConfigFile(), nfd::FaceManager::setConfigFile(), and nfd::general::setConfigFile().

void nfd::ConfigFile::ignoreUnknownSection ( const std::string &  filename,
const std::string &  sectionName,
const ConfigSection section,
bool  isDryRun 
)
static

Definition at line 49 of file config-file.cpp.

void nfd::ConfigFile::parse ( const std::string &  filename,
bool  isDryRun 
)
Parameters
filenamefile to parse
isDryRuntrue if performing a dry run of configuration, false otherwise
Exceptions
ConfigFile::Errorif file not found
ConfigFile::Errorif parse error

Definition at line 70 of file config-file.cpp.

Referenced by parse().

void nfd::ConfigFile::parse ( const std::string &  input,
bool  isDryRun,
const std::string &  filename 
)
Parameters
inputconfiguration (as a string) to parse
isDryRuntrue if performing a dry run of configuration, false otherwise
filenameoptional convenience argument to provide more detailed error messages
Exceptions
ConfigFile::Errorif file not found
ConfigFile::Errorif parse error

Definition at line 85 of file config-file.cpp.

References parse().

void nfd::ConfigFile::parse ( std::istream &  input,
bool  isDryRun,
const std::string &  filename 
)
Parameters
inputstream to parse
isDryRuntrue if performing a dry run of configuration, false otherwise
filenameoptional convenience argument to provide more detailed error messages
Exceptions
ConfigFile::Errorif parse error

Definition at line 93 of file config-file.cpp.

void nfd::ConfigFile::parse ( const ConfigSection config,
bool  isDryRun,
const std::string &  filename 
)
Parameters
configConfigSection that needs to be processed
isDryRuntrue if performing a dry run of configuration, false otherwise
filenameoptional convenience argument to provide more detailed error messages
Exceptions
ConfigFile::Errorif parse error

Definition at line 112 of file config-file.cpp.

void nfd::ConfigFile::throwErrorOnUnknownSection ( const std::string &  filename,
const std::string &  sectionName,
const ConfigSection section,
bool  isDryRun 
)
static

Definition at line 36 of file config-file.cpp.

Referenced by ns3::ndn::IgnoreSections::operator()().


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