Oracle Coherence for C++ API
Release 3.7.1.0

E22845-01

PofSerializer Class Reference

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

Inherits Object.

Inherited by PofAnnotationSerializer [virtual], PortableObjectSerializer [virtual], PrincipalPofSerializer [virtual], SubjectPofSerializer [virtual], ThrowablePofSerializer [virtual], and TypedSerializer [virtual].

List of all members.


Detailed Description

The PofSerializer interface provides the capability of reading and writing an object from and to a Portable Object Format (POF) stream.

Author:
jh 2008.01.14
 

Public Types

typedef spec::Handle Handle
 PofSerializer Handle definition.
typedef spec::View View
 PofSerializer View definition.
typedef spec::Holder Holder
 PofSerializer Holder definition.
typedef TypedHandle
< PofReader
PofReaderHandle
 PofReader Handle definition.
typedef TypedHandle
< PofWriter
PofWriterHandle
 PofWriter Handle definition.

Public Member Functions

virtual void serialize (PofWriterHandle hOut, Object::View v) const =0
 Serialize a user type instance to a POF stream by writing its state using the specified PofWriter.
virtual Object::Holder deserialize (PofReaderHandle hIn) const =0
 Deserialize a user type instance from a POF stream by reading its state using the specified PofReader.

Member Function Documentation

virtual void serialize ( PofWriterHandle  hOut,
    Object::View  v 
  )    const [pure virtual]

Serialize a user type instance to a POF stream by writing its state using the specified PofWriter.

An implementation of PofSerializer is required to follow the following steps in sequence for writing out an Object of a user type:

  1. If the object is Evolvable, the implementation must set the version by calling PofWriter::setVersionId().
  2. The implementation may write any combination of the properties of the user type by using the "write" methods of the PofWriter, but it must do so in the order of the property indexes.
  3. After all desired properties of the user type have been written, the implementation must terminate the writing of the user type by calling PofWriter::writeRemainder().

Parameters:
 hOut a PofWriter to use for writing the object's state
 v an object to serialize

virtual Object::Holder deserialize ( PofReaderHandle  hIn  )  const [pure virtual]

Deserialize a user type instance from a POF stream by reading its state using the specified PofReader.

An implementation of PofSerializer is required to follow the following steps in sequence for reading in an object of a user type:

  1. If the object is Evolvable, the implementation must get the version by calling PofWriter::getVersionId().
  2. The implementation may read any combination of the properties of the user type by using "read" methods of the PofReader, but it must do so in the order of the property indexes.
  3. After all desired properties of the user type have been read, the implementation must terminate the reading of the user type by calling PofReader::readRemainder().

Parameters:
 hIn a PofReader to use for reading the Object's state
Returns:
the deserialized user type instance


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