PixelLightAPI  .
Static Public Member Functions
PLCore::ParseTools Class Reference

Static class with some useful string parse tool functions. More...

#include <ParseTools.h>

List of all members.

Static Public Member Functions

static PLCORE_API uint32 ParseHexValue (const String &sString)
 Parse string containing a hex value to an integer (for example "FF" => "255")
static PLCORE_API int ParseIntegerArray (const String &sString, int *pnValues, uint32 nMaxNumOfElements)
 Parse an array of integer values.
static PLCORE_API int ParseFloatArray (const String &sString, float *pfValues, uint32 nMaxNumOfElements)
 Parse an array of float values.
static PLCORE_API int ParseDoubleArray (const String &sString, double *pdValues, uint32 nMaxNumOfElements)
 Parse an array of double values.
static PLCORE_API uint32 GetFlagsFromString (const String &sFlags)
 Returns the flags from a string.
static PLCORE_API String GetStringFromFlags (uint32 nFlags)
 Creates a string from flags.

Detailed Description

Static class with some useful string parse tool functions.


Member Function Documentation

static PLCORE_API uint32 PLCore::ParseTools::ParseHexValue ( const String sString) [static]

Parse string containing a hex value to an integer (for example "FF" => "255")

Parameters:
[in]sStringString containing a hex value
Returns:
Integer representation of the given hex value
static PLCORE_API int PLCore::ParseTools::ParseIntegerArray ( const String sString,
int *  pnValues,
uint32  nMaxNumOfElements 
) [static]

Parse an array of integer values.

Parameters:
[in]sStringString containing integer numbers
[out]pnValuesPointer to C-array which will receive the integer values, if a null pointer nothing happens
[in]nMaxNumOfElementsThe maximum number of elements 'nValues' can hold
Returns:
The number of read values
Note:
  • Example string with three values: "0 5 34"
static PLCORE_API int PLCore::ParseTools::ParseFloatArray ( const String sString,
float *  pfValues,
uint32  nMaxNumOfElements 
) [static]

Parse an array of float values.

Parameters:
[in]sStringString containing floating point numbers
[out]pfValuesPointer to C-array which will receive the float values, if a null pointer nothing happens
[in]nMaxNumOfElementsThe maximum number of elements 'fValues' can hold
Returns:
The number of read values
Note:
  • Example string with three values: "0 0.0 34.245"
static PLCORE_API int PLCore::ParseTools::ParseDoubleArray ( const String sString,
double *  pdValues,
uint32  nMaxNumOfElements 
) [static]

Parse an array of double values.

Parameters:
[in]sStringString containing double precision floating point numbers
[out]pdValuesPointer to C-array which will receive the double values, if a null pointer nothing happens
[in]nMaxNumOfElementsThe maximum number of elements 'dValues' can hold
Returns:
The number of read values
Note:
  • Example string with three values: "0 0.0 34.245"
static PLCORE_API uint32 PLCore::ParseTools::GetFlagsFromString ( const String sFlags) [static]

Returns the flags from a string.

Parameters:
[in]sFlagsString containing flags
Returns:
The flags from the string
Remarks:
Flags can be stored in strings too. (easy to edit :)
Example: "1|2|4|8"
static PLCORE_API String PLCore::ParseTools::GetStringFromFlags ( uint32  nFlags) [static]

Creates a string from flags.

Parameters:
[in]nFlagsFlags value
Returns:
String containing the flags in textual form
See also:

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


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:15
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported