MOAB: Mesh Oriented datABase  (version 5.4.1)
CLArgs::ArgIBase Class Reference

Base class for callback interface (type-independent functions) More...

#include <CLArgs.hpp>

+ Inheritance diagram for CLArgs::ArgIBase:

Public Member Functions

 ArgIBase ()
 constructor
virtual ~ArgIBase ()
 virtual destructor for proper cleanup
virtual std::string brief () const
 Get short description string for usage output or empty string for default.
virtual std::string manstr () const
 Get short description string for UNIX man page output or empty string for default.
virtual std::string desc_append () const
 Get optional additional info to print with flag description.
virtual std::string default_str () const
 Get optional string containing default value for option if not specified by user.
void set_seen ()
 Mark this flag as having been specified by the user.
bool seen () const
 Test if the user specified this flag.

Private Attributes

bool wasSeen
 Keep track of whether or not this flag was encountered.

Detailed Description

Base class for callback interface (type-independent functions)

Definition at line 68 of file CLArgs.hpp.


Constructor & Destructor Documentation

constructor

Definition at line 73 of file CLArgs.hpp.

virtual CLArgs::ArgIBase::~ArgIBase ( ) [inline, virtual]

virtual destructor for proper cleanup

Definition at line 74 of file CLArgs.hpp.


Member Function Documentation

virtual std::string CLArgs::ArgIBase::brief ( ) const [inline, virtual]

Get short description string for usage output or empty string for default.

Reimplemented in CLArgs::KeyWordArg.

Definition at line 76 of file CLArgs.hpp.

        {
            return std::string();
        }
virtual std::string CLArgs::ArgIBase::default_str ( ) const [inline, virtual]

Get optional string containing default value for option if not specified by user.

Reimplemented in CLArgs::ArgListTemplate< T >, and CLArgs::ArgTemplate< T >.

Definition at line 93 of file CLArgs.hpp.

        {
            return std::string();
        }
virtual std::string CLArgs::ArgIBase::desc_append ( ) const [inline, virtual]

Get optional additional info to print with flag description.

Reimplemented in CLArgs::DoubleListRangeArg, CLArgs::DoubleRangeArg, CLArgs::IntListRangeArg, and CLArgs::IntRangeArg.

Definition at line 87 of file CLArgs.hpp.

        {
            return std::string();
        }
virtual std::string CLArgs::ArgIBase::manstr ( ) const [inline, virtual]

Get short description string for UNIX man page output or empty string for default.

Reimplemented in CLArgs::KeyWordArg.

Definition at line 82 of file CLArgs.hpp.

        {
            return std::string();
        }
bool CLArgs::ArgIBase::seen ( ) const [inline]

Test if the user specified this flag.

Definition at line 103 of file CLArgs.hpp.

References wasSeen.

Referenced by main().

        {
            return wasSeen;
        }
void CLArgs::ArgIBase::set_seen ( ) [inline]

Mark this flag as having been specified by the user.

Definition at line 98 of file CLArgs.hpp.

References wasSeen.

Referenced by CLArgToggle::parse(), CLArgs::ArgTemplate< T >::value(), and CLArgs::ArgListTemplate< T >::value().

        {
            wasSeen = true;
        }

Member Data Documentation

bool CLArgs::ArgIBase::wasSeen [private]

Keep track of whether or not this flag was encountered.

Definition at line 71 of file CLArgs.hpp.

Referenced by seen(), and set_seen().

List of all members.


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