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
MetadataField.h
Go to the documentation of this file.
1
17
#ifndef __BUSBOY_METADATA_FIELD_H__
18
#define __BUSBOY_METADATA_FIELD_H__
19
20
#include <string>
21
22
#include "
Primitive.h
"
23
#include "
MetadataElement.h
"
24
25
namespace
BUSBOY {
26
27
class
MetadataFieldImpl;
28
39
class
MetadataField
:
public
CloneableMetadataElement
{
40
41
public
:
42
43
MetadataField
();
44
45
MetadataField
(
const
MetadataField
& field);
46
47
static
MetadataField
createBoolean
(
const
bool
val);
48
49
static
MetadataField
createInteger
(
const
int
val);
50
51
static
MetadataField
createByte
(
const
char
val);
52
53
static
MetadataField
createFloat
(
const
float
val);
54
55
static
MetadataField
createDouble
(
const
double
val);
56
57
static
MetadataField
createLongDouble
(
const
long
double
val);
58
59
static
MetadataField
createString
(
const
char
* val);
60
61
static
MetadataField
createString
(
const
std::string& val);
62
63
static
MetadataField
createSize_t
(
const
size_t
val);
64
65
bool
getBooleanValue
()
const
;
66
67
char
getByteValue
()
const
;
68
69
int
getIntegerValue
()
const
;
70
71
float
getFloatValue
()
const
;
72
73
double
getDoubleValue
()
const
;
74
75
long
double
getLongDoubleValue
()
const
;
76
77
std::string
getStringValue
()
const
;
78
79
size_t
getSize_tValue
()
const
;
80
81
Primitive::Type
getPrimitiveType
()
const
;
82
83
MetadataElement::Type
getMetadataElementType
()
const
;
84
85
virtual
CloneableMetadataElement
*
clone
()
const
;
86
87
MetadataField
&
operator=
(
const
MetadataField
& field);
88
89
bool
operator==
(
const
MetadataField
& field)
const
;
90
91
bool
operator==
(
const
MetadataElement
& element)
const
;
92
93
bool
operator!=
(
const
MetadataField
& field)
const
;
94
95
bool
operator!=
(
const
MetadataElement
& element)
const
;
96
101
std::string
str
();
102
103
~MetadataField
();
104
105
static
MetadataField
parseField
(
const
std::string& str,
Primitive::Type
type);
106
107
std::string
toString
()
const
;
108
109
static
const
MetadataField
*
castToField
(
const
MetadataElement
* element);
110
111
static
MetadataField
*
castToField
(
MetadataElement
* element);
112
113
static
const
MetadataField
&
castToField
(
const
MetadataElement
& element);
114
115
static
MetadataField
&
castToField
(
MetadataElement
& element);
116
117
118
private
:
119
MetadataFieldImpl
* m_impl;
120
121
122
};
123
124
}
125
#endif
126
Tue Nov 11 2014 23:19:41
1.8.3.1
Copyright 2014 Google Inc. All rights reserved.