HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
hboost::program_options::fixedSizeTypedValue< T, charT > Class Template Reference

#include <UT_ProgramOptions.h>

+ Inheritance diagram for hboost::program_options::fixedSizeTypedValue< T, charT >:

Public Member Functions

 fixedSizeTypedValue (T *t, uint min, uint max=0)
 
uint min_tokens () const overridefinal
 
uint max_tokens () const overridefinal
 

Detailed Description

template<typename T, typename charT = char>
class hboost::program_options::fixedSizeTypedValue< T, charT >

Class to implement a multi-token with a fixed number of arguments. Instead of having a multitoken() parameter which can take any number of arguments, this can be used to limit the number of arguments to a fixed range. Example usage:

// A fixed vector of 2 integers
( "res,r", fixedSizeMultiToken<std::vector<int>>(2) )
// A fixed vector of 2 strings
( "colorspace", fixedSizeMultiToken<std::vector<std::string>>(2) )
// A fixed vector of 3 floats
( "position-xyz", fixedSizeMultiToken<std::vector<fpreal>>(3) )
// Allow 2 or 3 arguments
( "uv", fixedSizeMultiToken<std::vector<fpreal>>(2, 3) )

Definition at line 38 of file UT_ProgramOptions.h.

Constructor & Destructor Documentation

template<typename T, typename charT = char>
hboost::program_options::fixedSizeTypedValue< T, charT >::fixedSizeTypedValue ( T *  t,
uint  min,
uint  max = 0 
)
inline

Definition at line 42 of file UT_ProgramOptions.h.

Member Function Documentation

template<typename T, typename charT = char>
uint hboost::program_options::fixedSizeTypedValue< T, charT >::max_tokens ( ) const
inlinefinaloverride

Definition at line 50 of file UT_ProgramOptions.h.

template<typename T, typename charT = char>
uint hboost::program_options::fixedSizeTypedValue< T, charT >::min_tokens ( ) const
inlinefinaloverride

Definition at line 49 of file UT_ProgramOptions.h.


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