7 #ifndef _COMMAND_LINE_CLASS_HEADER_
8 #define _COMMAND_LINE_CLASS_HEADER_
char tChar
The tChar defines the type for platform character set (platform and compiler dependent type).
int tInt
type definition for signed integer value (platform and compiler dependent type).
bool tBool
The tBool defines the type for the Values tTrue and tFalse (platform and compiler dependent).
cCommandLine(const cString &strCommandLine)
Constructor that parses a given command line string.
const cStringList & GetValues() const
Returns a list of all specified values.
cCommandLine & operator=(const cCommandLine &oCommandLine)
Assignment operator.
virtual ~cCommandLine()
Destructor.
tResult Set(const cCommandLine &oCommandLine)
Copy data from another command line objects.
tResult Set(int argc, const char **argv)
Set data using standard commandline parameters.
const tChar ** m_pArgv
Argument pointer.
cString GetValue(tInt nIdx, const cString &strDefault=cString::Empty) const
Returns a command line parameter that is no flag or property.
cCommandLine()
Default constructor.
cStringList m_lstValues
List of values.
const cString & GetBuffer() const
Returns a reference to the internal commandline buffer.
const cStringMap & GetProperties() const
Returns a map of all specified properties.
cCommandLine(const cCommandLine &oCommandLine)
Copy constructor.
tBool GetFlag(const cString &strName) const
Returns whether a flag (-flagname) was specified or not.
cString GetString() const
Builds a command line string by concatenating all parameters.
const cStringList & GetFlags() const
Returns a list of all specified flags.
tInt GetArgc() const
Returns the size of the array retreived by GetArgv().
tResult FreeArgs()
Frees the argument list.
cString GetArg(tInt nIdx, const cString &strDefault=cString::Empty) const
Returns a command line argument.
cString m_strBuffer
Internal buffer.
tInt m_nArgc
Argument count.
const tChar ** GetArgv() const
Returns a pointer to a standard style command line parameter array.
tResult Parse()
Parses the internal buffer.
cStringMap m_mapProperties
Property map of the commandline.
tResult Initialize()
Initializes internal parameters.
std::list< cString > m_lstArgv
Argument list.
cCommandLine(int argc, const char **argv)
Constructor for standard commandline parameters.
cStringList m_lstFlags
List of flags.
tResult Set(const cString &strCommandLine)
Parses a given command line string.
cString GetProperty(const cString &strName, const cString &strDefault=cString::Empty) const
Returns a property (-propertyname=value).
A common result class usable as return value throughout.
static const _myType Empty
Internally used empty string.
#define A_UTILS_D(__pclassname_)
Helper macro for d-pattern definitions.
ADTF A_UTIL Namespace - Within adtf this is used as adtf::util or adtf_util.