BusBoy
2
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
cpp
api
metadata
Primitive.h
Go to the documentation of this file.
1
17
#ifndef __BUSBOY_PRIMITIVE_H__
18
#define __BUSBOY_PRIMITIVE_H__
19
20
#include <string>
21
22
namespace
BUSBOY {
23
24
class
PrimitiveImpl;
25
30
class
Primitive
{
31
32
public
:
33
enum
Type
{
35
BOOLEAN
,
36
38
BYTE
,
// char
39
41
INTEGER
,
42
44
FLOAT
,
45
47
DOUBLE
,
48
50
STRING
,
51
53
SIZE_T
,
54
56
LONG_DOUBLE
57
58
};
59
64
static
Type
enumFromString
(std::string strType);
65
70
static
std::string
enumToString
(
Type
type);
71
72
74
template
<
typename
T>
static
std::string
toString
(
const
T& val);
75
77
template
<
typename
T>
static
T
fromString
(
const
std::string& str);
78
80
template
<
typename
T>
static
void
toString
(
const
T* vals, std::string* strs,
size_t
size);
81
83
template
<
typename
T>
static
void
fromString
(
const
std::string* strs, T* vals,
size_t
size );
84
85
private
:
86
87
Primitive
();
88
Primitive
(
const
Primitive
& prim);
89
Primitive
& operator=(
const
Primitive
& prim);
90
91
};
92
93
94
}
95
#endif
96
Tue Nov 11 2014 23:19:41
1.8.3.1
Copyright 2014 Google Inc. All rights reserved.