libcopp  2.2.0
Public Member Functions | Protected Attributes
util::cli::cmd_option_value Class Reference

#include <cmd_option_value.h>

Collaboration diagram for util::cli::cmd_option_value:
Collaboration graph

Public Member Functions

 cmd_option_value (const char *str_data)
 
 cmd_option_value (const char *begin, const char *end)
 
 cmd_option_value (const std::string &str_data)
 
template<typename Tr >
Tr to () const
 
const std::string & to_cpp_string () const
 
bool to_bool () const
 
char to_char () const
 
short to_short () const
 
int to_int () const
 
long to_long () const
 
long long to_longlong () const
 
double to_double () const
 
float to_float () const
 
const char * to_string () const
 
unsigned char to_uchar () const
 
unsigned short to_ushort () const
 
unsigned int to_uint () const
 
unsigned long to_ulong () const
 
unsigned long long to_ulonglong () const
 
int8_t to_int8 () const
 
uint8_t to_uint8 () const
 
int16_t to_int16 () const
 
uint16_t to_uint16 () const
 
int32_t to_int32 () const
 
uint32_t to_uint32 () const
 
int64_t to_int64 () const
 
uint64_t to_uint64 () const
 
bool to_logic_bool () const
 
void split (char delim, std::vector< cmd_option_value > &out)
 

Protected Attributes

std::string data_
 

Detailed Description

Definition at line 95 of file cmd_option_value.h.

Constructor & Destructor Documentation

◆ cmd_option_value() [1/3]

util::cli::cmd_option_value::cmd_option_value ( const char *  str_data)

Definition at line 27 of file cmd_option_value.cpp.

Referenced by split().

◆ cmd_option_value() [2/3]

util::cli::cmd_option_value::cmd_option_value ( const char *  begin,
const char *  end 
)

Definition at line 28 of file cmd_option_value.cpp.

References data_.

◆ cmd_option_value() [3/3]

util::cli::cmd_option_value::cmd_option_value ( const std::string &  str_data)

Definition at line 29 of file cmd_option_value.cpp.

References data_.

Member Function Documentation

◆ split()

void util::cli::cmd_option_value::split ( char  delim,
std::vector< cmd_option_value > &  out 
)

Definition at line 94 of file cmd_option_value.cpp.

References cmd_option_value(), and data_.

◆ to()

template<typename Tr >
Tr util::cli::cmd_option_value::to ( ) const
inline

Definition at line 105 of file cmd_option_value.h.

References data_.

◆ to_bool()

bool util::cli::cmd_option_value::to_bool ( ) const

Definition at line 33 of file cmd_option_value.cpp.

◆ to_char()

char util::cli::cmd_option_value::to_char ( ) const

Definition at line 35 of file cmd_option_value.cpp.

◆ to_cpp_string()

const std::string & util::cli::cmd_option_value::to_cpp_string ( ) const

Definition at line 31 of file cmd_option_value.cpp.

References data_.

◆ to_double()

double util::cli::cmd_option_value::to_double ( ) const

Definition at line 45 of file cmd_option_value.cpp.

◆ to_float()

float util::cli::cmd_option_value::to_float ( ) const

Definition at line 47 of file cmd_option_value.cpp.

◆ to_int()

int util::cli::cmd_option_value::to_int ( ) const

Definition at line 39 of file cmd_option_value.cpp.

Referenced by to_int8().

◆ to_int16()

int16_t util::cli::cmd_option_value::to_int16 ( ) const

Definition at line 66 of file cmd_option_value.cpp.

◆ to_int32()

int32_t util::cli::cmd_option_value::to_int32 ( ) const

Definition at line 70 of file cmd_option_value.cpp.

◆ to_int64()

int64_t util::cli::cmd_option_value::to_int64 ( ) const

Definition at line 74 of file cmd_option_value.cpp.

◆ to_int8()

int8_t util::cli::cmd_option_value::to_int8 ( ) const

Definition at line 62 of file cmd_option_value.cpp.

References to_int().

◆ to_logic_bool()

bool util::cli::cmd_option_value::to_logic_bool ( ) const

Definition at line 78 of file cmd_option_value.cpp.

References data_, and util::cli::detail::tolower().

◆ to_long()

long util::cli::cmd_option_value::to_long ( ) const

Definition at line 41 of file cmd_option_value.cpp.

◆ to_longlong()

long long util::cli::cmd_option_value::to_longlong ( ) const

Definition at line 43 of file cmd_option_value.cpp.

◆ to_short()

short util::cli::cmd_option_value::to_short ( ) const

Definition at line 37 of file cmd_option_value.cpp.

◆ to_string()

const char * util::cli::cmd_option_value::to_string ( ) const

Definition at line 49 of file cmd_option_value.cpp.

References data_.

◆ to_uchar()

unsigned char util::cli::cmd_option_value::to_uchar ( ) const

Definition at line 52 of file cmd_option_value.cpp.

◆ to_uint()

unsigned int util::cli::cmd_option_value::to_uint ( ) const

Definition at line 56 of file cmd_option_value.cpp.

Referenced by to_uint8().

◆ to_uint16()

uint16_t util::cli::cmd_option_value::to_uint16 ( ) const

Definition at line 68 of file cmd_option_value.cpp.

◆ to_uint32()

uint32_t util::cli::cmd_option_value::to_uint32 ( ) const

Definition at line 72 of file cmd_option_value.cpp.

◆ to_uint64()

uint64_t util::cli::cmd_option_value::to_uint64 ( ) const

Definition at line 76 of file cmd_option_value.cpp.

◆ to_uint8()

uint8_t util::cli::cmd_option_value::to_uint8 ( ) const

Definition at line 64 of file cmd_option_value.cpp.

References to_uint().

◆ to_ulong()

unsigned long util::cli::cmd_option_value::to_ulong ( ) const

Definition at line 58 of file cmd_option_value.cpp.

◆ to_ulonglong()

unsigned long long util::cli::cmd_option_value::to_ulonglong ( ) const

Definition at line 60 of file cmd_option_value.cpp.

◆ to_ushort()

unsigned short util::cli::cmd_option_value::to_ushort ( ) const

Definition at line 54 of file cmd_option_value.cpp.

Field Documentation

◆ data_

std::string util::cli::cmd_option_value::data_
protected

Definition at line 97 of file cmd_option_value.h.

Referenced by cmd_option_value(), split(), to(), to_cpp_string(), to_logic_bool(), and to_string().


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