Hazelcast C++ Client
 All Classes Functions Variables Enumerations Pages
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, pimpl::DataInput &dataInput, boost::shared_ptr< ClassDefinition > cd, bool isDefaultReader)
 Internal Api constructor.
 
 PortableReader (const PortableReader &reader)
 
PortableReaderoperator= (const PortableReader &reader)
 
int readInt (const char *fieldName)
 
long 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)
 
short 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
< char > > 
readCharArray (const char *fieldName)
 
std::auto_ptr< std::vector< int > > readIntArray (const char *fieldName)
 
std::auto_ptr< std::vector
< long > > 
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
< short > > 
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
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
int hazelcast::client::serialization::PortableReader::readInt ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the int value read
Exceptions
IOException
std::auto_ptr< std::vector< int > > hazelcast::client::serialization::PortableReader::readIntArray ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the int array value read
Exceptions
IOException
long hazelcast::client::serialization::PortableReader::readLong ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the long value read
Exceptions
IOException
std::auto_ptr< std::vector< long > > hazelcast::client::serialization::PortableReader::readLongArray ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the long 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
short hazelcast::client::serialization::PortableReader::readShort ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the short value read
Exceptions
IOException
std::auto_ptr< std::vector< short > > hazelcast::client::serialization::PortableReader::readShortArray ( const char *  fieldName)
Parameters
fieldNamename of the field
Returns
the short 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: