Hazelcast C++ Client
Public Member Functions | List of all members
hazelcast::client::serialization::PortableReader Class Reference

Provides a mean of reading portable fields from a binary in form of java primitives arrays of java primitives , nested portable fields and array of portable fields. More...

#include <PortableReader.h>

Public Member Functions

 PortableReader (pimpl::PortableContext &context, ObjectDataInput &dataInput, boost::shared_ptr< ClassDefinition > cd, bool isDefaultReader)
 Internal Api constructor.
 
 PortableReader (const PortableReader &reader)
 
PortableReaderoperator= (const PortableReader &reader)
 
int32_t readInt (const char *fieldName)
 
int64_t readLong (const char *fieldName)
 
bool readBoolean (const char *fieldName)
 
byte readByte (const char *fieldName)
 
char readChar (const char *fieldName)
 
double readDouble (const char *fieldName)
 
float readFloat (const char *fieldName)
 
int16_t readShort (const char *fieldName)
 
std::auto_ptr< std::string > readUTF (const char *fieldName)
 
std::auto_ptr< std::vector< byte > > readByteArray (const char *fieldName)
 
std::auto_ptr< std::vector< bool > > readBooleanArray (const char *fieldName)
 
std::auto_ptr< std::vector< char > > readCharArray (const char *fieldName)
 
std::auto_ptr< std::vector< int32_t > > readIntArray (const char *fieldName)
 
std::auto_ptr< std::vector< int64_t > > readLongArray (const char *fieldName)
 
std::auto_ptr< std::vector< double > > readDoubleArray (const char *fieldName)
 
std::auto_ptr< std::vector< float > > readFloatArray (const char *fieldName)
 
std::auto_ptr< std::vector< int16_t > > readShortArray (const char *fieldName)
 
template<typename T >
boost::shared_ptr< T > readPortable (const char *fieldName)
 
template<typename T >
std::vector< T > readPortableArray (const char *fieldName)
 
ObjectDataInputgetRawDataInput ()
 
void end ()
 Internal Api. More...
 

Detailed Description

Provides a mean of reading portable fields from a binary in form of java primitives arrays of java primitives , nested portable fields and array of portable fields.

Member Function Documentation

void hazelcast::client::serialization::PortableReader::end ( )

Internal Api.

Should not be called by end user.

ObjectDataInput & hazelcast::client::serialization::PortableReader::getRawDataInput ( )
See also
PortableWriter::getRawDataOutput

Note that portable fields can not read after getRawDataInput() is called. In case this happens, IOException will be thrown.

Returns
rawDataInput
Exceptions
IOException
bool hazelcast::client::serialization::PortableReader::readBoolean ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the boolean value read
Exceptions
IOException
std::auto_ptr< std::vector< bool > > hazelcast::client::serialization::PortableReader::readBooleanArray ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the bool array value read
Exceptions
IOException
byte hazelcast::client::serialization::PortableReader::readByte ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the byte value read
Exceptions
IOException
std::auto_ptr< std::vector< byte > > hazelcast::client::serialization::PortableReader::readByteArray ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the byte array value read
Exceptions
IOException
char hazelcast::client::serialization::PortableReader::readChar ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the char value read
Exceptions
IOException
std::auto_ptr< std::vector< char > > hazelcast::client::serialization::PortableReader::readCharArray ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the char array value read
Exceptions
IOException
double hazelcast::client::serialization::PortableReader::readDouble ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the double value read
Exceptions
IOException
std::auto_ptr< std::vector< double > > hazelcast::client::serialization::PortableReader::readDoubleArray ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the double array value read
Exceptions
IOException
float hazelcast::client::serialization::PortableReader::readFloat ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the float value read
Exceptions
IOException
std::auto_ptr< std::vector< float > > hazelcast::client::serialization::PortableReader::readFloatArray ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the float array value read
Exceptions
IOException
int32_t hazelcast::client::serialization::PortableReader::readInt ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the int32_t value read
Exceptions
IOException
std::auto_ptr< std::vector< int32_t > > hazelcast::client::serialization::PortableReader::readIntArray ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the int32_t array value read
Exceptions
IOException
int64_t hazelcast::client::serialization::PortableReader::readLong ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the int64_t value read
Exceptions
IOException
std::auto_ptr< std::vector< int64_t > > hazelcast::client::serialization::PortableReader::readLongArray ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the int64_t array value read
Exceptions
IOException
template<typename T >
boost::shared_ptr<T> hazelcast::client::serialization::PortableReader::readPortable ( const char *  fieldName)
inline
Template Parameters
typeof the portable class
Parameters
fieldNamename of the field
Returns
the portable value read
Exceptions
IOException
template<typename T >
std::vector<T> hazelcast::client::serialization::PortableReader::readPortableArray ( const char *  fieldName)
inline
Template Parameters
typeof the portable class in array
Parameters
fieldNamename of the field
Returns
the portable array value read
Exceptions
IOException
int16_t hazelcast::client::serialization::PortableReader::readShort ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the int32_t value read
Exceptions
IOException
std::auto_ptr< std::vector< int16_t > > hazelcast::client::serialization::PortableReader::readShortArray ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the int16_t array value read
Exceptions
IOException
std::auto_ptr< std::string > hazelcast::client::serialization::PortableReader::readUTF ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the utf string value read
Exceptions
IOException

The documentation for this class was generated from the following files: