Qualia  0.2
Public Member Functions | Public Attributes | List of all members
IntCmdOption Class Reference

#include <CmdOption.h>

Inheritance diagram for IntCmdOption:
Inheritance graph
[legend]
Collaboration diagram for IntCmdOption:
Collaboration graph
[legend]

Public Member Functions

 IntCmdOption (const char *name_, int *ptr_, int init_value_, const char *help_="", bool save_=false)
 
virtual void initValue ()
 Initialize the value of the option. More...
 
virtual void printValue (DiskXFile *file_)
 If is_setted# is true, print the current value, else the init value. More...
 
virtual void read (int *argc_, char ***argv_)
 
virtual void load (DiskXFile *file)
 
virtual void save (DiskXFile *file)
 
 ~IntCmdOption ()
 
- Public Member Functions inherited from CmdOption
 CmdOption (const char *name_, const char *type_name_, const char *help_="", bool save_=false)
 
bool isCurrent (int *argc_, char ***argv_)
 
bool isOption (bool set_=false)
 
bool isArgument (bool set_=false)
 
bool isText (bool set_=false)
 
bool isMasterSwitch (bool set_=false)
 
virtual ~CmdOption ()
 

Public Attributes

int * ptr
 
int init_value
 
- Public Attributes inherited from CmdOption
char * name
 Name of the option. More...
 
char * type_name
 Type name of the option. More...
 
char * help
 
bool needsSave
 
bool is_setted
 

Detailed Description

This class defines a integer command-line option.

Author
Ronan Collobert (collo.nosp@m.ber@.nosp@m.idiap.nosp@m..ch)
See Also
CmdLine

Constructor & Destructor Documentation

IntCmdOption::IntCmdOption ( const char *  name_,
int *  ptr_,
int  init_value_,
const char *  help_ = "",
bool  save_ = false 
)
IntCmdOption::~IntCmdOption ( )

Member Function Documentation

void IntCmdOption::initValue ( )
virtual

Initialize the value of the option.

Reimplemented from CmdOption.

void IntCmdOption::load ( DiskXFile file)
virtual

Reimplemented from CmdOption.

void IntCmdOption::printValue ( DiskXFile file_)
virtual

If is_setted# is true, print the current value, else the init value.

Reimplemented from CmdOption.

void IntCmdOption::read ( int *  argc_,
char ***  argv_ 
)
virtual

Read the option on the command line. argv_ and argc_ have to point of the next option after that.

Reimplemented from CmdOption.

void IntCmdOption::save ( DiskXFile file)
virtual

Reimplemented from CmdOption.

Member Data Documentation

int IntCmdOption::init_value
int* IntCmdOption::ptr

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