Loading...
Searching...
No Matches
nlsr::util::boost_info_editor Namespace Reference

Functions

boost::property_tree::ptree load (const std::string &fileName)
 
bool put (const std::string &fileName, const std::string &section, const std::string &value)
 
bool remove (const std::string &fileName, const std::string &section)
 
bool save (const std::string &fileName, boost::property_tree::ptree &info)
 

Function Documentation

◆ load()

boost::property_tree::ptree nlsr::util::boost_info_editor::load ( const std::string &  fileName)

Definition at line 31 of file boost-info-editor.cpp.

◆ put()

bool nlsr::util::boost_info_editor::put ( const std::string &  fileName,
const std::string &  section,
const std::string &  value 
)

Insert a specified combination of configuration field name and value into a specific file path Returns false if any errors occur on I/O, otherwise true.

Parameters
fileNamePath to conf file as string
sectionSection name to add/modify in conf file; expects [section].[subsection]... formatting
valueThe value to insert into the sheet as a string. Typechecking should be done in caller.

Definition at line 57 of file boost-info-editor.cpp.

◆ remove()

bool nlsr::util::boost_info_editor::remove ( const std::string &  fileName,
const std::string &  section 
)

Remove a specified key and its value from a configuration file at a specific path Returns false if any errors occur on I/O, otherwise true.

Parameters
fileNamePath to conf file as string
sectionSection name to add/modify in conf file; expects [section].[subsection]... formatting

Definition at line 71 of file boost-info-editor.cpp.

◆ save()

bool nlsr::util::boost_info_editor::save ( const std::string &  fileName,
boost::property_tree::ptree &  info 
)

Definition at line 44 of file boost-info-editor.cpp.