ztsdb
Classes | Public Member Functions | Public Attributes | List of all members
cfg::CfgCtx Struct Reference

Classes

struct  NoConfigFile
 

Public Member Functions

 CfgCtx (CfgMap &cfgmap_p)
 
void add (const kv_t &kv)
 
int parsefile (const std::string &filename)
 
int parse (const std::string &s)
 
void error (const cfgyy::location &l, const std::string &m)
 

Public Attributes

std::string file
 
cfgyy::parser::location_type yylloc
 
std::string string_literal
 
cfgyy::parser::location_type string_literal_yylloc
 

Member Function Documentation

◆ parse()

int cfg::CfgCtx::parse ( const std::string &  s)

Parse a string of key-values. The string must be terminated by a new-line.

◆ parsefile()

int cfg::CfgCtx::parsefile ( const std::string &  filename)

Parse a file of key-values with format key=value. Value is specified as an integer, a double or a string (possibly quoted) which all follow C syntax.


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