Static Public Member Functions | Static Private Member Functions | Friends | List of all members
el::Configurations::Parser Class Reference

Parser used internally to parse configurations from file or text. More...

#include <easylogging++.h>

Inheritance diagram for el::Configurations::Parser:
Inheritance graph
[legend]

Static Public Member Functions

static bool parseFromFile (const std::string &configurationFile, Configurations *sender, Configurations *base=nullptr)
 Parses configuration from file. More...
 
static bool parseFromText (const std::string &configurationsString, Configurations *sender, Configurations *base=nullptr)
 Parse configurations from configuration string. More...
 

Static Private Member Functions

static void ignoreComments (std::string *line)
 
static bool isComment (const std::string &line)
 
static bool isConfig (const std::string &line)
 
static bool isLevel (const std::string &line)
 
static bool parseLine (std::string *line, std::string *currConfigStr, std::string *currLevelStr, Level *currLevel, Configurations *conf)
 

Friends

class el::Loggers
 

Detailed Description

Parser used internally to parse configurations from file or text.

This class makes use of base::utils::Str. You should not need this unless you are working on some tool for Easylogging++

Definition at line 1832 of file easylogging++.h.

Member Function Documentation

void el::Configurations::Parser::ignoreComments ( std::string line)
staticprivate

Definition at line 449 of file easylogging++.cc.

bool el::Configurations::Parser::isComment ( const std::string line)
staticprivate

Definition at line 472 of file easylogging++.cc.

bool el::Configurations::Parser::isConfig ( const std::string line)
inlinestaticprivate

Definition at line 476 of file easylogging++.cc.

bool el::Configurations::Parser::isLevel ( const std::string line)
staticprivate

Definition at line 468 of file easylogging++.cc.

bool el::Configurations::Parser::parseFromFile ( const std::string configurationFile,
Configurations sender,
Configurations base = nullptr 
)
static

Parses configuration from file.

Parameters
configurationFileFull path to configuration file
senderSender configurations pointer. Usually 'this' is used from calling class
baseConfigurations to base new configuration repository off. This value is used when you want to use existing Configurations to base all the values and then set rest of configuration via configuration file.
Returns
True if successfully parsed, false otherwise. You may define '_STOP_ON_FIRSTELPP_ASSERTION' to make sure you do not proceed without successful parse.

Definition at line 415 of file easylogging++.cc.

bool el::Configurations::Parser::parseFromText ( const std::string configurationsString,
Configurations sender,
Configurations base = nullptr 
)
static

Parse configurations from configuration string.

This configuration string has same syntax as configuration file contents. Make sure all the necessary new line characters are provided. You may define '_STOP_ON_FIRSTELPP_ASSERTION' to make sure you do not proceed without successful parse (This is recommended)

Parameters
configurationsStringthe configuration in plain text format
senderSender configurations pointer. Usually 'this' is used from calling class
baseConfigurations to base new configuration repository off. This value is used when you want to use existing Configurations to base all the values and then set rest of configuration via configuration text.
Returns
True if successfully parsed, false otherwise.

Definition at line 433 of file easylogging++.cc.

bool el::Configurations::Parser::parseLine ( std::string line,
std::string currConfigStr,
std::string currLevelStr,
Level currLevel,
Configurations conf 
)
staticprivate

Definition at line 484 of file easylogging++.cc.

Friends And Related Function Documentation

friend class el::Loggers
friend

Definition at line 1858 of file easylogging++.h.


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


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:36