#include <coherence/io/pof/PofReader.hpp>
Inherits Object.
Inherited by PofBufferReader [virtual].
See PofWriter for a complete description of the POF user type serialization format.
Public Types | |
| typedef spec::Handle | Handle |
| PofReader Handle definition. | |
| typedef spec::View | View |
| PofReader View definition. | |
| typedef spec::Holder | Holder |
| PofReader Holder definition. | |
Public Member Functions | |
| virtual bool | readBoolean (int32_t iProp)=0 |
| Read a boolean property from the POF stream. | |
| virtual octet_t | readOctet (int32_t iProp)=0 |
| Read an octet property from the POF stream. | |
| virtual char16_t | readChar16 (int32_t iProp)=0 |
| Read a 16-bit Unicode character property from the POF stream. | |
| virtual int16_t | readInt16 (int32_t iProp)=0 |
| Read a 16-bit integer property from the POF stream. | |
| virtual int32_t | readInt32 (int32_t iProp)=0 |
| Read a 32-bit integer property from the POF stream. | |
| virtual int64_t | readInt64 (int32_t iProp)=0 |
| Read a 64-bit integer property from the POF stream. | |
| virtual float32_t | readFloat32 (int32_t iProp)=0 |
| Read a a 32-bit floating-point property from the POF stream. | |
| virtual float64_t | readFloat64 (int32_t iProp)=0 |
| Read a 64-bit floating-point property from the POF stream. | |
| virtual Array< bool > ::Handle | readBooleanArray (int32_t iProp)=0 |
| Read a boolean array property from the POF stream. | |
| virtual Array < octet_t >::Handle | readOctetArray (int32_t iProp)=0 |
| Read an octet array property from the POF stream. | |
| virtual Array < char16_t >::Handle | readChar16Array (int32_t iProp)=0 |
| Read a 16-bit Unicode character array property from the POF stream. | |
| virtual Array < int16_t >::Handle | readInt16Array (int32_t iProp)=0 |
| Read a 16-bit integer array property from the POF stream. | |
| virtual Array < int32_t >::Handle | readInt32Array (int32_t iProp)=0 |
| Read a 32-bit integer array property from the POF stream. | |
| virtual Array < int64_t >::Handle | readInt64Array (int32_t iProp)=0 |
| Read a 64-bit integer array property from the POF stream. | |
| virtual Array < float32_t > ::Handle | readFloat32Array (int32_t iProp)=0 |
| Read a a 32-bit floating-point array property from the POF stream. | |
| virtual Array < float64_t > ::Handle | readFloat64Array (int32_t iProp)=0 |
| Read a a 64-bit floating-point array property from the POF stream. | |
| virtual Binary::View | readBinary (int32_t iProp)=0 |
Read a Binary property from the POF stream. | |
| virtual String::View | readString (int32_t iProp)=0 |
Read a String property from the POF stream. | |
| virtual RawDate::View | readRawDate (int32_t iProp)=0 |
| Read a RawDate property from the POF stream. | |
| virtual RawTime::View | readRawTime (int32_t iProp)=0 |
| Read a RawTime property from the POF stream. | |
| virtual RawDateTime::View | readRawDateTime (int32_t iProp)=0 |
| Read a RawDateTime property from the POF stream. | |
| virtual RawYearMonthInterval::View | readRawYearMonthInterval (int32_t iProp)=0 |
| Read a RawYearMonthInterval property from the POF stream. | |
| virtual RawTimeInterval::View | readRawTimeInterval (int32_t iProp)=0 |
| Read a RawTimeInterval property from the POF stream. | |
| virtual RawDayTimeInterval::View | readRawDayTimeInterval (int32_t iProp)=0 |
| Read a RawDayTimeInterval property from the POF stream. | |
| virtual Object::Holder | readObject (int32_t iProp)=0 |
| Read a property of any type, including a user type, from the POF stream. | |
| virtual ObjectArray::Handle | readObjectArray (int32_t iProp, ObjectArray::Handle ha=NULL)=0 |
Read an ObjectArray property from the POF stream. | |
| virtual LongArray::View | readLongArray (int32_t iProp, LongArray::Handle hla=NULL)=0 |
Read a LongArray of object values from the POF stream. | |
| virtual Collection::View | readCollection (int32_t iProp, Collection::Handle hCol=NULL)=0 |
Read a Collection of object values from the POF stream. | |
| virtual Map::View | readMap (int32_t iProp, Map::Handle hMap=NULL)=0 |
Read a Map of key/value pairs from the POF stream. | |
| virtual PofContext::View | getPofContext () const =0 |
| Return the PofContext object used by this PofReader to deserialize user types from a POF stream. | |
| virtual void | setPofContext (PofContext::View vCtx)=0 |
| Configure the PofContext object used by this PofReader to deserialize user types from a POF stream. | |
| virtual int32_t | getUserTypeId () const =0 |
| Determine the user type that is currently being parsed. | |
| virtual int32_t | getVersionId () const =0 |
| Determine the version identifier of the user type that is currently being parsed. | |
| virtual void | registerIdentity (Object::Holder oh)=0 |
| Register an identity for a newly created user type instance. | |
| virtual PofReader::Handle | createNestedPofReader (int32_t iProp)=0 |
| Obtain a PofReader that can be used to read a set of properties from a single property of the current user type. | |
| virtual Binary::View | readRemainder ()=0 |
| Read all remaining indexed properties of the current user type from the POF stream. | |
| virtual bool readBoolean | ( | int32_t | iProp | ) | [pure virtual] |
Read a boolean property from the POF stream.
| iProp | the property index to read |
bool property value| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
| virtual octet_t readOctet | ( | int32_t | iProp | ) | [pure virtual] |
Read an octet property from the POF stream.
| iProp | the property index to read |
octet_t property value| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
| virtual char16_t readChar16 | ( | int32_t | iProp | ) | [pure virtual] |
Read a 16-bit Unicode character property from the POF stream.
| iProp | the property index to read |
char16_t value| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
| virtual int16_t readInt16 | ( | int32_t | iProp | ) | [pure virtual] |
Read a 16-bit integer property from the POF stream.
| iProp | the property index to read |
int16_t property value| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
| virtual int32_t readInt32 | ( | int32_t | iProp | ) | [pure virtual] |
Read a 32-bit integer property from the POF stream.
| iProp | the property index to read |
int32_t property value| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
| virtual int64_t readInt64 | ( | int32_t | iProp | ) | [pure virtual] |
Read a 64-bit integer property from the POF stream.
| iProp | the property index to read |
int64_t property value| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
| virtual float32_t readFloat32 | ( | int32_t | iProp | ) | [pure virtual] |
Read a a 32-bit floating-point property from the POF stream.
| iProp | the property index to read |
float32_t property value| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
| virtual float64_t readFloat64 | ( | int32_t | iProp | ) | [pure virtual] |
Read a 64-bit floating-point property from the POF stream.
| iProp | the property index to read |
float64_t property value| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
Read a boolean array property from the POF stream.
| iProp | the property index to read |
bool array property value, or NULL if no value was available in the POF stream| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
Read an octet array property from the POF stream.
| iProp | the property index to read |
octet_t array property value, or NULL if no value was available in the POF stream| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
Read a 16-bit Unicode character array property from the POF stream.
| iProp | the property index to read |
char16_t array property value, or NULL if no value was available in the POF stream| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
Read a 16-bit integer array property from the POF stream.
| iProp | the property index to read |
int16_t array property value, or NULL if no value was available in the POF stream| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
Read a 32-bit integer array property from the POF stream.
| iProp | the property index to read |
int32_t array property value, or NULL if no value was available in the POF stream| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
Read a 64-bit integer array property from the POF stream.
| iProp | the property index to read |
int64_t array property value, or NULL if no value was available in the POF stream| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
Read a a 32-bit floating-point array property from the POF stream.
| iProp | the property index to read |
float32_t array property value, or NULL if no value was available in the POF stream| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
Read a a 64-bit floating-point array property from the POF stream.
| iProp | the property index to read |
float64_t array property value, or NULL if no value was available in the POF stream| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
| virtual Binary::View readBinary | ( | int32_t | iProp | ) | [pure virtual] |
Read a Binary property from the POF stream.
| iProp | the property index to read |
Binary property value, or NULL if no value was available in the POF stream| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
| virtual String::View readString | ( | int32_t | iProp | ) | [pure virtual] |
Read a String property from the POF stream.
| iProp | the property index to read |
String property value, or NULL if no value was available in the POF stream| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
| virtual RawDate::View readRawDate | ( | int32_t | iProp | ) | [pure virtual] |
Read a RawDate property from the POF stream.
| iProp | the property index to read |
RawDate property value, or NULL if no value was available in the POF stream| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
| virtual RawTime::View readRawTime | ( | int32_t | iProp | ) | [pure virtual] |
Read a RawTime property from the POF stream.
| iProp | the property index to read |
RawTime property value, or NULL if no value was available in the POF stream| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
| virtual RawDateTime::View readRawDateTime | ( | int32_t | iProp | ) | [pure virtual] |
Read a RawDateTime property from the POF stream.
| iProp | the property index to read |
RawDateTime property value, or NULL if no value was available in the POF stream| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
| virtual RawYearMonthInterval::View readRawYearMonthInterval | ( | int32_t | iProp | ) | [pure virtual] |
Read a RawYearMonthInterval property from the POF stream.
| iProp | the property index to read |
RawYearMonthInterval property value, or NULL if no value was available in the POF stream| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
| virtual RawTimeInterval::View readRawTimeInterval | ( | int32_t | iProp | ) | [pure virtual] |
Read a RawTimeInterval property from the POF stream.
| iProp | the property index to read |
RawTimeInterval property value, or NULL if no value was available in the POF stream| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
| virtual RawDayTimeInterval::View readRawDayTimeInterval | ( | int32_t | iProp | ) | [pure virtual] |
Read a RawDayTimeInterval property from the POF stream.
| iProp | the property index to read |
RawDayTimeInterval property value, or NULL if no value was available in the POF stream| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
| virtual Object::Holder readObject | ( | int32_t | iProp | ) | [pure virtual] |
Read a property of any type, including a user type, from the POF stream.
| iProp | the property index to read |
NULL if no value was available in the POF stream| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
| virtual ObjectArray::Handle readObjectArray | ( | int32_t | iProp, | |
| ObjectArray::Handle | ha = NULL | |||
| ) | [pure virtual] |
Read an ObjectArray property from the POF stream.
| iProp | the property index to read | |
| ha | the optional ObjectArray to use to store the values, or to use as a typed template for creating an array to store the values; may be NULL |
ObjectArray of object values, or NULL if no ObjectArray is passed and there is no array data in the POF stream| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
| virtual LongArray::View readLongArray | ( | int32_t | iProp, | |
| LongArray::Handle | hla = NULL | |||
| ) | [pure virtual] |
Read a LongArray of object values from the POF stream.
| iProp | the property index to read | |
| hla | the optional LongArray to use to store the values; may be NULL |
LongArray of object values, or NULL if no LongArray is passed and there is no key/value data available in the POF stream| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
| virtual Collection::View readCollection | ( | int32_t | iProp, | |
| Collection::Handle | hCol = NULL | |||
| ) | [pure virtual] |
Read a Collection of object values from the POF stream.
| iProp | the property index to read | |
| hCol | the optional Collection to use to store the values; may be NULL |
Collection of object values, or NULL if no Collection is passed and there is no collection data available in the POF stream| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
| virtual Map::View readMap | ( | int32_t | iProp, | |
| Map::Handle | hMap = NULL | |||
| ) | [pure virtual] |
Read a Map of key/value pairs from the POF stream.
| iProp | the property index to read | |
| hMap | the optional Map to initialize; the handle may be NULL |
Map of key/value pairs, or NULL if no Map is passed and there is no key/value data in the POF stream| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader.
| virtual PofContext::View getPofContext | ( | ) | const [pure virtual] |
Return the PofContext object used by this PofReader to deserialize user types from a POF stream.
Implemented in PofBufferReader.
| virtual void setPofContext | ( | PofContext::View | vCtx | ) | [pure virtual] |
Configure the PofContext object used by this PofReader to deserialize user types from a POF stream.
Note: this is an advanced method that should be used with care. For example, if this method is being used to switch to another PofContext mid-POF stream, it is important to eventually restore the original PofContext. For example:
PofContext::View vCtxOrig = hReader->getPofContext();
// switch to another PofContext PofContext::View vCtxNew = ...; hReader->setContext(vCtxNew);
// read POF data using the reader ...
// restore the original PofContext hReader->setPofContext(vCtxOrig);
| vCtx | the new PofContext; must not be NULL |
Implemented in PofBufferReader.
| virtual int32_t getUserTypeId | ( | ) | const [pure virtual] |
Determine the user type that is currently being parsed.
Implemented in PofBufferReader, and UserTypeReader.
| virtual int32_t getVersionId | ( | ) | const [pure virtual] |
Determine the version identifier of the user type that is currently being parsed.
| coherence::lang::IllegalStateException | if no user type is being parsed |
Implemented in PofBufferReader, and UserTypeReader.
| virtual void registerIdentity | ( | Object::Holder | oh | ) | [pure virtual] |
Register an identity for a newly created user type instance.
If identity/reference types are enabled, an identity is used to uniquely identify a user type instance within a POF stream. The identity immediately proceeds the instance value in the POF stream and can be used later in the stream to reference the instance.
PofSerializer implementations must call this method with the user type instance instantiated during deserialization prior to reading any properties of the instance which are user type instances themselves.
| oh | the object to register the identity for |
Implemented in PofBufferReader, and UserTypeReader.
| virtual PofReader::Handle createNestedPofReader | ( | int32_t | iProp | ) | [pure virtual] |
Obtain a PofReader that can be used to read a set of properties from a single property of the current user type.
The returned PofReader is only valid from the time that it is returned until the next call is made to this PofReader.
| iProp | the property index to read from |
| coherence::lang::IllegalArgumentException | if the property index is invalid, or is less than or equal to the index of the previous property read from the POF stream | |
| coherence::lang::IllegalStateException | if no user type is being parsed | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader, and UserTypeReader.
| virtual Binary::View readRemainder | ( | ) | [pure virtual] |
Read all remaining indexed properties of the current user type from the POF stream.
As part of reading in a user type, this method must be called by the PofSerializer that is reading the user type, or the read position within the POF stream will be corrupted.
Subsequent calls to the various readXYZ methods of this interface will fail after this method is called.
| coherence::lang::IllegalStateException | if no user type is being parsed | |
| coherence::io::IOException | if an I/O error occurs |
Implemented in PofBufferReader, and UserTypeReader.