ndn::ConfigFile Class Reference

System configuration file for NDN platform. More...

#include <ndn-cxx/util/config-file.hpp>

+ Inheritance diagram for ndn::ConfigFile:
+ Collaboration diagram for ndn::ConfigFile:

Classes

class  Error
 

Public Types

using Parsed = boost::property_tree::ptree
 

Public Member Functions

 ConfigFile ()
 Locate, open, and parse a library configuration file. More...
 
 ~ConfigFile ()
 
const ParsedgetParsedConfiguration () const noexcept
 
const std::filesystem::path & getPath () const noexcept
 

Detailed Description

System configuration file for NDN platform.

The config file controls the default transport to connect to NDN forwarder, type and location of PIB and TPM.

Looking for the configuration file in these well-known locations (in order):

  • $HOME/.ndn/client.conf
  • @SYSCONFDIR@/ndn/client.conf
  • /etc/ndn/client.conf
See also
Manpage of ndn-client.conf

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

Member Typedef Documentation

◆ Parsed

using ndn::ConfigFile::Parsed = boost::property_tree::ptree

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

Constructor & Destructor Documentation

◆ ConfigFile()

ndn::ConfigFile::ConfigFile ( )

Locate, open, and parse a library configuration file.

Exceptions
ConfigFile::Erroron parse error

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

◆ ~ConfigFile()

ndn::ConfigFile::~ConfigFile ( )

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

Member Function Documentation

◆ getParsedConfiguration()

const Parsed& ndn::ConfigFile::getParsedConfiguration ( ) const
inlinenoexcept

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

◆ getPath()

const std::filesystem::path& ndn::ConfigFile::getPath ( ) const
inlinenoexcept

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