![]() |
MDSTk Libraries
1.1.0
Medical Data Segmentation Toolkit
|
Application command line arguments parser. More...
#include <mdsArgv.h>

Public Types | |
| enum | { CLASS_OBJECT } |
| Templates that require members of the CObject class can use this enum to check the existence. More... | |
| enum | { HEAP_OBJECT = 0x70616568 } |
| Signature used to recognize objects on the heap. More... | |
Public Member Functions | |
| CArgv () | |
| Default constructor. | |
| CArgv (int argc, char *argv[]) | |
| Constructor that parses a given command line. | |
| bool | check (const std::string &sArgs) const |
| Checks if only specified labelled arguments were given on the command line. | |
| void | clear () |
| Clears parsed command line. | |
| bool | exists (const std::string &sLabel) const |
| Returns true if a labelled argument exists. | |
| int | getNumOfSimpleValues () const |
| Returns the number of string arguments at the end of the command line. | |
| int | getNumOfValues () const |
| Returns the number of labelled arguments. | |
| int | getReferencesCount () const |
| Returns the number of references. | |
| bool | isOnHeap () const |
| Returns true if the object is allocated on the heap. | |
| MDS_SHAREDPTR (CArgv) | |
| Smart pointer type. | |
| bool | parse (int argc, char *argv[]) |
| Parses a given command line. | |
| bool | simpleValue (int i, std::string &sValue) const |
| Reads the string value of a simple argument. | |
| bool | value (const std::string &sLabel, std::string &sValue) const |
| Reads the value of a labeled argument of appropriate type. | |
| bool | value (const std::string &sLabel, char &cValue) const |
| bool | value (const std::string &sLabel, unsigned &uValue) const |
| bool | value (const std::string &sLabel, int &iValue) const |
| bool | value (const std::string &sLabel, double &dValue) const |
| virtual | ~CArgv () |
| Default destructor. | |
Static Public Member Functions | |
| static void * | operator new (std::size_t Size) |
| Allocates a new object on the heap. | |
Protected Member Functions | |
| void | addReference () const |
| Increase the reference counter. | |
| bool | delReference () const |
| Decrease the reference counter. | |
Protected Attributes | |
| int | m_iHeapObject |
| Flag initialized if the object is on the heap. | |
| int | m_iReferences |
| The number of references to the object. | |
Application command line arguments parser.
anonymous enum [inherited] |
Templates that require members of the CObject class can use this enum to check the existence.
Default constructor.
| mds::mod::CArgv::CArgv | ( | int | argc, |
| char * | argv[] | ||
| ) |
Constructor that parses a given command line.
| mds::mod::CArgv::~CArgv | ( | ) | [virtual] |
Default destructor.
| void mds::base::CObject::addReference | ( | ) | const [protected, inherited] |
Increase the reference counter.
| bool mds::mod::CArgv::check | ( | const std::string & | sArgs | ) | const |
Checks if only specified labelled arguments were given on the command line.
| void mds::mod::CArgv::clear | ( | ) |
Clears parsed command line.
| bool mds::base::CObject::delReference | ( | ) | const [protected, inherited] |
Decrease the reference counter.
| bool mds::mod::CArgv::exists | ( | const std::string & | sLabel | ) | const |
Returns true if a labelled argument exists.
| int mds::mod::CArgv::getNumOfSimpleValues | ( | ) | const |
Returns the number of string arguments at the end of the command line.
| int mds::mod::CArgv::getNumOfValues | ( | ) | const |
Returns the number of labelled arguments.
| int mds::base::CObject::getReferencesCount | ( | ) | const [inherited] |
Returns the number of references.
| bool mds::base::CObject::isOnHeap | ( | ) | const [inherited] |
Returns true if the object is allocated on the heap.
Smart pointer type.
| static void* mds::base::CObject::operator new | ( | std::size_t | Size | ) | [static, inherited] |
Allocates a new object on the heap.
| bool mds::mod::CArgv::parse | ( | int | argc, |
| char * | argv[] | ||
| ) |
Parses a given command line.
| bool mds::mod::CArgv::simpleValue | ( | int | i, |
| std::string & | sValue | ||
| ) | const |
Reads the string value of a simple argument.
| bool mds::mod::CArgv::value | ( | const std::string & | sLabel, |
| std::string & | sValue | ||
| ) | const |
Reads the value of a labeled argument of appropriate type.
| bool mds::mod::CArgv::value | ( | const std::string & | sLabel, |
| char & | cValue | ||
| ) | const |
| bool mds::mod::CArgv::value | ( | const std::string & | sLabel, |
| unsigned & | uValue | ||
| ) | const |
| bool mds::mod::CArgv::value | ( | const std::string & | sLabel, |
| int & | iValue | ||
| ) | const |
| bool mds::mod::CArgv::value | ( | const std::string & | sLabel, |
| double & | dValue | ||
| ) | const |
int mds::base::CObject::m_iHeapObject [mutable, protected, inherited] |
Flag initialized if the object is on the heap.
int mds::base::CObject::m_iReferences [mutable, protected, inherited] |
The number of references to the object.
1.7.6.1