MOAB: Mesh Oriented datABase  (version 5.3.1)
CLArgString Class Reference

#include <CLArgFlag.hpp>

+ Inheritance diagram for CLArgString:
+ Collaboration diagram for CLArgString:

Public Member Functions

 CLArgString (char fl, const char *name, const char *pdesc, CLArgs::StringArgI *pcallback)
virtual const CLArgs::ArgIBasecallback () const
virtual bool parse (const char *option) const
virtual std::string brief () const
virtual std::string manstr () const

Private Attributes

std::string mName
CLArgs::StringArgImCallback

Detailed Description

Definition at line 123 of file CLArgFlag.hpp.


Constructor & Destructor Documentation

CLArgString::CLArgString ( char  fl,
const char *  name,
const char *  pdesc,
CLArgs::StringArgI pcallback 
) [inline]

Definition at line 130 of file CLArgFlag.hpp.

        : CLArgFlag( fl, pdesc ), mName( name ), mCallback( pcallback )
    {
    }

Member Function Documentation

std::string CLArgString::brief ( ) const [virtual]

Get brief format of option

Implements CLArgFlag.

Definition at line 143 of file CLArgFlag.cpp.

References CLArgFlag::flag().

{
    std::ostringstream ss;
    ss << '-' << flag() << "  <" << mName << '>';
    return ss.str();
}
virtual const CLArgs::ArgIBase* CLArgString::callback ( ) const [inline, virtual]

Implements CLArgFlag.

Definition at line 135 of file CLArgFlag.hpp.

References mCallback.

    {
        return mCallback;
    }
std::string CLArgString::manstr ( ) const [virtual]

Get UNIX man-page formated synposis of flag

Implements CLArgFlag.

Definition at line 150 of file CLArgFlag.cpp.

{
    return make_man_string( mName.c_str() );
}
bool CLArgString::parse ( const char *  option) const [virtual]

Implements CLArgFlag.

Definition at line 155 of file CLArgFlag.cpp.

{
    if( !mCallback->value( option ) ) return false;
    mCallback->set_seen();
    return true;
}

Member Data Documentation

Definition at line 127 of file CLArgFlag.hpp.

Referenced by callback().

std::string CLArgString::mName [private]

Definition at line 126 of file CLArgFlag.hpp.

List of all members.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines