#include <coherence/io/pof/WritingPofHandler.hpp>
Inherits PofHelper.
Public Types | |
| typedef spec::Handle | Handle |
| WritingPofHandler Handle definition. | |
| typedef spec::View | View |
| WritingPofHandler View definition. | |
| typedef spec::Holder | Holder |
| WritingPofHandler Holder definition. | |
Public Member Functions | |
| virtual void | beginUserType (int32_t iPos, int nId, int32_t nUserTypeId, int32_t nVersionId) |
| Report that a value of a "user type" has been encountered in the POF stream. | |
| virtual void | registerIdentity (int32_t nId) |
| virtual void | onNullReference (int32_t iPos) |
| virtual void | onIdentityReference (int32_t iPos, int32_t nId) |
| virtual void | onInt16 (int32_t iPos, int16_t n) |
| virtual void | onInt32 (int32_t iPos, int32_t n) |
| virtual void | onInt64 (int32_t iPos, int64_t n) |
| virtual void | onFloat32 (int32_t iPos, float32_t fl) |
| virtual void | onFloat64 (int32_t iPos, float64_t dfl) |
| virtual void | onBoolean (int32_t iPos, bool f) |
| virtual void | onOctet (int32_t iPos, octet_t b) |
| virtual void | onOctetString (int32_t iPos, Binary::View vBin) |
| virtual void | onChar (int32_t iPos, wchar16_t ch) |
| virtual void | onCharString (int32_t iPos, String::View vs) |
| virtual void | onDate (int32_t iPos, int32_t nYear, int32_t nMonth, int32_t nDay) |
| virtual void | onYearMonthInterval (int32_t iPos, int32_t cYears, int32_t cMonths) |
| virtual void | onTime (int32_t iPos, int32_t nHour, int32_t nMinute, int32_t nSecond, int32_t nNano, bool fUTC) |
| virtual void | onTime (int32_t iPos, int32_t nHour, int32_t nMinute, int32_t nSecond, int32_t nNano, int32_t nHourOffset, int32_t nMinuteOffset) |
| virtual void | onTimeInterval (int32_t iPos, int32_t cHours, int32_t cMinutes, int32_t cSeconds, int32_t cNanos) |
| virtual void | onDateTime (int32_t iPos, int32_t nYear, int32_t nMonth, int32_t nDay, int32_t nHour, int32_t nMinute, int32_t nSecond, int32_t nNano, bool fUTC) |
| virtual void | onDateTime (int32_t iPos, int32_t nYear, int32_t nMonth, int32_t nDay, int32_t nHour, int32_t nMinute, int32_t nSecond, int32_t nNano, int32_t nHourOffset, int32_t nMinuteOffset) |
| virtual void | onDayTimeInterval (int32_t iPos, int32_t cDays, int32_t cHours, int32_t cMinutes, int32_t cSeconds, int32_t cNanos) |
| virtual void | beginCollection (int32_t iPos, size32_t cElements) |
| virtual void | beginUniformCollection (int32_t iPos, size32_t cElements, int32_t nType) |
| virtual void | beginArray (int32_t iPos, size32_t cElements) |
| virtual void | beginUniformArray (int32_t iPos, size32_t cElements, int32_t nType) |
| virtual void | beginSparseArray (int32_t iPos, size32_t cElements) |
| virtual void | beginUniformSparseArray (int32_t iPos, size32_t cElements, int32_t nType) |
| virtual void | beginMap (int32_t iPos, size32_t cElements) |
| virtual void | beginUniformKeysMap (int32_t iPos, size32_t cElements, int32_t nTypeKeys) |
| virtual void | beginUniformMap (int32_t iPos, size32_t cElements, int32_t nTypeKeys, int32_t nTypeValues) |
| virtual void | beginUserType (int32_t iPos, int32_t nUserTypeId, int32_t nVersionId) |
| virtual void | endComplexValue () |
| virtual WriteBuffer::BufferOutput::Handle | getBufferOutput () |
| Obtain the DataOutput object that this Writing POF Handler is writing to. | |
| virtual WriteBuffer::BufferOutput::View | getBufferOutput () const |
| Obtain the DataOutput object that this Writing POF Handler is writing to. | |
| virtual Complex::Handle | getComplex () |
| Obtain the current Complex object that represents the complex type that is being written to the POF stream. | |
| virtual Complex::View | getComplex () const |
| Obtain the current Complex object that represents the complex type that is being written to the POF stream. | |
| virtual size64_t | getComplexId () const |
| Return the ID of the current Complex object. | |
Protected Member Functions | |
| WritingPofHandler (WriteBuffer::BufferOutput::Handle hOut) | |
| Construct a Writing POF Handler that will write a POF stream to the passed BufferOutput object. | |
| virtual bool | isSkippable () const |
| Determine if the value encoding can be skipped. | |
| virtual bool | isCompressable () const |
| Determine if the value encoding can be compressed by combining type and value information in such a way that type information could be lost. | |
| virtual void | encodePosition (int32_t iPos) |
| Called for each and every value going into the POF stream, in case the value needs its position to be encoded into the stream. | |
| virtual bool | isTypeIdEncoded (int32_t nTypeId) const |
| Determine if the type should be encoded for the current value. | |
| virtual void | setComplex (Complex::Handle hComplex) |
| Set the current Complex object. | |
Protected Attributes | |
|
FinalHandle < WriteBuffer::BufferOutput > | f_hOut |
| The BufferOutput to write to. | |
| MemberHandle< Complex > | m_hComplex |
| The current containing Complex value in the POF stream. | |
| size64_t | m_nComplexId |
| The ID of the current Complex value. | |
| bool | m_fHasIdentity |
| Set to true when the next value to write has been tagged with an identity. | |
Classes | |
| class | Complex |
| A Complex object represents the current complex data structure in the POF stream. More... | |
| class | ComplexMap |
| A ComplexMap object represents a map data structure (with uniform keys or with uniform keys and values) in the POF stream. More... | |
| WritingPofHandler | ( | WriteBuffer::BufferOutput::Handle | hOut | ) | [protected] |
Construct a Writing POF Handler that will write a POF stream to the passed BufferOutput object.
| hOut | the BufferOutput to write to |
| virtual void beginUserType | ( | int32_t | iPos, | |
| int | nId, | |||
| int32_t | nUserTypeId, | |||
| int32_t | nVersionId | |||
| ) | [virtual] |
Report that a value of a "user type" has been encountered in the POF stream.
A user type is analogous to a "class", and a value of a user type is analogous to an "object".
This method call will be followed by a separate call to an "on" or "begin" method for each of the property values in the user type, and the user type will then be terminated by a call to endComplexValue().
| iPos | context-sensitive position information: property index within a user type, array index within an array, element counter within a collection, entry counter within a map, -1 otherwise | |
| nId | identity of the object to encode, or -1 if identity shouldn't be encoded in the POF stream | |
| nUserTypeId | the user type identifier, (nUserTypeId >= 0) | |
| nVersionId | the version identifier for the user data type data in the POF stream, (nVersionId >= 0) |
| virtual bool isSkippable | ( | ) | const [protected, virtual] |
Determine if the value encoding can be skipped.
A value can be skipped if it is a default value and if it does not have an identity and if it is in a sparse data structure.
| virtual bool isCompressable | ( | ) | const [protected, virtual] |
Determine if the value encoding can be compressed by combining type and value information in such a way that type information could be lost.
| virtual void encodePosition | ( | int32_t | iPos | ) | [protected, virtual] |
Called for each and every value going into the POF stream, in case the value needs its position to be encoded into the stream.
| iPos | the position (property index, array index, etc.) |
| virtual bool isTypeIdEncoded | ( | int32_t | nTypeId | ) | const [protected, virtual] |
Determine if the type should be encoded for the current value.
| nTypeId | the type of the current value |
| virtual WriteBuffer::BufferOutput::Handle getBufferOutput | ( | ) | [virtual] |
Obtain the DataOutput object that this Writing POF Handler is writing to.
| virtual WriteBuffer::BufferOutput::View getBufferOutput | ( | ) | const [virtual] |
Obtain the DataOutput object that this Writing POF Handler is writing to.
| virtual Complex::Handle getComplex | ( | ) | [virtual] |
| virtual Complex::View getComplex | ( | ) | const [virtual] |
| virtual size64_t getComplexId | ( | ) | const [virtual] |
| virtual void setComplex | ( | Complex::Handle | hComplex | ) | [protected, virtual] |