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
MetadataArray.h
Go to the documentation of this file.
1
17
#ifndef __BUSBOY_METADATA_ARRAY_H__
18
#define __BUSBOY_METADATA_ARRAY_H__
19
20
#include <string>
21
22
#include "
Primitive.h
"
23
#include "
MetadataElement.h
"
24
25
namespace
BUSBOY {
26
27
class
MetadataArrayImpl;
28
48
class
MetadataArray
:
public
CloneableMetadataElement
{
49
50
public
:
51
52
MetadataArray
();
53
54
MetadataArray
(
const
MetadataArray
& array);
55
56
static
MetadataArray
createBoolean
(
const
bool
* val,
size_t
size);
57
58
static
MetadataArray
createInteger
(
const
int
* val,
size_t
size);
59
60
static
MetadataArray
createByte
(
const
char
* val,
size_t
size);
61
62
static
MetadataArray
createFloat
(
const
float
* val,
size_t
size);
63
64
static
MetadataArray
createDouble
(
const
double
* val,
size_t
size);
65
66
static
MetadataArray
createLongDouble
(
const
long
double
* val,
size_t
size);
67
68
static
MetadataArray
createString
(
const
char
** val,
size_t
size);
69
70
static
MetadataArray
createString
(
const
std::string* val,
size_t
size);
71
72
static
MetadataArray
createSize_t
(
const
size_t
* val,
size_t
size);
73
74
bool
*
getBooleanValue
()
const
;
75
76
char
*
getByteValue
()
const
;
77
78
int
*
getIntegerValue
()
const
;
79
80
float
*
getFloatValue
()
const
;
81
82
double
*
getDoubleValue
()
const
;
83
84
long
double
*
getLongDoubleValue
()
const
;
85
86
std::string*
getStringValue
()
const
;
87
88
size_t
*
getSize_tValue
()
const
;
89
90
Primitive::Type
getPrimitiveType
()
const
;
91
92
MetadataElement::Type
getMetadataElementType
()
const
;
93
94
virtual
CloneableMetadataElement
*
clone
()
const
;
95
96
size_t
getSize
()
const
;
97
98
MetadataArray
&
operator=
(
const
MetadataArray
& array);
99
100
bool
operator==
(
const
MetadataArray
& array)
const
;
101
102
bool
operator==
(
const
MetadataElement
& element)
const
;
103
104
bool
operator!=
(
const
MetadataArray
& array)
const
;
105
106
bool
operator!=
(
const
MetadataElement
& element)
const
;
107
112
std::string
str
();
113
114
~MetadataArray
();
115
116
static
MetadataArray
parseArray
(
const
std::string* str,
Primitive::Type
type,
size_t
size);
117
122
std::string*
toString
()
const
;
123
128
void
toString
(std::string* strs)
const
;
129
130
static
const
MetadataArray
*
castToArray
(
const
MetadataElement
* element);
131
132
static
MetadataArray
*
castToArray
(
MetadataElement
* element);
133
134
static
const
MetadataArray
&
castToArray
(
const
MetadataElement
& element);
135
136
static
MetadataArray
&
castToArray
(
MetadataElement
& element);
137
138
private
:
139
MetadataArrayImpl
* m_impl;
140
141
};
142
143
}
144
#endif
145
Tue Nov 11 2014 23:19:41
1.8.3.1
Copyright 2014 Google Inc. All rights reserved.