SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
SWC::Config::ParserConfig Class Referencefinal

#include <swcdb/core/config/PropertiesParser.h>

+ Collaboration diagram for SWC::Config::ParserConfig:

Classes

struct  ParserOpt
 

Public Member Functions

SWC_SHOULD_NOT_INLINE ParserConfig (bool own) noexcept
 
 ParserConfig (ParserConfig &&)=delete
 
 ParserConfig (const ParserConfig &)=delete
 
ParserConfigoperator= (ParserConfig &&)=delete
 
ParserConfigoperator= (const ParserConfig &)=delete
 
 ~ParserConfig () noexcept
 
void free () noexcept
 
ParserConfigdefinition (const char *u)
 
ParserConfigdefinition (std::string &&u)
 
ParserConfigadd (const ParserConfig &other_cfg)
 
ParserConfigadd (const char *names, Property::Value::Ptr vptr, const char *description)
 
ParserConfigoperator() (const char *name, Property::Value::Ptr vptr, const char *description)
 
ParserConfig &SWC_CONST_FUNC add_options ()
 
ParserConfigadd_options (const char *name, Property::Value::Ptr vptr, const char *description)
 
ParserConfigadd (const char *name, const char *description)
 
ParserConfigoperator() (const char *name, const char *description)
 
ParserConfigadd_pos (const char *s, int pos)
 
ParserConfigoperator() (const char *s, int pos)
 
std::string position_name (int n)
 
bool SWC_PURE_FUNC has (const std::string &name) const noexcept
 
bool has (const std::string &name, std::string &alias_to) const noexcept
 
Property::Value::Ptr get_default (const std::string &name)
 
void remove (const std::string &name)
 
void print (std::ostream &os) const
 

Public Attributes

std::string usage
 
Positions positions
 
Map options
 
bool own
 

Private Types

typedef std::map< std::string, ParserOptMap
 
typedef Core::Vector< std::pair< int, std::string > > Positions
 

Detailed Description

Definition at line 64 of file PropertiesParser.h.

Member Typedef Documentation

◆ Map

typedef std::map<std::string, ParserOpt> SWC::Config::ParserConfig::Map
private

Definition at line 99 of file PropertiesParser.h.

◆ Positions

typedef Core::Vector<std::pair<int, std::string> > SWC::Config::ParserConfig::Positions
private

Definition at line 100 of file PropertiesParser.h.

Constructor & Destructor Documentation

◆ ParserConfig() [1/3]

SWC::Config::ParserConfig::ParserConfig ( bool  own)
explicitnoexcept

Definition at line 146 of file PropertiesParser.cc.

◆ ParserConfig() [2/3]

SWC::Config::ParserConfig::ParserConfig ( ParserConfig &&  )
delete

◆ ParserConfig() [3/3]

SWC::Config::ParserConfig::ParserConfig ( const ParserConfig )
delete

◆ ~ParserConfig()

SWC::Config::ParserConfig::~ParserConfig ( )
noexcept

Definition at line 151 of file PropertiesParser.cc.

References free().

+ Here is the call graph for this function:

Member Function Documentation

◆ add() [1/3]

ParserConfig & SWC::Config::ParserConfig::add ( const char *  name,
const char *  description 
)

Definition at line 233 of file PropertiesParser.cc.

References add(), and SWC::Config::boo().

+ Here is the call graph for this function:

◆ add() [2/3]

SWC_SHOULD_NOT_INLINE ParserConfig & SWC::Config::ParserConfig::add ( const char *  names,
Property::Value::Ptr  vptr,
const char *  description 
)

◆ add() [3/3]

SWC_SHOULD_NOT_INLINE ParserConfig & SWC::Config::ParserConfig::add ( const ParserConfig other_cfg)

Definition at line 175 of file PropertiesParser.cc.

References add_pos(), options, positions, and usage.

Referenced by add(), add_options(), SWC::Config::Properties::load(), operator()(), and SWC::Config::Settings::parse_args().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ add_options() [1/2]

ParserConfig & SWC::Config::ParserConfig::add_options ( )

Definition at line 223 of file PropertiesParser.cc.

Referenced by SWC::Config::init_app_options(), SWC::Config::init_client_options(), SWC::Config::init_comm_options(), SWC::Config::init_fs_options(), and SWC::Config::Settings::init_options().

+ Here is the caller graph for this function:

◆ add_options() [2/2]

ParserConfig & SWC::Config::ParserConfig::add_options ( const char *  name,
Property::Value::Ptr  vptr,
const char *  description 
)

Definition at line 227 of file PropertiesParser.cc.

References add().

+ Here is the call graph for this function:

◆ add_pos()

ParserConfig & SWC::Config::ParserConfig::add_pos ( const char *  s,
int  pos 
)

Definition at line 243 of file PropertiesParser.cc.

References SWC::Core::Vector< T, SizeT, GROW_SZ >::emplace_back(), and positions.

Referenced by add(), and operator()().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ definition() [1/2]

ParserConfig & SWC::Config::ParserConfig::definition ( const char *  u)

Definition at line 163 of file PropertiesParser.cc.

References usage.

Referenced by SWC::Config::init_app_options(), and SWC::Config::Settings::Settings().

+ Here is the caller graph for this function:

◆ definition() [2/2]

ParserConfig & SWC::Config::ParserConfig::definition ( std::string &&  u)

Definition at line 168 of file PropertiesParser.cc.

References usage.

◆ free()

void SWC::Config::ParserConfig::free ( )
noexcept

Definition at line 155 of file PropertiesParser.cc.

References options, and own.

Referenced by SWC::Config::Parser::free(), and ~ParserConfig().

+ Here is the caller graph for this function:

◆ get_default()

SWC_SHOULD_NOT_INLINE Property::Value::Ptr SWC::Config::ParserConfig::get_default ( const std::string &  name)

Definition at line 290 of file PropertiesParser.cc.

References SWC::Error::CONFIG_GET_ERROR, options, SWC::Condition::str_eq(), and SWC_THROWF.

Referenced by SWC::Config::init_app_options(), SWC::Config::Parser::make_options(), and SWC::Config::Parser::parse_cmdline().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ has() [1/2]

SWC_SHOULD_NOT_INLINE bool SWC::Config::ParserConfig::has ( const std::string &  name) const
noexcept

Definition at line 261 of file PropertiesParser.cc.

References SWC::Condition::str_eq().

Referenced by SWC::Config::Parser::make_options(), SWC::Config::Parser::parse_cmdline(), and SWC::Config::Parser::parse_opt().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ has() [2/2]

SWC_SHOULD_NOT_INLINE bool SWC::Config::ParserConfig::has ( const std::string &  name,
std::string &  alias_to 
) const
noexcept

Definition at line 274 of file PropertiesParser.cc.

References SWC::Condition::str_eq().

+ Here is the call graph for this function:

◆ operator()() [1/3]

ParserConfig & SWC::Config::ParserConfig::operator() ( const char *  name,
const char *  description 
)

Definition at line 237 of file PropertiesParser.cc.

References add().

+ Here is the call graph for this function:

◆ operator()() [2/3]

ParserConfig & SWC::Config::ParserConfig::operator() ( const char *  name,
Property::Value::Ptr  vptr,
const char *  description 
)

Definition at line 217 of file PropertiesParser.cc.

References add().

+ Here is the call graph for this function:

◆ operator()() [3/3]

ParserConfig & SWC::Config::ParserConfig::operator() ( const char *  s,
int  pos 
)

Definition at line 248 of file PropertiesParser.cc.

References add_pos().

+ Here is the call graph for this function:

◆ operator=() [1/2]

ParserConfig& SWC::Config::ParserConfig::operator= ( const ParserConfig )
delete

◆ operator=() [2/2]

ParserConfig& SWC::Config::ParserConfig::operator= ( ParserConfig &&  )
delete

◆ position_name()

std::string SWC::Config::ParserConfig::position_name ( int  n)

Definition at line 252 of file PropertiesParser.cc.

References positions.

Referenced by SWC::Config::Parser::parse_cmdline().

+ Here is the caller graph for this function:

◆ print()

void SWC::Config::ParserConfig::print ( std::ostream &  os) const

Definition at line 312 of file PropertiesParser.cc.

References SWC::format(), SWC::format_list(), options, and usage.

Referenced by SWC::Config::operator<<().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ remove()

void SWC::Config::ParserConfig::remove ( const std::string &  name)

Definition at line 303 of file PropertiesParser.cc.

References options, and own.

Member Data Documentation

◆ options

Map SWC::Config::ParserConfig::options

◆ own

bool SWC::Config::ParserConfig::own

Definition at line 107 of file PropertiesParser.h.

Referenced by free(), and remove().

◆ positions

Positions SWC::Config::ParserConfig::positions

Definition at line 105 of file PropertiesParser.h.

Referenced by add(), add_pos(), and position_name().

◆ usage

std::string SWC::Config::ParserConfig::usage

Definition at line 104 of file PropertiesParser.h.

Referenced by add(), definition(), and print().


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