Zen
A cross-platform functional programming language

zbl::anonymous_namespace{CmdLine.hpp} Namespace Reference

Functions

template<typename T >
void setValue (const z::string &str, T &val)
 Partial template function to set the value of a variable from a string.
template<>
void setValue< bool > (const z::string &str, bool &val)
 Partial template function specialization to set the value of a boolean variable from a string.
template<>
void setValue< int > (const z::string &str, int &val)
 Partial template function specialization to set the value of an int variable from a string.
template<>
void setValue< z::string > (const z::string &str, z::string &val)
 Partial template function specialization to set the value of a string variable from a string.
template<>
void setValue< z::stringlist > (const z::string &str, z::stringlist &val)
 Partial template function specialization to append a string to a stringlist variable.
template<typename T >
bool shouldInc (const bool &val)
 Partial template function to check whether iterator should be incremented after parsing an argument.
template<>
bool shouldInc< bool > (const bool &val)
 Partial template function specialization to check whether iterator should be incremented after parsing a bool argument.

Function Documentation

void zbl::anonymous_namespace{CmdLine.hpp}::setValue ( const z::string str,
T &  val 
) [inline]

Partial template function to set the value of a variable from a string.

Parameters:
strThe string value
valThe actual value to set
void zbl::anonymous_namespace{CmdLine.hpp}::setValue< bool > ( const z::string str,
bool &  val 
) [inline]

Partial template function specialization to set the value of a boolean variable from a string.

Parameters:
strThe string value
valThe actual value to set
void zbl::anonymous_namespace{CmdLine.hpp}::setValue< int > ( const z::string str,
int &  val 
) [inline]

Partial template function specialization to set the value of an int variable from a string.

Parameters:
strThe string value
valThe actual value to set
void zbl::anonymous_namespace{CmdLine.hpp}::setValue< z::string > ( const z::string str,
z::string val 
) [inline]

Partial template function specialization to set the value of a string variable from a string.

Parameters:
strThe string value
valThe actual value to set
void zbl::anonymous_namespace{CmdLine.hpp}::setValue< z::stringlist > ( const z::string str,
z::stringlist val 
) [inline]

Partial template function specialization to append a string to a stringlist variable.

Parameters:
strThe string value
valThe actual value to set
bool zbl::anonymous_namespace{CmdLine.hpp}::shouldInc ( const bool &  val) [inline]

Partial template function to check whether iterator should be incremented after parsing an argument.

Parameters:
valThe initial value
Returns:
Same as val in all cases except bool
bool zbl::anonymous_namespace{CmdLine.hpp}::shouldInc< bool > ( const bool &  val) [inline]

Partial template function specialization to check whether iterator should be incremented after parsing a bool argument.

Parameters:
valThe initial value
Returns:
Always false
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines