Electroneum
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:
Collaboration diagram for el::Configurations::Parser:

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...
 

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 1862 of file easylogging++.h.

Member Function Documentation

◆ parseFromFile()

static 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.

◆ parseFromText()

static 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.

Friends And Related Function Documentation

◆ el::Loggers

friend class el::Loggers
friend

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


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