Webmaster  |  Imprint 
C++ Server Pages
Main  |  License  |  Documentation  |  Download 

Arg< const char * > Class Template Reference

#include <cxxtools/arg.h>

List of all members.

Public Member Functions

 Arg (const char *def=0)
 Arg (int &argc, char *argv[], char ch, const char *def=0)
 Arg (int &argc, char *argv[], const char *str, const char *def=0)
 Arg (int &argc, char *argv[])
bool set (int &argc, char *argv[], char ch)
bool set (int &argc, char *argv[], const char *str, const char *def=0)
bool set (int &argc, char *argv[])
const char * getValue () const
 operator const char * () const
bool isSet () const


Detailed Description

template<>
class cxxtools::Arg< const char * >

Special handling for "const char*".

"const char*" is not extracted with a stream. This is more flexible and easier to process. Also parameters can contain spaces.


Member Function Documentation

bool set ( int &  argc,
char *  argv[],
char  ch 
)

Constructor for the short form.

bool set ( int &  argc,
char *  argv[],
const char *  str,
const char *  def = 0 
)

setter for the long form.

bool set ( int &  argc,
char *  argv[] 
)

Extracts the next parameter.

const char* getValue (  )  const

returns the extracted value.

operator const char * (  )  const

argument is convertible to "const char*"

bool isSet (  )  const

returns true, when the option is not set and the default is used.

Copyright © 2008 The Tntnet Development Team
Tntnet 1.6