22 #ifndef _IGNITE_BINARY_BINARY_READER
23 #define _IGNITE_BINARY_BINARY_READER
28 #include <ignite/common/common.h>
63 BinaryReader(ignite::impl::binary::BinaryReaderImpl* impl);
71 bool IsNull(
const char* fieldName);
79 int8_t ReadInt8(
const char* fieldName);
92 int32_t ReadInt8Array(
const char* fieldName, int8_t* res, int32_t len);
100 bool ReadBool(
const char* fieldName);
113 int32_t ReadBoolArray(
const char* fieldName,
bool* res, int32_t len);
121 int16_t ReadInt16(
const char* fieldName);
134 int32_t ReadInt16Array(
const char* fieldName, int16_t* res, int32_t len);
142 uint16_t ReadUInt16(
const char* fieldName);
155 int32_t ReadUInt16Array(
const char* fieldName, uint16_t* res, int32_t len);
163 int32_t ReadInt32(
const char* fieldName);
176 int32_t ReadInt32Array(
const char* fieldName, int32_t* res, int32_t len);
184 int64_t ReadInt64(
const char* fieldName);
197 int32_t ReadInt64Array(
const char* fieldName, int64_t* res, int32_t len);
205 float ReadFloat(
const char* fieldName);
218 int32_t ReadFloatArray(
const char* fieldName,
float* res, int32_t len);
226 double ReadDouble(
const char* fieldName);
239 int32_t ReadDoubleArray(
const char* fieldName,
double* res, int32_t len);
247 Guid ReadGuid(
const char* fieldName);
260 int32_t ReadGuidArray(
const char* fieldName,
Guid* res, int32_t len);
268 Date ReadDate(
const char* fieldName);
281 int32_t ReadDateArray(
const char* fieldName,
Date* res, int32_t len);
289 Timestamp ReadTimestamp(
const char* fieldName);
302 int32_t ReadTimestampArray(
const char* fieldName,
Timestamp* res, int32_t len);
310 Time ReadTime(
const char* fieldName);
323 int32_t ReadTimeArray(
const char* fieldName,
Time* res, int32_t len);
337 int32_t ReadString(
const char* fieldName,
char* res, int32_t len);
347 int32_t len = ReadString(fieldName, NULL, 0);
351 ignite::common::FixedSizeArray<char> arr(len + 1);
353 ReadString(fieldName, arr.GetData(),
static_cast<int32_t
>(arr.GetSize()));
355 return std::string(arr.GetData());
358 return std::string();
398 int32_t
id = impl->ReadArray(fieldName, &size);
420 int32_t
id = impl->ReadCollection(fieldName, &typ, &size);
432 template<
typename T,
typename OutputIterator>
435 return impl->ReadCollection<T>(fieldName, out);
449 template<
typename K,
typename V>
455 int32_t
id = impl->ReadMap(fieldName, &typ, &size);
474 int32_t ReadCollectionSize(
const char* fieldName);
487 return impl->ReadObject<T>(fieldName);
500 return impl->ReadEnum<T>(fieldName);
511 ignite::impl::binary::BinaryReaderImpl* impl;
516 #endif //_IGNITE_BINARY_BINARY_READER