Oracle Coherence for C++ API
Release 3.7.0.0

E18684-01

PofWriter Class Reference

#include <coherence/io/pof/PofWriter.hpp>

Inherits Object.

Inherited by PofBufferWriter [virtual].

List of all members.


Detailed Description

The PofWriter interface provides the capability of writing a set of non-primitive types ("user types") to a POF stream as an ordered sequence of indexed properties.

The serialized format of a POF user type is as follows:

The type identifier is an integer value greater than or equal to zero that identifies the non-primitive type. The type identifier has no explicit or self-describing meaning within the POF stream itself; in other words, the type identifier does not contain the actual class definition. Instead, the PofWriter and corresponding PofReader share a PofContext which contains the necessary meta-data, including type identifier to type mappings.

The version identifier is used to support both backwards and forwards compatibility of serialized POF user types. Versioning of user types allows the addition of new properties to a user type, but not the replacement or removal of properties that existed in a previous version of the user type.

When a version v1 of a user type written by a PofWriter is read by a PofReader that supports version v2 of the same user type, the PofReader returns default values for the additional properties of the User Type that exist in v2 but do not exist in v1. Conversely, when a version v2 of a user type written by a PofWriter is read by a PofReader that supports version v1 of the same user type, the instance of user type v1 must store those additional opaque properties for later encoding. The PofReader enables the user type to store off the opaque properties in binary form (see PofReader::readRemainder). When the user type is re-encoded, it must be done so using the version identifier v2, since it is including the unaltered v2 properties. The opaque properties are subsequently included in the POF stream using the writeRemainder method.

Following the version identifier is an ordered sequence of index/value pairs, each of which is composed of a property index encoded as non-negative integer value whose value is greater than the previous property index, and a property value encoded as a POF value. The user type is finally terminated with an illegal property index of -1.

Author:
jh 2008.01.18
See also:
PofContext

PofReader


Public Types

typedef spec::Handle Handle
 PofWriter Handle definition.
typedef spec::View View
 PofWriter View definition.
typedef spec::Holder Holder
 PofWriter Holder definition.

Public Member Functions

virtual void writeBoolean (int32_t iProp, bool f)=0
 Write a boolean property to the POF stream.
virtual void writeOctet (int32_t iProp, octet_t b)=0
 Write an octet property to the POF stream.
virtual void writeChar16 (int32_t iProp, char16_t ch)=0
 Write a 16-bit Unicode character property (represented as a char16_t) to the POF stream.
virtual void writeInt16 (int32_t iProp, int16_t n)=0
 Write a 16-bit integer property to the POF stream.
virtual void writeInt32 (int32_t iProp, int32_t n)=0
 Write a 32-bit integer property to the POF stream.
virtual void writeInt64 (int32_t iProp, int64_t l)=0
 Write a 64-bit integer property to the POF stream.
virtual void writeFloat32 (int32_t iProp, float32_t fl)=0
 Write a 32-bit floating-point property to the POF stream.
virtual void writeFloat64 (int32_t iProp, float64_t dfl)=0
 Write a 64-bit floating-point property to the POF stream.
virtual void writeBooleanArray (int32_t iProp, Array< bool >::View vaf)=0
 Write a boolean array property to the POF stream.
virtual void writeOctetArray (int32_t iProp, Array< octet_t >::View vab)=0
 Write an octect array property to the POF stream.
virtual void writeChar16Array (int32_t iProp, Array< char16_t >::View vach)=0
 Write a 16-bit Unicode character array property to the POF stream.
virtual void writeInt16Array (int32_t iProp, Array< int16_t >::View van)=0
 Write a 16-bit integer array property to the POF stream.
virtual void writeInt32Array (int32_t iProp, Array< int32_t >::View van)=0
 Write a 32-bit integer array property to the POF stream.
virtual void writeInt64Array (int32_t iProp, Array< int64_t >::View val)=0
 Write a 64-bit integer array property to the POF stream.
virtual void writeFloat32Array (int32_t iProp, Array< float32_t >::View vafl)=0
 Write a 32-bit floating-point array property to the POF stream.
virtual void writeFloat64Array (int32_t iProp, Array< float64_t >::View vadfl)=0
 Write a 64-bit floating-point array property to the POF stream.
virtual void writeBinary (int32_t iProp, Binary::View vBin)=0
 Write a Binary property to the POF stream.
virtual void writeString (int32_t iProp, String::View vs)=0
 Write a String property to the POF stream.
virtual void writeRawDate (int32_t iProp, RawDate::View vDate)=0
 Write a RawDate property to the POF stream.
virtual void writeRawDateTime (int32_t iProp, RawDateTime::View vdt)=0
 Write a RawDateTime property to the POF stream.
virtual void writeRawDayTimeInterval (int32_t iProp, RawDayTimeInterval::View vInterval)=0
 Write a RawDayTimeInterval property to the POF stream.
virtual void writeRawTime (int32_t iProp, RawTime::View vTime)=0
 Write a RawTime property to the POF stream.
virtual void writeRawTimeInterval (int32_t iProp, RawTimeInterval::View vInterval)=0
 Write a RawTimeInterval property to the POF stream.
virtual void writeRawYearMonthInterval (int32_t iProp, RawYearMonthInterval::View vInterval)=0
 Write a RawYearMonthInterval property to the POF stream.
virtual void writeObject (int32_t iProp, Object::View v)=0
 Write an Object property to the POF stream.
virtual void writeObjectArray (int32_t iProp, ObjectArray::View va)=0
 Write an ObjectArray property to the POF stream.
virtual void writeObjectArray (int32_t iProp, ObjectArray::View va, Class::View vClass)=0
 Write a uniform ObjectArray property to the POF stream.
virtual void writeLongArray (int32_t iProp, LongArray::View vla)=0
 Write a LongArray property to the POF stream.
virtual void writeLongArray (int32_t iProp, LongArray::View vla, Class::View vClass)=0
 Write a uniform LongArray property to the POF stream.
virtual void writeCollection (int32_t iProp, Collection::View vCol)=0
 Write a Collection property to the POF stream.
virtual void writeCollection (int32_t iProp, Collection::View vCol, Class::View vClass)=0
 Write a uniform Collection property to the POF stream.
virtual void writeMap (int32_t iProp, Map::View vMap)=0
 Write a Map property to the POF stream.
virtual void writeMap (int32_t iProp, Map::View vMap, Class::View vClassKey)=0
 Write a uniform key Map property to the POF stream.
virtual void writeMap (int32_t iProp, Map::View vMap, Class::View vClassKey, Class::View vClassValue)=0
 Write a uniform Map property to the POF stream.
virtual PofContext::View getPofContext () const =0
 Return the PofContext object used by this PofWriter to serialize user types to a POF stream.
virtual void setPofContext (PofContext::View vCtx)=0
 Configure the PofContext object used by this PofWriter to serialize user types to a POF stream.
virtual int32_t getUserTypeId () const =0
 Determine the user type that is currently being written.
virtual int32_t getVersionId () const =0
 Determine the version identifier of the user type that is currently being written.
virtual void setVersionId (int32_t nVersionId)=0
 Set the version identifier of the user type that is currently being written.
virtual PofWriter::Handle createNestedPofWriter (int32_t iProp)=0
 Obtain a PofWriter that can be used to write a set of properties into a single property of the current user type.
virtual void writeRemainder (Binary::View vBinProps)=0
 Write the remaining properties to the POF stream, terminating the writing of the currrent user type.

Member Function Documentation

virtual void writeBoolean ( int32_t  iProp,
bool  f 
) [pure virtual]

Write a boolean property to the POF stream.

Parameters:
iProp the property index
f the bool property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeOctet ( int32_t  iProp,
octet_t  b 
) [pure virtual]

Write an octet property to the POF stream.

Parameters:
iProp the property index
b the octet_t property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeChar16 ( int32_t  iProp,
char16_t  ch 
) [pure virtual]

Write a 16-bit Unicode character property (represented as a char16_t) to the POF stream.

Parameters:
iProp the property index
ch the char16_t property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeInt16 ( int32_t  iProp,
int16_t  n 
) [pure virtual]

Write a 16-bit integer property to the POF stream.

Parameters:
iProp the property index
n the int16_t property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeInt32 ( int32_t  iProp,
int32_t  n 
) [pure virtual]

Write a 32-bit integer property to the POF stream.

Parameters:
iProp the property index
n the int32_t property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeInt64 ( int32_t  iProp,
int64_t  l 
) [pure virtual]

Write a 64-bit integer property to the POF stream.

Parameters:
iProp the property index
l the int64_t property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeFloat32 ( int32_t  iProp,
float32_t  fl 
) [pure virtual]

Write a 32-bit floating-point property to the POF stream.

Parameters:
iProp the property index
fl the float32_t property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeFloat64 ( int32_t  iProp,
float64_t  dfl 
) [pure virtual]

Write a 64-bit floating-point property to the POF stream.

Parameters:
iProp the property index
dfl the float64_t property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeBooleanArray ( int32_t  iProp,
Array< bool >::View  vaf 
) [pure virtual]

Write a boolean array property to the POF stream.

Parameters:
iProp the property index
vaf the bool array property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeOctetArray ( int32_t  iProp,
Array< octet_t >::View  vab 
) [pure virtual]

Write an octect array property to the POF stream.

Parameters:
iProp the property index
vab the octet_t array property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeChar16Array ( int32_t  iProp,
Array< char16_t >::View  vach 
) [pure virtual]

Write a 16-bit Unicode character array property to the POF stream.

Parameters:
iProp the property index
vach the char16_t array property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeInt16Array ( int32_t  iProp,
Array< int16_t >::View  van 
) [pure virtual]

Write a 16-bit integer array property to the POF stream.

Parameters:
iProp the property index
van the int16_t array property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeInt32Array ( int32_t  iProp,
Array< int32_t >::View  van 
) [pure virtual]

Write a 32-bit integer array property to the POF stream.

Parameters:
iProp the property index
van the int32_t array property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeInt64Array ( int32_t  iProp,
Array< int64_t >::View  val 
) [pure virtual]

Write a 64-bit integer array property to the POF stream.

Parameters:
iProp the property index
val the int64_t array property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeFloat32Array ( int32_t  iProp,
Array< float32_t >::View  vafl 
) [pure virtual]

Write a 32-bit floating-point array property to the POF stream.

Parameters:
iProp the property index
vafl the float32_t array property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeFloat64Array ( int32_t  iProp,
Array< float64_t >::View  vadfl 
) [pure virtual]

Write a 64-bit floating-point array property to the POF stream.

Parameters:
iProp the property index
vadfl the float64_t array property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeBinary ( int32_t  iProp,
Binary::View  vBin 
) [pure virtual]

Write a Binary property to the POF stream.

Parameters:
iProp the property index
vBin the Binary property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeString ( int32_t  iProp,
String::View  vs 
) [pure virtual]

Write a String property to the POF stream.

Parameters:
iProp the property index
vs the String property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeRawDate ( int32_t  iProp,
RawDate::View  vDate 
) [pure virtual]

Write a RawDate property to the POF stream.

Parameters:
iProp the property index
vDate the RawDate property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeRawDateTime ( int32_t  iProp,
RawDateTime::View  vdt 
) [pure virtual]

Write a RawDateTime property to the POF stream.

Parameters:
iProp the property index
vdt the RawDateTime property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeRawDayTimeInterval ( int32_t  iProp,
RawDayTimeInterval::View  vInterval 
) [pure virtual]

Write a RawDayTimeInterval property to the POF stream.

Parameters:
iProp the property index
vInterval the RawDayTimeInterval property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeRawTime ( int32_t  iProp,
RawTime::View  vTime 
) [pure virtual]

Write a RawTime property to the POF stream.

Parameters:
iProp the property index
vTime the RawTime property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeRawTimeInterval ( int32_t  iProp,
RawTimeInterval::View  vInterval 
) [pure virtual]

Write a RawTimeInterval property to the POF stream.

Parameters:
iProp the property index
vInterval the RawTimeInterval property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeRawYearMonthInterval ( int32_t  iProp,
RawYearMonthInterval::View  vInterval 
) [pure virtual]

Write a RawYearMonthInterval property to the POF stream.

Parameters:
iProp the property index
vInterval the RawYearMonthInterval property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeObject ( int32_t  iProp,
Object::View  v 
) [pure virtual]

Write an Object property to the POF stream.

The given object must be an instance of one of the following:

Otherwise, a PofSerializer for the object must be obtainable from the PofContext associated with this PofWriter.

Parameters:
iProp the property index
v the Object property to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::lang::IllegalArgumentException if the given property cannot be encoded into a POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter, and UserTypeWriter.

virtual void writeObjectArray ( int32_t  iProp,
ObjectArray::View  va 
) [pure virtual]

Write an ObjectArray property to the POF stream.

Each element of the given array must be an instance (or a collection of instances) of one of the following:

Otherwise, a PofSerializer for each element of the array must be obtainable from the PofContext associated with this PofWriter.

Parameters:
iProp the property index
va the ObjectArray property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::lang::IllegalArgumentException if the given property cannot be encoded into a POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeObjectArray ( int32_t  iProp,
ObjectArray::View  va,
Class::View  vClass 
) [pure virtual]

Write a uniform ObjectArray property to the POF stream.

Each element of the given array must be an instance (or a collection of instances) of one of the following:

Otherwise, a PofSerializer for each element of the array must be obtainable from the PofContext associated with this PofWriter.

Additionally, the type of each element must be equal to the specified class.

Parameters:
iProp the property index
va the ObjectArray property value to write
vClass the class of all elements; must not be NULL
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::lang::IllegalArgumentException if the given property cannot be encoded into a POF stream
coherence::lang::IllegalArgumentException if the type of one or more elements of the array is not equal to the specified class
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeLongArray ( int32_t  iProp,
LongArray::View  vla 
) [pure virtual]

Write a LongArray property to the POF stream.

Each element of the given array must be an instance (or a collection of instances) of one of the following:

Otherwise, a PofSerializer for each element of the array must be obtainable from the PofContext associated with this PofWriter.

Parameters:
iProp the property index
vla the LongArray property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::lang::IllegalArgumentException if the given property cannot be encoded into a POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeLongArray ( int32_t  iProp,
LongArray::View  vla,
Class::View  vClass 
) [pure virtual]

Write a uniform LongArray property to the POF stream.

Each element of the given array must be an instance (or a collection of instances) of one of the following:

Otherwise, a PofSerializer for each element of the array must be obtainable from the PofContext associated with this PofWriter.

Additionally, the type of each element must be equal to the specified class.

Parameters:
iProp the property index
vla the LongArray property value to write
vClass the class of all elements; must not be NULL
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::lang::IllegalArgumentException if the given property cannot be encoded into a POF stream
coherence::lang::IllegalArgumentException if the type of one or more elements of the array is not equal to the specified class
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeCollection ( int32_t  iProp,
Collection::View  vCol 
) [pure virtual]

Write a Collection property to the POF stream.

Each element of the given Collection must be an instance (or collection of instances) of one of the following:

Otherwise, a PofSerializer for each element of the Collection must be obtainable from the PofContext associated with this PofWriter.

Parameters:
iProp the property index
vCol the Collection property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::lang::IllegalArgumentException if the given property cannot be encoded into a POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeCollection ( int32_t  iProp,
Collection::View  vCol,
Class::View  vClass 
) [pure virtual]

Write a uniform Collection property to the POF stream.

Each element of the given Collection must be an instance (or collection of instances) of one of the following:

Otherwise, a PofSerializer for each element of the Collection must be obtainable from the PofContext associated with this PofWriter.

Additionally, the type of each element must be equal to the specified class.

Parameters:
iProp the property index
vCol the Collection property value to write
vClass the class of all elements; must not be NULL
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::lang::IllegalArgumentException if the given property cannot be encoded into a POF stream
coherence::lang::IllegalArgumentException if the type of one or more elements of the Collection is not equal to the specified class
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeMap ( int32_t  iProp,
Map::View  vMap 
) [pure virtual]

Write a Map property to the POF stream.

Each key and value of the given Map must be an instance (or a collection of instances) of one of the following:

Otherwise, a PofSerializer for each key and value of the Map must be obtainable from the PofContext associated with this PofWriter.

Parameters:
iProp the property index
vMap the Map property value to write
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::lang::IllegalArgumentException if the given property cannot be encoded into a POF stream
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeMap ( int32_t  iProp,
Map::View  vMap,
Class::View  vClassKey 
) [pure virtual]

Write a uniform key Map property to the POF stream.

Each key and value of the given Map must be an instance (or a collection of instances) of one of the following:

Otherwise, a PofSerializer for each key and value of the Map must be obtainable from the PofContext associated with this PofWriter.

Additionally, the type of each key must be equal to the specified class.

Parameters:
iProp the property index
vMap the Map property value to write
vClassKey the class of all keys; must not be NULL
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::lang::IllegalArgumentException if the given property cannot be encoded into a POF stream
coherence::lang::IllegalArgumentException if the type of one or more keys of the Map is not equal to the specified class
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual void writeMap ( int32_t  iProp,
Map::View  vMap,
Class::View  vClassKey,
Class::View  vClassValue 
) [pure virtual]

Write a uniform Map property to the POF stream.

Each key and value of the given Map must be an instance (or a collection of instances) of one of the following:

Otherwise, a PofSerializer for each key and value of the Map must be obtainable from the PofContext associated with this PofWriter.

Additionally, the type of each key must be equal to the specified class.

Parameters:
iProp the property index
vMap the Map property value to write
vClassKey the class of all keys; must not be NULL
vClassValue the class of all values; must not be NULL
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::lang::IllegalArgumentException if the given property cannot be encoded into a POF stream
coherence::lang::IllegalArgumentException if the type of one or more keys or values of the Map is not equal to the specified classes
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter.

virtual PofContext::View getPofContext (  )  const [pure virtual]

Return the PofContext object used by this PofWriter to serialize user types to a POF stream.

Returns:
the PofContext object that contains user type meta-data

Implemented in PofBufferWriter.

virtual void setPofContext ( PofContext::View  vCtx  )  [pure virtual]

Configure the PofContext object used by this PofWriter to serialize user types to 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 = hWriter->getPofContext();

 // switch to another PofContext
 PofContext::View vCtxNew = ...;
 hWriter->setContext(vCtxNew);

 // output POF data using the writer
 ...

 // restore the original PofContext
 hWriter->setPofContext(vCtxOrig);
 

Parameters:
vCtx the new PofContext; must not be NULL

Implemented in PofBufferWriter.

virtual int32_t getUserTypeId (  )  const [pure virtual]

Determine the user type that is currently being written.

Returns:
the user type identifier, or -1 if the PofWriter is not currently writing a user type

Implemented in PofBufferWriter, and UserTypeWriter.

virtual int32_t getVersionId (  )  const [pure virtual]

Determine the version identifier of the user type that is currently being written.

Returns:
the integer version ID of the user type; always non-negative
Exceptions:
coherence::lang::IllegalStateException if no user type is being parsed

Implemented in PofBufferWriter, and UserTypeWriter.

virtual void setVersionId ( int32_t  nVersionId  )  [pure virtual]

Set the version identifier of the user type that is currently being written.

Parameters:
nVersionId the user type identifier; must be non-negative
Exceptions:
coherence::lang::IllegalArgumentException if the given version ID is negative
coherence::lang::IllegalStateException if no user type is being written

Implemented in PofBufferWriter, and UserTypeWriter.

virtual PofWriter::Handle createNestedPofWriter ( int32_t  iProp  )  [pure virtual]

Obtain a PofWriter that can be used to write a set of properties into a single property of the current user type.

The returned PofWriter is only valid from the time that it is returned until the next call is made to this PofWriter.

Parameters:
iProp the property index
Returns:
a PofWriter whose contents are nested into a single property of this PofWriter
Exceptions:
coherence::lang::IllegalArgumentException if the property index is invalid, or is less than or equal to the index of the previous property written to the POF stream
coherence::lang::IllegalStateException if no user type is being written
coherence::io::IOException if an I/O error occurs
Since:
Coherence 3.6

Implemented in PofBufferWriter, and UserTypeWriter.

virtual void writeRemainder ( Binary::View  vBinProps  )  [pure virtual]

Write the remaining properties to the POF stream, terminating the writing of the currrent user type.

As part of writing out a user type, this method must be called by the PofSerializer that is writing out the user type, or the POF stream will be corrupted.

Calling this method terminates the current user type by writing a -1 to the POF stream after the last indexed property. Subsequent calls to the various writeXYZ methods of this interface will fail after this method is called.

Parameters:
vBinProps a buffer that contains zero or more indexed properties in binary POF encoded form; may be NULL
Exceptions:
coherence::lang::IllegalStateException if no user type is being written
coherence::io::IOException if an I/O error occurs

Implemented in PofBufferWriter, and UserTypeWriter.


The documentation for this class was generated from the following file:
Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.