Public Member Functions | Private Attributes

cmtk::CommandLine::Vector< T > Class Template Reference

Command line option with vector argument. More...

Inheritance diagram for cmtk::CommandLine::Vector< T >:
Inheritance graph
[legend]
Collaboration diagram for cmtk::CommandLine::Vector< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Vector (std::vector< T > &vector)
 Constructor.
virtual ~Vector ()
 Virtual destructor.
virtual void Evaluate (const size_t argc, const char *argv[], size_t &index)
 Evaluate and set associated option.
virtual mxml_node_t * MakeXML (mxml_node_t *const parent) const
 Virtual function that returns an XML tree describing this option.
virtual std::string GetParamTypeString () const
 Return a textual description of the parameter associated with this option.

Private Attributes

std::vector< T > * m_pVector
 Pointer to associated variable.
bool m_HasBeenUsed
 Has this vector option been used already? This is so we clear the vector exactly once.

Detailed Description

template<class T>
class cmtk::CommandLine::Vector< T >

Command line option with vector argument.

Note:
For backward compatibility, repeated use of a vector option appends the subsequent vector elements onto the previously set ones. That is, the vector is only cleared upon the first option use, to remove potentially present default elements.

Definition at line 492 of file cmtkCommandLine.h.


Constructor & Destructor Documentation

template<class T >
cmtk::CommandLine::Vector< T >::Vector ( std::vector< T > &  vector ) [inline]

Constructor.

Definition at line 498 of file cmtkCommandLine.h.

template<class T >
virtual cmtk::CommandLine::Vector< T >::~Vector (  ) [inline, virtual]

Virtual destructor.

Definition at line 501 of file cmtkCommandLine.h.


Member Function Documentation

template<class T >
void cmtk::CommandLine::Vector< T >::Evaluate ( const size_t  argc,
const char *  argv[],
size_t &  index 
) [virtual]

Evaluate and set associated option.

Implements cmtk::CommandLine::Item.

Definition at line 37 of file cmtkCommandLineVector.txx.

template<class T >
std::string cmtk::CommandLine::Vector< T >::GetParamTypeString (  ) const [virtual]

Return a textual description of the parameter associated with this option.

Reimplemented from cmtk::CommandLine::Item.

Definition at line 98 of file cmtkCommandLineVector.txx.

template<class T >
mxml_node_t * cmtk::CommandLine::Vector< T >::MakeXML ( mxml_node_t *const   parent ) const [virtual]

Virtual function that returns an XML tree describing this option.

Implements cmtk::CommandLine::Item.

Definition at line 75 of file cmtkCommandLineVector.txx.

References NULL.


Member Data Documentation

template<class T >
bool cmtk::CommandLine::Vector< T >::m_HasBeenUsed [private]

Has this vector option been used already? This is so we clear the vector exactly once.

Definition at line 517 of file cmtkCommandLine.h.

template<class T >
std::vector<T>* cmtk::CommandLine::Vector< T >::m_pVector [private]

Pointer to associated variable.

Definition at line 514 of file cmtkCommandLine.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines