Oracle Coherence for C++ API
Release 3.7.1.0

E22845-01

PofAnnotationSerializer Class Reference

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

Inherits Object, and PofSerializer.

List of all members.


Detailed Description

A PofAnnotationSerializer provides annotation based (de)serialization.

This serializer must be instantiated with the intended class which is eventually scanned for the presence of the following annotations.

This serializer supports classes iff they are annotated with the type level annotation; Portable. This annotation is a marker indicating the ability to (de)serialize using this serializer.

All methods annotated with PortableProperty are explicitly deemed POF serializable with the option of specifying overrides to provide explicit behaviour such as:

The PortableProperty::getIndex() (POF index) can be omitted iff the auto-indexing feature is enabled. This is enabled by instantiating this class with the fAutoIndex constructor argument. This feature determines the index based on any explicit indexes specified and the name of the portable properties. Currently objects with multiple versions is not supported. The following illustrates the auto index algorithm:
NameExplicit IndexDetermined Index
c11
a 0
b 2

NOTE: This implementation does support objects that implement Evolvable.

Author:
hr 2011.06.29
Since:
3.7.1
See also:
COH_REGISTER_TYPED_CLASS

COH_REGISTER_POF_ANNOTATED_CLASS

COH_REGISTER_POF_ANNOTATED_CLASS_AI

Portable

 

Public Types

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

Public Member Functions

virtual void serialize (PofWriter::Handle hOut, Object::View v) const
  
virtual Object::Holder deserialize (PofReader::Handle hIn) const
  

Protected Member Functions

 PofAnnotationSerializer (int32_t nTypeId, Class::View vClz, bool fAutoIndex=false)
 Constructs a PofAnnotationSerializer.
virtual void initialize (int32_t nTypeId, Class::View vClz, bool fAutoIndex)
 Initialize this class based on the provided information.

Constructor & Destructor Documentation

PofAnnotationSerializer ( int32_t  nTypeId,
    Class::View  vClz,
    bool  fAutoIndex = false 
  )    [protected]

Constructs a PofAnnotationSerializer.

Parameters:
 nTypeId the POF type id
 vClz type this serializer is aware of
 fAutoIndex turns on the auto index feature, default = false


Member Function Documentation

virtual void initialize ( int32_t  nTypeId,
    Class::View  vClz,
    bool  fAutoIndex 
  )    [protected, virtual]

Initialize this class based on the provided information.

Parameters:
 nTypeId the POF type id
 vClz type this serializer is aware of
 fAutoIndex turns on the auto index feature


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