Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

IDEA::PlasmaCommandLineParser Class Reference

#include <PlasmaCommandLineParserImpl.hh>

Inheritance diagram for IDEA::PlasmaCommandLineParser:

IDEA::CommandLineParser List of all members.

Public Methods

 PlasmaCommandLineParser ()
 ~PlasmaCommandLineParser ()
bool getXIDDLLibraryName (std::string &name) const
 Returns the dynamic library name created out of the XIDDL-model to be loaded at run-time containing the EUROPA::Schema information.

void usage (std::ostream &os) const
 Streams the usage of each option registered to the invoking class to os.

bool verify ()
 Returns true if all mandatory options are in the argv char array passed in the constructor (does not do type checking of the arguments). Otherwise returns false.


Protected Methods

bool getOption (int shortOptionChar, std::string &value) const
 Returns true if a commandline option shortOptionChar is present in argv char array and will populate value with the value if the commandline option has an argument. Otherwise will return false.

bool getOptions (int shortOptionChar, StringList &value) const
 Returns true if at least one commandline option shortOptionChar is present in argv char array and will populate value with all the values if the commandline option has an argument. Otherwise will return false.

bool registerOption (int shortOptionChar, bool hasArgument, bool mandatory, const std::string &usage, const StringList &possibleArguments=StringList())
 Registers the command-line option shortOptionChar have an argument if hasArgument is true, must be passed as an argumen if mandatory is true (see verify() ), with usage string usage (see usage() ) and if provided limited to the possible arguments possibleArguments.


Private Attributes

std::string m_XIDDLLibraryName

Constructor & Destructor Documentation

IDEA::PlasmaCommandLineParser::PlasmaCommandLineParser  
 

IDEA::PlasmaCommandLineParser::~PlasmaCommandLineParser  
 


Member Function Documentation

bool IDEA::CommandLineParser::getOption int    shortOptionChar,
std::string &    value
const [protected, inherited]
 

Returns true if a commandline option shortOptionChar is present in argv char array and will populate value with the value if the commandline option has an argument. Otherwise will return false.

bool IDEA::CommandLineParser::getOptions int    shortOptionChar,
StringList   value
const [protected, inherited]
 

Returns true if at least one commandline option shortOptionChar is present in argv char array and will populate value with all the values if the commandline option has an argument. Otherwise will return false.

bool IDEA::PlasmaCommandLineParser::getXIDDLLibraryName std::string &    name const
 

Returns the dynamic library name created out of the XIDDL-model to be loaded at run-time containing the EUROPA::Schema information.

bool IDEA::CommandLineParser::registerOption int    shortOptionChar,
bool    hasArgument,
bool    mandatory,
const std::string &    usage,
const StringList   possibleArguments = StringList()
[protected, inherited]
 

Registers the command-line option shortOptionChar have an argument if hasArgument is true, must be passed as an argumen if mandatory is true (see verify() ), with usage string usage (see usage() ) and if provided limited to the possible arguments possibleArguments.

Will return true if arguments passed to this method can be accepted otherwise false. Command-line options can not be accepted if:

  • A command-line option with shortOptionChar already exists
  • hasArgument is true and possibleArguments is not empty

void IDEA::CommandLineParser::usage std::ostream &    os const [inherited]
 

Streams the usage of each option registered to the invoking class to os.

bool IDEA::CommandLineParser::verify   [inherited]
 

Returns true if all mandatory options are in the argv char array passed in the constructor (does not do type checking of the arguments). Otherwise returns false.


Member Data Documentation

std::string IDEA::PlasmaCommandLineParser::m_XIDDLLibraryName [private]
 


Contact information
© IDEA
Generated on Fri Feb 3 17:09:46 2006 for IDEA.