#include <coherence/io/pof/UserTypeReader.hpp>
Inherits PofBufferReader.
The "contextual awareness" refers to the fact that the UserTypeReader maintains state about the type identifier and version of the user type, the parser's property index position within the user type value, and a PofContext that may differ from the PofContext that provided the PofSerializer which is using this UserTypeReader to parse a user type.
Public Types | ||||||||||
typedef spec::Handle | Handle | |||||||||
UserTypeReader Handle definition. | ||||||||||
typedef spec::View | View | |||||||||
UserTypeReader View definition. | ||||||||||
typedef spec::Holder | Holder | |||||||||
UserTypeReader Holder definition. | ||||||||||
Public Member Functions | ||||||||||
UserTypeReader (ReadBuffer::BufferInput::Handle hIn, PofContext::View vCtx, int32_t nTypeId, int32_t nVersionId) | ||||||||||
Construct a parser for parsing the property values of a user type. | ||||||||||
virtual int32_t | getUserTypeId () const | |||||||||
Determine the user type that is currently being parsed.
| ||||||||||
virtual int32_t | getVersionId () const | |||||||||
Determine the version identifier of the user type that is currently being parsed.
| ||||||||||
virtual Binary::View | readRemainder () | |||||||||
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
| ||||||||||
Protected Member Functions | ||||||||||
virtual bool | advanceTo (int32_t iProp) | |||||||||
Advance through the POF stream until the specified property is found. If the property is found, return true, otherwise return false and advance to the first property that follows the specified property.
| ||||||||||
virtual void | complete (int32_t iProp) | |||||||||
Register the completion of the parsing of a value.
| ||||||||||
Protected Attributes | ||||||||||
const int32_t | m_nTypeId | |||||||||
The type identifier of the user type that is being parsed. | ||||||||||
const int32_t | m_nVersionId | |||||||||
The version identifier of the user type that is being parsed. | ||||||||||
int32_t | m_iPrevProp | |||||||||
Most recent property read or (if it were missing) requested. | ||||||||||
int32_t | m_iNextProp | |||||||||
The index of the next property in the POF stream. | ||||||||||
size32_t | m_ofNextProp | |||||||||
The offset of the index of the next property to read. |
UserTypeReader | ( | ReadBuffer::BufferInput::Handle | hIn, | |
PofContext::View | vCtx, | |||
int32_t | nTypeId, | |||
int32_t | nVersionId | |||
) |
Construct a parser for parsing the property values of a user type.
hIn | the BufferInput that contains the user type data, except for the user type id itself (which is passed passed as a constructor argument) | |
vCtx | the PofContext to use for parsing the user type property values within the user type that this parser will be parsing | |
nTypeId | the type id of the user type | |
nVersionId | the version id of the user type |
IOException | if an I/O error occurs |
int32_t m_iPrevProp [protected] |
Most recent property read or (if it were missing) requested.
This is used to determine if the client is attempting to read properties in the wrong order.