MOAB: Mesh Oriented datABase
(version 5.4.1)
|
#include <CLArgFlag.hpp>
Public Member Functions | |
bool | add_set (int size, const char *const *names) |
bool | acceptable_length (unsigned len) const |
bool | accept_any_length () const |
std::string | set_string (int set) const |
std::string | brief () const |
std::string | manstr (char type_char, const CLArgFlag &f) const |
Private Attributes | |
std::vector< std::vector < std::string > > | mSets |
Definition at line 237 of file CLArgFlag.hpp.
bool CLArgListData::accept_any_length | ( | ) | const [inline] |
bool CLArgListData::acceptable_length | ( | unsigned | len | ) | const |
bool CLArgListData::add_set | ( | int | size, |
const char *const * | names | ||
) |
Definition at line 310 of file CLArgFlag.cpp.
Referenced by CLArgIntList::add_set(), and CLArgDoubleList::add_set().
std::string CLArgListData::brief | ( | ) | const |
Definition at line 338 of file CLArgFlag.cpp.
{ if( mSets.empty() ) return std::string(); std::ostringstream result; for( unsigned i = 0; i < mSets.size(); ++i ) { if( i ) result << '|'; result << '{' << set_string( i ) << "}"; } return result.str(); }
std::string CLArgListData::manstr | ( | char | type_char, |
const CLArgFlag & | f | ||
) | const |
Definition at line 351 of file CLArgFlag.cpp.
{ if( mSets.empty() ) { const char argstr[] = { type_char, '1', ',', type_char, '2', ',', '.', '.', '.', '\0' }; return f.make_man_string( argstr ); } else { const char flagstr[] = { '-', f.flag(), '\0' }; std::ostringstream ss; for( unsigned i = 0; i < mSets.size(); ++i ) { if( i ) ss << "|"; ManPage::begin_bold( ss ); ss << flagstr; ManPage::end_bold( ss ); ss << "<" << set_string( i ) << ">"; } return ss.str(); } }
std::string CLArgListData::set_string | ( | int | set | ) | const |
Definition at line 327 of file CLArgFlag.cpp.
std::vector< std::vector< std::string > > CLArgListData::mSets [private] |
Definition at line 239 of file CLArgFlag.hpp.
Referenced by accept_any_length().