Simple++
Powerfull and lightning fast C++ Library
Public Member Functions | List of all members
Application< T > Class Template Reference

Application Class for easy access to args. More...

#include <Application.h>

Public Member Functions

 Application ()
 Create an empty Application Class without any args. More...
 
 Application (int argc, T *argv[])
 Create an Application with args (one character arg should be preceded by an "-" and multiple characters args with "--") More...
 
 ~Application ()
 destructor More...
 
const BasicString< T > * operator[] (const BasicString< T > &argName) const
 Operator [] to access an arg using his name. More...
 
const BasicString< T > & getApplicationName () const
 get the application name (argv[0]) More...
 
const T ** getArgv () const
 Direct access to the argv table. More...
 
int getArgc () const
 get the size of the argv table. More...
 
const Map< BasicString< T >, BasicString< T > > & getArgMap () const
 Direct Access to the args Map. More...
 

Detailed Description

template<typename T>
class Application< T >

Application Class for easy access to args.

Constructor & Destructor Documentation

template<typename T >
Application< T >::Application ( )

Create an empty Application Class without any args.

template<typename T >
Application< T >::Application ( int  argc,
T *  argv[] 
)

Create an Application with args (one character arg should be preceded by an "-" and multiple characters args with "--")

Parameters
argcNumber of args (size of the argv table)
argvvalues of args
template<typename T >
Application< T >::~Application ( )

destructor

Member Function Documentation

template<typename T >
const BasicString< T > & Application< T >::getApplicationName ( ) const

get the application name (argv[0])

Returns
Name of this application
template<typename T >
int Application< T >::getArgc ( ) const

get the size of the argv table.

Returns
size of the argv table.
template<typename T >
const Map< BasicString< T >, BasicString< T > > & Application< T >::getArgMap ( ) const

Direct Access to the args Map.

Returns
Map with all the arguments (Index -> Value)
template<typename T >
const T ** Application< T >::getArgv ( ) const

Direct access to the argv table.

Returns
argv table without any modification.
template<typename T >
const BasicString< T > * Application< T >::operator[] ( const BasicString< T > &  argName) const

Operator [] to access an arg using his name.

Parameters
argNameName of the arg to retrieve.
Returns
Pointer to the string representing the value of the arg.

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