TokDoc Module

Namespaces

namespace  common::tokdoc

Enumerations

enum  common::tokdoc::SUBNODE_COND { common::tokdoc::SUBNODE_OPTIONAL_CORRECT, common::tokdoc::SUBNODE_REQUIRED, common::tokdoc::SUBNODE_OPTIONAL }
 

Condition for SubnodeTo() telling about how to treat errors.

More...

Functions

template<typename T >
void common::tokdoc::NodeValueFromSth (Node &node, const T &val)
 Converts value of any type (supported by SthToStr) to string stored into Value of given node.
template<typename T >
bool common::tokdoc::NodeValueToSth (T &out, const Node &node, bool required)
 Parses string from Value of given node to value of any type (supported by StrToSth).
void common::tokdoc::NodeValueFromEnum (Node &node, uint val, const tchar *const *itemNames, const uint *itemValues, uint itemCount)
 Converts enumeration value (given as uint) into string with the value name stored into Value of given node.
bool common::tokdoc::NodeValueToEnum (uint &out, const Node &node, bool required, const tchar *const *itemNames, const uint *itemValues, uint itemCount)
 Parses string from Value of given node to enumeration value (given as uint&).
template<typename T >
void common::tokdoc::NodeFromVector (Node &node, const std::vector< T > &vec)
template<typename T >
bool common::tokdoc::NodeToVector (std::vector< T > &out, const Node &node, bool required)
bool common::tokdoc::_StrIsUintWithBase (const tstring &s)
template<typename T >
bool common::tokdoc::NodeValueToUint (T &out, const Node &node, bool required)
 Parses Value string of given node to unsigned integer of type T, while supporting standard numbers like "123" as well as hexadecimal notation like "0x123FF".
template<typename T , typename UT >
bool common::tokdoc::NodeValueToInt (T &out, const Node &node, bool required)
void common::tokdoc::NodeFrom (Node &node, bool val)
void common::tokdoc::NodeFrom (Node &node, tchar val)
void common::tokdoc::NodeFrom (Node &node, const tstring &val)
void common::tokdoc::NodeFrom (Node &node, const tchar *val)
void common::tokdoc::NodeFrom (Node &node, uint1 val)
void common::tokdoc::NodeFrom (Node &node, uint2 val)
void common::tokdoc::NodeFrom (Node &node, uint4 val)
void common::tokdoc::NodeFrom (Node &node, uint8 val)
void common::tokdoc::NodeFrom (Node &node, int2 val)
void common::tokdoc::NodeFrom (Node &node, int4 val)
void common::tokdoc::NodeFrom (Node &node, int8 val)
void common::tokdoc::NodeFrom (Node &node, unsigned long val)
void common::tokdoc::NodeFrom (Node &node, long val)
void common::tokdoc::NodeFrom (Node &node, float val)
void common::tokdoc::NodeFrom (Node &node, double val)
bool common::tokdoc::NodeTo (bool &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (tchar &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (tstring &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (uint1 &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (uint2 &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (uint4 &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (uint8 &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (unsigned long &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (int2 &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (int4 &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (int8 &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (long &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (float &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (double &out, const Node &node, bool required)
void common::tokdoc::NodeFrom (Node &node, GameTime val)
bool common::tokdoc::NodeTo (GameTime &out, const Node &node, bool required)
void common::tokdoc::NodeFrom (Node &node, const POINT_ &val)
void common::tokdoc::NodeFrom (Node &node, const RECTI &val)
void common::tokdoc::NodeFrom (Node &node, const VEC2 &val)
void common::tokdoc::NodeFrom (Node &node, const VEC3 &val)
void common::tokdoc::NodeFrom (Node &node, const VEC4 &val)
void common::tokdoc::NodeFrom (Node &node, COLOR val)
void common::tokdoc::NodeFrom (Node &node, const COLORF &val)
void common::tokdoc::NodeFrom (Node &node, const RECTF &val)
void common::tokdoc::NodeFrom (Node &node, const BOX &val)
void common::tokdoc::NodeFrom (Node &node, const QUATERNION &val)
void common::tokdoc::NodeFrom (Node &node, const MATRIX &val)
void common::tokdoc::NodeFrom (Node &node, const LINE2D &val)
void common::tokdoc::NodeFrom (Node &node, const PLANE &val)
bool common::tokdoc::NodeTo (POINT_ &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (RECTI &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (VEC2 &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (VEC3 &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (VEC4 &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (COLOR &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (COLORF &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (RECTF &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (BOX &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (QUATERNION &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (MATRIX &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (LINE2D &out, const Node &node, bool required)
bool common::tokdoc::NodeTo (PLANE &out, const Node &node, bool required)
template<typename T >
void common::tokdoc::SubnodeFrom (Node &node, const tstring &subnodeName, const T &val)
template<typename T >
bool common::tokdoc::SubnodeTo (T &out, const Node &node, const tstring &subnodeName, SUBNODE_COND required)

Detailed Description

Documentation: Module_TokDoc
Header: TokDoc.hpp


Enumeration Type Documentation

Condition for SubnodeTo() telling about how to treat errors.

Enumerator:
SUBNODE_OPTIONAL_CORRECT 

Optional, but must be correct if exists. Subnode not exists: return false. Parse error: throw exception.

SUBNODE_REQUIRED 

Strictly required. Subnode not exists or parse error: throw exception.

SUBNODE_OPTIONAL 

Libearlly optional. Subnode not exists or parse error: return false.


Function Documentation

bool common::tokdoc::_StrIsUintWithBase ( const tstring s  )  [inline]
void common::tokdoc::NodeFrom ( Node &  node,
const PLANE &  val 
)
void common::tokdoc::NodeFrom ( Node &  node,
const LINE2D &  val 
)
void common::tokdoc::NodeFrom ( Node &  node,
const MATRIX &  val 
)
void common::tokdoc::NodeFrom ( Node &  node,
const QUATERNION &  val 
)
void common::tokdoc::NodeFrom ( Node &  node,
const BOX &  val 
)
void common::tokdoc::NodeFrom ( Node &  node,
const RECTF &  val 
)
void common::tokdoc::NodeFrom ( Node &  node,
const COLORF &  val 
)
void common::tokdoc::NodeFrom ( Node &  node,
COLOR  val 
)
void common::tokdoc::NodeFrom ( Node &  node,
const VEC4 &  val 
)
void common::tokdoc::NodeFrom ( Node &  node,
const VEC3 &  val 
)
void common::tokdoc::NodeFrom ( Node &  node,
const VEC2 &  val 
)
void common::tokdoc::NodeFrom ( Node &  node,
const RECTI &  val 
)
void common::tokdoc::NodeFrom ( Node &  node,
const POINT_ &  val 
)
void common::tokdoc::NodeFrom ( Node &  node,
GameTime  val 
)
void common::tokdoc::NodeFrom ( Node &  node,
double  val 
) [inline]
void common::tokdoc::NodeFrom ( Node &  node,
float  val 
) [inline]
void common::tokdoc::NodeFrom ( Node &  node,
long  val 
) [inline]
void common::tokdoc::NodeFrom ( Node &  node,
unsigned long  val 
) [inline]
void common::tokdoc::NodeFrom ( Node &  node,
int8  val 
) [inline]
void common::tokdoc::NodeFrom ( Node &  node,
int4  val 
) [inline]
void common::tokdoc::NodeFrom ( Node &  node,
int2  val 
) [inline]
void common::tokdoc::NodeFrom ( Node &  node,
uint8  val 
) [inline]
void common::tokdoc::NodeFrom ( Node &  node,
uint4  val 
) [inline]
void common::tokdoc::NodeFrom ( Node &  node,
uint2  val 
) [inline]
void common::tokdoc::NodeFrom ( Node &  node,
uint1  val 
) [inline]
void common::tokdoc::NodeFrom ( Node &  node,
const tchar val 
) [inline]
void common::tokdoc::NodeFrom ( Node &  node,
const tstring val 
) [inline]
void common::tokdoc::NodeFrom ( Node &  node,
tchar  val 
) [inline]
void common::tokdoc::NodeFrom ( Node &  node,
bool  val 
) [inline]
template<typename T >
void common::tokdoc::NodeFromVector ( Node &  node,
const std::vector< T > &  vec 
) [inline]
bool common::tokdoc::NodeTo ( PLANE &  out,
const Node &  node,
bool  required 
)
bool common::tokdoc::NodeTo ( LINE2D &  out,
const Node &  node,
bool  required 
)
bool common::tokdoc::NodeTo ( MATRIX &  out,
const Node &  node,
bool  required 
)
bool common::tokdoc::NodeTo ( QUATERNION &  out,
const Node &  node,
bool  required 
)
bool common::tokdoc::NodeTo ( BOX &  out,
const Node &  node,
bool  required 
)
bool common::tokdoc::NodeTo ( RECTF &  out,
const Node &  node,
bool  required 
)
bool common::tokdoc::NodeTo ( COLORF &  out,
const Node &  node,
bool  required 
)
bool common::tokdoc::NodeTo ( COLOR &  out,
const Node &  node,
bool  required 
)
bool common::tokdoc::NodeTo ( VEC4 &  out,
const Node &  node,
bool  required 
)
bool common::tokdoc::NodeTo ( VEC3 &  out,
const Node &  node,
bool  required 
)
bool common::tokdoc::NodeTo ( VEC2 &  out,
const Node &  node,
bool  required 
)
bool common::tokdoc::NodeTo ( RECTI &  out,
const Node &  node,
bool  required 
)
bool common::tokdoc::NodeTo ( POINT_ &  out,
const Node &  node,
bool  required 
)
bool common::tokdoc::NodeTo ( GameTime &  out,
const Node &  node,
bool  required 
)
bool common::tokdoc::NodeTo ( double &  out,
const Node &  node,
bool  required 
) [inline]
bool common::tokdoc::NodeTo ( float &  out,
const Node &  node,
bool  required 
) [inline]
bool common::tokdoc::NodeTo ( long &  out,
const Node &  node,
bool  required 
) [inline]
bool common::tokdoc::NodeTo ( int8 out,
const Node &  node,
bool  required 
) [inline]
bool common::tokdoc::NodeTo ( int4 out,
const Node &  node,
bool  required 
) [inline]
bool common::tokdoc::NodeTo ( int2 out,
const Node &  node,
bool  required 
) [inline]
bool common::tokdoc::NodeTo ( unsigned long &  out,
const Node &  node,
bool  required 
) [inline]
bool common::tokdoc::NodeTo ( uint8 out,
const Node &  node,
bool  required 
) [inline]
bool common::tokdoc::NodeTo ( uint4 out,
const Node &  node,
bool  required 
) [inline]
bool common::tokdoc::NodeTo ( uint2 out,
const Node &  node,
bool  required 
) [inline]
bool common::tokdoc::NodeTo ( uint1 out,
const Node &  node,
bool  required 
) [inline]
bool common::tokdoc::NodeTo ( tstring out,
const Node &  node,
bool  required 
) [inline]
bool common::tokdoc::NodeTo ( tchar out,
const Node &  node,
bool  required 
) [inline]
bool common::tokdoc::NodeTo ( bool &  out,
const Node &  node,
bool  required 
) [inline]
template<typename T >
bool common::tokdoc::NodeToVector ( std::vector< T > &  out,
const Node &  node,
bool  required 
) [inline]
void common::tokdoc::NodeValueFromEnum ( Node &  node,
uint  val,
const tchar *const *  itemNames,
const uint itemValues,
uint  itemCount 
)

Converts enumeration value (given as uint) into string with the value name stored into Value of given node.

If val is other than values of items given, val is converted to numeric string, like "123".

Parameters:
itemValues Can be NULL, which means consecutive items have values 0, 1, 2, ...
template<typename T >
void common::tokdoc::NodeValueFromSth ( Node &  node,
const T &  val 
) [inline]

Converts value of any type (supported by SthToStr) to string stored into Value of given node.

bool common::tokdoc::NodeValueToEnum ( uint out,
const Node &  node,
bool  required,
const tchar *const *  itemNames,
const uint itemValues,
uint  itemCount 
)

Parses string from Value of given node to enumeration value (given as uint&).

node.Value may be one of given item names or a numeric string, like "123".

Parameters:
itemValues Can be NULL, which means consecutive items have values 0, 1, 2, ...
template<typename T , typename UT >
bool common::tokdoc::NodeValueToInt ( T &  out,
const Node &  node,
bool  required 
) [inline]
template<typename T >
bool common::tokdoc::NodeValueToSth ( T &  out,
const Node &  node,
bool  required 
) [inline]

Parses string from Value of given node to value of any type (supported by StrToSth).

template<typename T >
bool common::tokdoc::NodeValueToUint ( T &  out,
const Node &  node,
bool  required 
) [inline]

Parses Value string of given node to unsigned integer of type T, while supporting standard numbers like "123" as well as hexadecimal notation like "0x123FF".

template<typename T >
void common::tokdoc::SubnodeFrom ( Node &  node,
const tstring subnodeName,
const T &  val 
) [inline]
template<typename T >
bool common::tokdoc::SubnodeTo ( T &  out,
const Node &  node,
const tstring subnodeName,
SUBNODE_COND  required 
) [inline]

Generated on Wed Dec 16 20:44:53 2009 for CommonLib by  doxygen 1.6.1