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 Namespace Reference

The SWC-DB Configurations C++ namespace 'SWC::Config'. More...

Namespaces

 Property
 The SWC-DB Property C++ namespace 'SWC::Config::Property'.
 

Classes

class  Parser
 
class  ParserConfig
 
class  Properties
 
class  Settings
 

Typedefs

typedef Core::Vector< std::string > Strings
 
typedef Core::Vector< int64_t > Int64s
 
typedef Core::Vector< double > Doubles
 

Functions

void init_app_options (Settings *settings)
 
void init_comm_options (Settings *settings)
 
Property::Value_bool::Ptr boo (const bool &v)
 
Property::Value_uint8::Ptr i8 (const uint8_t &v)
 
Property::Value_uint16::Ptr i16 (const uint16_t &v)
 
Property::Value_int32::Ptr i32 (const int32_t &v)
 
Property::Value_int64::Ptr i64 (const int64_t &v)
 
Property::Value_double::Ptr f64 (const double &v)
 
Property::Value_string::Ptr str (std::string &&v)
 
Property::Value_strings::Ptr strs (Strings &&v)
 
Property::Value_int64s::Ptr i64s (Int64s &&v)
 
Property::Value_doubles::Ptr f64s (Doubles &&v)
 
Property::Value_bool_g::Ptr g_boo (const bool &v)
 
Property::Value_uint8_g::Ptr g_i8 (const uint8_t &v)
 
Property::Value_uint16_g::Ptr g_i16 (const uint16_t &v)
 
Property::Value_int32_g::Ptr g_i32 (const int32_t &v)
 
Property::Value_uint64_g::Ptr g_i64 (const uint64_t &v)
 
Property::Value_strings_g::Ptr g_strs (Strings &&v)
 
Property::Value_enum_g::Ptr g_enum (const int32_t &v, Property::Value_enum_g::OnChg_t &&cb, Property::Value_enum_g::FromString_t &&from_string, Property::Value_enum_g::Repr_t &&repr)
 
Property::Value_bool::Ptr boo ()
 
Property::Value_uint8::Ptr i8 ()
 
Property::Value_uint16::Ptr i16 ()
 
Property::Value_int32::Ptr i32 ()
 
Property::Value_int64::Ptr i64 ()
 
Property::Value_double::Ptr f64 ()
 
Property::Value_string::Ptr str ()
 
Property::Value_strings::Ptr strs ()
 
Property::Value_int64s::Ptr i64s ()
 
Property::Value_doubles::Ptr f64s ()
 
std::ostream & operator<< (std::ostream &os, const ParserConfig &cfg)
 
std::ostream & operator<< (std::ostream &os, const Parser &prs)
 
void init_client_options (Settings *settings)
 
void init_fs_options (Settings *settings)
 
void init_post_cmd_args (Settings *settings)
 

Variables

const uint64_t K = 1000
 
const uint64_t KiB = 1024
 
const uint64_t M = K * 1000
 
const uint64_t MiB = KiB * 1024
 
const uint64_t G = M * 1000
 
const uint64_t GiB = MiB * 1024
 
const uint64_t T = G * 1000
 
const uint64_t TiB = GiB * 1024
 

Detailed Description

The SWC-DB Configurations C++ namespace 'SWC::Config'.

Typedef Documentation

◆ Doubles

Definition at line 19 of file Property.h.

◆ Int64s

Definition at line 18 of file Property.h.

◆ Strings

typedef Core::Vector<std::string> SWC::Config::Strings

Definition at line 17 of file Property.h.

Function Documentation

◆ boo() [1/2]

Config::Property::Value_bool::Ptr SWC::Config::boo ( )

Definition at line 100 of file PropertiesParser.cc.

References SWC::Config::Property::Value::SKIPPABLE.

◆ boo() [2/2]

Config::Property::Value_bool::Ptr SWC::Config::boo ( const bool &  v)

Definition at line 21 of file PropertiesParser.cc.

Referenced by SWC::Config::ParserConfig::add(), SWC::FS::apply_broker(), SWC::FS::apply_ceph(), SWC::FS::apply_hadoop(), SWC::FS::apply_hadoop_jvm(), SWC::FS::apply_local(), init_app_options(), init_comm_options(), and SWC::Config::Settings::init_options().

+ Here is the caller graph for this function:

◆ f64() [1/2]

Definition at line 120 of file PropertiesParser.cc.

References SWC::Config::Property::Value::SKIPPABLE.

◆ f64() [2/2]

Config::Property::Value_double::Ptr SWC::Config::f64 ( const double &  v)

Definition at line 41 of file PropertiesParser.cc.

◆ f64s() [1/2]

Config::Property::Value_doubles::Ptr SWC::Config::f64s ( )

Definition at line 136 of file PropertiesParser.cc.

References SWC::Config::Property::Value::SKIPPABLE.

◆ f64s() [2/2]

Config::Property::Value_doubles::Ptr SWC::Config::f64s ( Doubles &&  v)

Definition at line 57 of file PropertiesParser.cc.

◆ g_boo()

Config::Property::Value_bool_g::Ptr SWC::Config::g_boo ( const bool &  v)

Definition at line 65 of file PropertiesParser.cc.

Referenced by SWC::Config::Settings::init_options().

+ Here is the caller graph for this function:

◆ g_enum()

Config::Property::Value_enum_g::Ptr SWC::Config::g_enum ( const int32_t &  v,
Property::Value_enum_g::OnChg_t &&  cb,
Property::Value_enum_g::FromString_t &&  from_string,
Property::Value_enum_g::Repr_t &&  repr 
)

Definition at line 89 of file PropertiesParser.cc.

References SWC::Config::Property::from_string().

Referenced by SWC::FS::apply_broker(), init_app_options(), init_client_options(), and SWC::Config::Settings::init_options().

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

◆ g_i16()

Config::Property::Value_uint16_g::Ptr SWC::Config::g_i16 ( const uint16_t &  v)

Definition at line 73 of file PropertiesParser.cc.

Referenced by init_client_options().

+ Here is the caller graph for this function:

◆ g_i32()

Config::Property::Value_int32_g::Ptr SWC::Config::g_i32 ( const int32_t &  v)

Definition at line 77 of file PropertiesParser.cc.

Referenced by SWC::FS::apply_broker(), SWC::FS::apply_ceph(), SWC::FS::apply_hadoop(), SWC::FS::apply_hadoop_jvm(), SWC::FS::apply_local(), and init_client_options().

+ Here is the caller graph for this function:

◆ g_i64()

Config::Property::Value_uint64_g::Ptr SWC::Config::g_i64 ( const uint64_t &  v)

Definition at line 81 of file PropertiesParser.cc.

◆ g_i8()

Config::Property::Value_uint8_g::Ptr SWC::Config::g_i8 ( const uint8_t &  v)

Definition at line 69 of file PropertiesParser.cc.

Referenced by init_client_options().

+ Here is the caller graph for this function:

◆ g_strs()

Config::Property::Value_strings_g::Ptr SWC::Config::g_strs ( Strings &&  v)

Definition at line 85 of file PropertiesParser.cc.

Referenced by init_client_options().

+ Here is the caller graph for this function:

◆ i16() [1/2]

Definition at line 108 of file PropertiesParser.cc.

References SWC::Config::Property::Value::SKIPPABLE.

◆ i16() [2/2]

Config::Property::Value_uint16::Ptr SWC::Config::i16 ( const uint16_t &  v)

Definition at line 29 of file PropertiesParser.cc.

Referenced by SWC::FS::apply_broker(), SWC::FS::apply_hadoop(), SWC::FS::apply_hadoop_jvm(), and init_client_options().

+ Here is the caller graph for this function:

◆ i32() [1/2]

Config::Property::Value_int32::Ptr SWC::Config::i32 ( )

Definition at line 112 of file PropertiesParser.cc.

References SWC::Config::Property::Value::SKIPPABLE.

◆ i32() [2/2]

Config::Property::Value_int32::Ptr SWC::Config::i32 ( const int32_t &  v)

Definition at line 33 of file PropertiesParser.cc.

Referenced by SWC::FS::apply_broker(), SWC::FS::apply_ceph(), SWC::FS::apply_hadoop(), SWC::FS::apply_local(), and init_app_options().

+ Here is the caller graph for this function:

◆ i64() [1/2]

Config::Property::Value_int64::Ptr SWC::Config::i64 ( )

Definition at line 116 of file PropertiesParser.cc.

References SWC::Config::Property::Value::SKIPPABLE.

◆ i64() [2/2]

Config::Property::Value_int64::Ptr SWC::Config::i64 ( const int64_t &  v)

Definition at line 37 of file PropertiesParser.cc.

Referenced by init_app_options().

+ Here is the caller graph for this function:

◆ i64s() [1/2]

Config::Property::Value_int64s::Ptr SWC::Config::i64s ( )

Definition at line 132 of file PropertiesParser.cc.

References SWC::Config::Property::Value::SKIPPABLE.

◆ i64s() [2/2]

Config::Property::Value_int64s::Ptr SWC::Config::i64s ( Int64s &&  v)

Definition at line 53 of file PropertiesParser.cc.

◆ i8() [1/2]

Definition at line 104 of file PropertiesParser.cc.

References SWC::Config::Property::Value::SKIPPABLE.

◆ i8() [2/2]

Config::Property::Value_uint8::Ptr SWC::Config::i8 ( const uint8_t &  v)

Definition at line 25 of file PropertiesParser.cc.

Referenced by init_app_options().

+ Here is the caller graph for this function:

◆ init_app_options()

◆ init_client_options()

SWC_SHOULD_NOT_INLINE void SWC::Config::init_client_options ( Settings settings)

Definition at line 13 of file Settings.cc.

References SWC::Config::ParserConfig::add_options(), SWC::Config::Settings::cmdline_desc, SWC::Core::Encoder::from_string_encoding(), g_enum(), g_i16(), g_i32(), g_i8(), g_strs(), i16(), SWC::Core::Encoder::repr_encoding(), and SWC_DEFAULT_COMM_ENCODER.

Referenced by init_app_options().

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

◆ init_comm_options()

SWC_SHOULD_NOT_INLINE void SWC::Config::init_comm_options ( Settings settings)

Definition at line 13 of file Settings.cc.

References SWC::Config::ParserConfig::add_options(), boo(), SWC::Config::Settings::file_desc, str(), and strs().

Referenced by init_app_options().

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

◆ init_fs_options()

SWC_SHOULD_NOT_INLINE void SWC::Config::init_fs_options ( Settings settings)

Definition at line 13 of file Settings.cc.

References SWC::Config::ParserConfig::add_options(), SWC::Config::Settings::file_desc, and str().

+ Here is the call graph for this function:

◆ init_post_cmd_args()

void SWC::Config::init_post_cmd_args ( Settings settings)

Definition at line 64 of file Settings.h.

References SWC::Config::Properties::get_str(), and SWC::Config::Settings::parse_file().

Referenced by SWC::Env::Config::init(), SWC::Config::Settings::init(), and main().

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

◆ operator<<() [1/2]

std::ostream & SWC::Config::operator<< ( std::ostream &  os,
const Parser prs 
)

Definition at line 597 of file PropertiesParser.cc.

References SWC::Config::Parser::print().

+ Here is the call graph for this function:

◆ operator<<() [2/2]

std::ostream & SWC::Config::operator<< ( std::ostream &  os,
const ParserConfig cfg 
)

Definition at line 341 of file PropertiesParser.cc.

References SWC::Config::ParserConfig::print().

+ Here is the call graph for this function:

◆ str() [1/2]

Definition at line 124 of file PropertiesParser.cc.

References SWC::Config::Property::Value::SKIPPABLE.

◆ str() [2/2]

◆ strs() [1/2]

Config::Property::Value_strings::Ptr SWC::Config::strs ( )

Definition at line 128 of file PropertiesParser.cc.

References SWC::Config::Property::Value::SKIPPABLE.

◆ strs() [2/2]

Config::Property::Value_strings::Ptr SWC::Config::strs ( Strings &&  v)

Definition at line 49 of file PropertiesParser.cc.

Referenced by SWC::FS::apply_broker(), SWC::FS::apply_ceph(), SWC::FS::apply_hadoop(), SWC::FS::apply_hadoop_jvm(), SWC::FS::apply_local(), init_comm_options(), and SWC::Config::Settings::init_options().

+ Here is the caller graph for this function:

Variable Documentation

◆ G

const uint64_t SWC::Config::G = M * 1000

Definition at line 25 of file Property.h.

◆ GiB

const uint64_t SWC::Config::GiB = MiB * 1024

Definition at line 26 of file Property.h.

◆ K

const uint64_t SWC::Config::K = 1000

Definition at line 21 of file Property.h.

◆ KiB

const uint64_t SWC::Config::KiB = 1024

Definition at line 22 of file Property.h.

◆ M

const uint64_t SWC::Config::M = K * 1000

Definition at line 23 of file Property.h.

◆ MiB

const uint64_t SWC::Config::MiB = KiB * 1024

Definition at line 24 of file Property.h.

◆ T

◆ TiB

const uint64_t SWC::Config::TiB = GiB * 1024

Definition at line 28 of file Property.h.