libcopp
2.2.0
|
#include <cmd_option_list.h>
Public Types | |
typedef std::vector< std::pair< std::string, std::shared_ptr< binder::cmd_option_bind_base > > > | cmd_array_type |
typedef std::shared_ptr< cmd_option_value > | value_type |
typedef std::vector< value_type >::size_type | size_type |
Public Member Functions | |
cmd_option_list () | |
cmd_option_list (int argv, const char *argc[]) | |
cmd_option_list (const std::vector< std::string > &cmds) | |
void | add (const char *param) |
void | clear () |
void | load_cmd_array (const cmd_array_type &cmds) |
void | append_cmd (const char *cmd_content, std::shared_ptr< binder::cmd_option_bind_base > base_node) |
void | pop_cmd () |
const cmd_array_type & | get_cmd_array () const |
value_type | get (std::string key, const char *default_val) |
value_type | get (std::string key) |
value_type | get (size_type index) const |
value_type | operator[] (size_type index) const |
size_type | get_params_number () const |
void | reset_key_value_map () |
void | set_ext_param (void *param) |
void * | get_ext_param () const |
Protected Member Functions | |
void | init_key_value_map () |
Protected Attributes | |
std::shared_ptr< std::map< std::string, std::shared_ptr< cmd_option_value > > > | key_value_ |
std::vector< std::shared_ptr< cmd_option_value > > | keys_ |
cmd_array_type | cmd_array_ |
void * | ext_param_ |
Definition at line 71 of file cmd_option_list.h.
typedef std::vector<std::pair<std::string, std::shared_ptr<binder::cmd_option_bind_base> > > util::cli::cmd_option_list::cmd_array_type |
Definition at line 75 of file cmd_option_list.h.
typedef std::vector<value_type>::size_type util::cli::cmd_option_list::size_type |
Definition at line 77 of file cmd_option_list.h.
typedef std::shared_ptr<cmd_option_value> util::cli::cmd_option_list::value_type |
Definition at line 76 of file cmd_option_list.h.
util::cli::cmd_option_list::cmd_option_list | ( | ) |
Definition at line 18 of file cmd_option_list.cpp.
util::cli::cmd_option_list::cmd_option_list | ( | int | argv, |
const char * | argc[] | ||
) |
Definition at line 20 of file cmd_option_list.cpp.
References keys_.
util::cli::cmd_option_list::cmd_option_list | ( | const std::vector< std::string > & | cmds | ) |
Definition at line 24 of file cmd_option_list.cpp.
References keys_.
void util::cli::cmd_option_list::add | ( | const char * | param | ) |
Definition at line 60 of file cmd_option_list.cpp.
References keys_.
Referenced by util::cli::cmd_option_bind< TCmdStr >::run_cmd(), and util::cli::cmd_option_bind< TCmdStr >::start().
void util::cli::cmd_option_list::append_cmd | ( | const char * | cmd_content, |
std::shared_ptr< binder::cmd_option_bind_base > | base_node | ||
) |
Definition at line 71 of file cmd_option_list.cpp.
References cmd_array_.
Referenced by util::cli::cmd_option_bind< TCmdStr >::run_cmd().
void util::cli::cmd_option_list::clear | ( | ) |
Definition at line 62 of file cmd_option_list.cpp.
References cmd_array_, ext_param_, key_value_, and keys_.
Referenced by util::cli::cmd_option_bind< TCmdStr >::start().
cmd_option_list::value_type util::cli::cmd_option_list::get | ( | size_type | index | ) | const |
Definition at line 94 of file cmd_option_list.cpp.
References keys_.
cmd_option_list::value_type util::cli::cmd_option_list::get | ( | std::string | key | ) |
Definition at line 85 of file cmd_option_list.cpp.
References init_key_value_map(), and key_value_.
cmd_option_list::value_type util::cli::cmd_option_list::get | ( | std::string | key, |
const char * | default_val | ||
) |
Definition at line 79 of file cmd_option_list.cpp.
const cmd_option_list::cmd_array_type & util::cli::cmd_option_list::get_cmd_array | ( | ) | const |
Definition at line 77 of file cmd_option_list.cpp.
References cmd_array_.
Referenced by util::cli::cmd_option_bind< TCmdStr >::run_cmd(), and util::cli::cmd_option_bind< TCmdStr >::start().
void * util::cli::cmd_option_list::get_ext_param | ( | ) | const |
Definition at line 107 of file cmd_option_list.cpp.
References ext_param_.
Referenced by util::cli::cmd_option_bind< TCmdStr >::start().
cmd_option_list::size_type util::cli::cmd_option_list::get_params_number | ( | ) | const |
Definition at line 100 of file cmd_option_list.cpp.
References keys_.
Referenced by util::cli::phoenix::assign_t< T >::operator()(), util::cli::phoenix::push_back_t< T >::operator()(), util::cli::phoenix::push_front_t< T >::operator()(), util::cli::phoenix::insert_t< T >::operator()(), util::cli::phoenix::assign_logic_bool_t< T >::operator()(), and util::cli::cmd_option_bind< TCmdStr >::start().
|
protected |
Definition at line 31 of file cmd_option_list.cpp.
References util::cli::cmd_option_bind< TCmdStr >::get_segment(), key_value_, and keys_.
Referenced by get().
void util::cli::cmd_option_list::load_cmd_array | ( | const cmd_array_type & | cmds | ) |
Definition at line 69 of file cmd_option_list.cpp.
References cmd_array_.
Referenced by util::cli::cmd_option_bind< TCmdStr >::start().
cmd_option_list::value_type util::cli::cmd_option_list::operator[] | ( | size_type | index | ) | const |
Definition at line 97 of file cmd_option_list.cpp.
References keys_.
void util::cli::cmd_option_list::pop_cmd | ( | ) |
Definition at line 75 of file cmd_option_list.cpp.
References cmd_array_.
void util::cli::cmd_option_list::reset_key_value_map | ( | ) |
Definition at line 103 of file cmd_option_list.cpp.
References key_value_.
void util::cli::cmd_option_list::set_ext_param | ( | void * | param | ) |
Definition at line 105 of file cmd_option_list.cpp.
References ext_param_.
Referenced by util::cli::cmd_option_bind< TCmdStr >::start().
|
protected |
Definition at line 82 of file cmd_option_list.h.
Referenced by append_cmd(), clear(), get_cmd_array(), load_cmd_array(), and pop_cmd().
|
protected |
Definition at line 83 of file cmd_option_list.h.
Referenced by clear(), get_ext_param(), and set_ext_param().
|
protected |
Definition at line 80 of file cmd_option_list.h.
Referenced by clear(), get(), init_key_value_map(), and reset_key_value_map().
|
protected |
Definition at line 81 of file cmd_option_list.h.
Referenced by add(), clear(), cmd_option_list(), get(), get_params_number(), init_key_value_map(), and operator[]().