BusBoy  2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | List of all members
BUSBOY::Primitive Class Reference

Enumeration and utilities for the primitive types in fields and arrays. More...

#include <Primitive.h>

Public Types

enum  Type {
  BOOLEAN, BYTE, INTEGER, FLOAT,
  DOUBLE, STRING, SIZE_T, LONG_DOUBLE
}
 

Public Member Functions

template<typename T >
std::string toString (const T &val)
 
template<typename T >
fromString (const std::string &str)
 
template<typename T >
void toString (const T *vals, std::string *strs, size_t size)
 
template<typename T >
void fromString (const std::string *strs, T *vals, size_t size)
 

Static Public Member Functions

static Type enumFromString (std::string strType)
 Parses the string equivalent of the enum. More...
 
static std::string enumToString (Type type)
 Returns the string equivalent of the enum. More...
 
template<typename T >
static std::string toString (const T &val)
 For use by the framework. More...
 
template<typename T >
static T fromString (const std::string &str)
 For use by the framework. More...
 
template<typename T >
static void toString (const T *vals, std::string *strs, size_t size)
 For use by the framework. More...
 
template<typename T >
static void fromString (const std::string *strs, T *vals, size_t size)
 For use by the framework. More...
 

Detailed Description

Enumeration and utilities for the primitive types in fields and arrays.

Member Enumeration Documentation

Enumerator
BOOLEAN 

C++ type is bool.

BYTE 

C++ type is char.

INTEGER 

C++ type is int.

FLOAT 

C++ type is float.

DOUBLE 

C++ type is double.

STRING 

C++ type is std::string.

SIZE_T 

C++ type is size_t.

LONG_DOUBLE 

C++ type is long double.

Member Function Documentation

Primitive::Type BUSBOY::Primitive::enumFromString ( std::string  strType)
static

Parses the string equivalent of the enum.

For example: "BYTE" –> BYTE

std::string BUSBOY::Primitive::enumToString ( Primitive::Type  type)
static

Returns the string equivalent of the enum.

For example: BYTE –> "BYTE"

template<typename T >
template size_t BUSBOY::Primitive::fromString< size_t > ( const std::string &  str)
static

For use by the framework.

template<typename T >
static void BUSBOY::Primitive::fromString ( const std::string *  strs,
T *  vals,
size_t  size 
)
static

For use by the framework.

template<typename T >
T BUSBOY::Primitive::fromString ( const std::string &  str)
template<typename T >
void BUSBOY::Primitive::fromString ( const std::string *  strs,
T *  vals,
size_t  size 
)
template<typename T >
static std::string BUSBOY::Primitive::toString ( const T &  val)
static

For use by the framework.

template<typename T >
static void BUSBOY::Primitive::toString ( const T *  vals,
std::string *  strs,
size_t  size 
)
static

For use by the framework.

template<typename T >
std::string BUSBOY::Primitive::toString ( const T &  val)
template<typename T >
void BUSBOY::Primitive::toString ( const T *  vals,
std::string *  strs,
size_t  size 
)

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

Copyright 2014 Google Inc. All rights reserved.