15 #ifndef _GRIDGAIN_PORTABLE_READER 16 #define _GRIDGAIN_PORTABLE_READER 21 #include <ignite/common/common.h> 41 PortableReader(gridgain::impl::portable::PortableReaderImpl* impl);
50 int8_t ReadInt8(
const char* fieldName);
63 int32_t ReadInt8Array(
const char* fieldName, int8_t* res,
const int32_t len);
71 bool ReadBool(
const char* fieldName);
84 int32_t ReadBoolArray(
const char* fieldName,
bool* res, int32_t len);
92 int16_t ReadInt16(
const char* fieldName);
105 int32_t ReadInt16Array(
const char* fieldName, int16_t* res, int32_t len);
113 uint16_t ReadUInt16(
const char* fieldName);
126 int32_t ReadUInt16Array(
const char* fieldName, uint16_t* res, int32_t len);
134 int32_t ReadInt32(
const char* fieldName);
147 int32_t ReadInt32Array(
const char* fieldName, int32_t* res, int32_t len);
155 int64_t ReadInt64(
const char* fieldName);
168 int32_t ReadInt64Array(
const char* fieldName, int64_t* res, int32_t len);
176 float ReadFloat(
const char* fieldName);
189 int32_t ReadFloatArray(
const char* fieldName,
float* res, int32_t len);
197 double ReadDouble(
const char* fieldName);
210 int32_t ReadDoubleArray(
const char* fieldName,
double* res, int32_t len);
218 Guid ReadGuid(
const char* fieldName);
231 int32_t ReadGuidArray(
const char* fieldName,
Guid* res, int32_t len);
245 int32_t ReadString(
const char* fieldName,
char* res, int32_t len);
255 int32_t len = ReadString(fieldName, NULL, 0);
259 gridgain::impl::utils::SafeArray<char> arr(len + 1);
261 ReadString(fieldName, arr.target, len + 1);
263 return std::string(arr.target);
266 return std::string();
288 int32_t
id = impl->ReadArray(fieldName, &size);
305 int32_t
id = impl->ReadCollection(fieldName, &typ, &size);
317 template<
typename T,
typename OutputIterator>
320 return impl->ReadCollection<T>(fieldName, out);
329 template<
typename K,
typename V>
335 int32_t
id = impl->ReadMap(fieldName, &typ, &size);
354 int32_t ReadCollectionSize(
const char* fieldName);
365 return impl->ReadObject<T>(fieldName);
376 gridgain::impl::portable::PortableReaderImpl* impl;
PortableMapReader< K, V > ReadMap(const char *fieldName)
Start map read.
Definition: portable_reader.h:330
Portable raw reader.
Definition: portable_raw_reader.h:35
int32_t ReadCollection(const char *fieldName, OutputIterator out)
Read values and insert them to specified position.
Definition: portable_reader.h:318
std::string ReadString(const char *fieldName)
Read string from the stream.
Definition: portable_reader.h:253
Global universally unique identifier (GUID).
Definition: guid.h:27
Declares gridgain::Guid class.
Portable array reader.
Definition: portable_containers.h:291
T ReadObject(const char *fieldName)
Read object.
Definition: portable_reader.h:363
Portable string array reader.
Definition: portable_containers.h:212
CollectionType
Portable collection types.
Definition: portable_consts.h:27
PortableArrayReader< T > ReadArray(const char *fieldName)
Start array read.
Definition: portable_reader.h:284
PortableCollectionReader< T > ReadCollection(const char *fieldName)
Start collection read.
Definition: portable_reader.h:300
Declares gridgain::portable::PortableRawReader class.
Portable collection reader.
Definition: portable_containers.h:359
Portable map reader.
Definition: portable_containers.h:441
GridGain API.
Definition: cache.h:35
Portable reader.
Definition: portable_reader.h:33
MapType
Portable map types.
Definition: portable_consts.h:68