Oracle Coherence for C++ API
Release 3.7.1.0

E22845-01

PofContext Class Reference

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

Inherits Serializer.

Inherited by SimplePofContext [virtual].

List of all members.


Detailed Description

A PofContext is a registry of PofSerializer instances, and thus, represents a set of user types that can be serialized to and deserialized from a POF stream.

Author:
jh 2008.01.18
 

Public Types

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

Public Member Functions

virtual
PofSerializer::View 
getPofSerializer (int32_t nTypeId) const =0
  Return a PofSerializer that can be used to serialize and deserialize an objectof the specified user type to and from a POF stream.
virtual int32_t  getUserTypeIdentifier (Object::View v) const =0
  Determine the user type identifier associated with the given object.
virtual int32_t  getUserTypeIdentifier (Class::View vClass) const =0
  Determine the user type identifier associated with the given class.
virtual int32_t  getUserTypeIdentifier (String::View vsClass) const =0
  Determine the user type identifier associated with the given class name.
virtual String::View  getClassName (int32_t nTypeId) const =0
  Determine the name of the class associated with the given user type identifier.
virtual Class::View  getClass (int32_t nTypeId) const =0
  Determine the class associated with the given user type identifier.
virtual bool  isUserType (Object::View v) const =0
  Determine if the given object is an instance of a user type known to this PofContext.
virtual bool  isUserType (Class::View vClass) const =0
  Determine if the given class is a user type known to this PofContext.
virtual bool  isUserType (String::View vsClass) const =0
  Determine if the class with the given name is a user type known to this PofContext.

Member Function Documentation

virtual PofSerializer::View getPofSerializer ( int32_t  nTypeId  )  const [pure virtual]

Return a PofSerializer that can be used to serialize and deserialize an objectof the specified user type to and from a POF stream.

Parameters:
  nTypeId  the type identifier of the user type that can be serialized and deserialized using the returned PofSerializer
Returns:
a PofSerializer for the specified user type
Exceptions:
  coherence::lang::IllegalArgumentException  if the specified user type is negative or unknown to this PofContext

Implemented in SimplePofContext.

virtual int32_t getUserTypeIdentifier ( Object::View  v  )  const [pure virtual]

Determine the user type identifier associated with the given object.

Parameters:
  v  an instance of a user type; must not be NULL
Returns:
the type identifier of the user type associated with the given object
Exceptions:
  coherence::lang::IllegalArgumentException  if the user type associated with the given object is unknown to this PofContext or if the object is NULL

Implemented in SimplePofContext.

virtual int32_t getUserTypeIdentifier ( Class::View  vClass  )  const [pure virtual]

Determine the user type identifier associated with the given class.

Parameters:
  vClass  a user type class; must not be NULL
Returns:
the type identifier of the user type associated with the given class
Exceptions:
  coherence::lang::IllegalArgumentException  if the user type associated with the given class is unknown to this PofContext or if the class is NULL

Implemented in SimplePofContext.

virtual int32_t getUserTypeIdentifier ( String::View  vsClass  )  const [pure virtual]

Determine the user type identifier associated with the given class name.

Parameters:
  vsClass  the name of a user type class; must not be NULL
Returns:
the type identifier of the user type associated with the given class name
Exceptions:
  coherence::lang::IllegalArgumentException  if the user type associated with the given class name is unknown to this PofContext or if the class name is NULL

Implemented in SimplePofContext.

virtual String::View getClassName ( int32_t  nTypeId  )  const [pure virtual]

Determine the name of the class associated with the given user type identifier.

Parameters:
  nTypeId  the user type identifier; must be non-negative
Returns:
the name of the class associated with the specified user type identifier
Exceptions:
  coherence::lang::IllegalArgumentException  if the specified user type is negative or unknown to this PofContext

Implemented in SimplePofContext.

virtual Class::View getClass ( int32_t  nTypeId  )  const [pure virtual]

Determine the class associated with the given user type identifier.

Parameters:
  nTypeId  the user type identifier; must be non-negative
Returns:
the class associated with the specified user type identifier
Exceptions:
  coherence::lang::IllegalArgumentException  if the specified user type is negative or unknown to this PofContext

Implemented in SimplePofContext.

virtual bool isUserType ( Object::View  v  )  const [pure virtual]

Determine if the given object is an instance of a user type known to this PofContext.

Parameters:
  v  the object to test; must not be NULL
Returns:
true iff the specified object is of a valid user type
Exceptions:
  coherence::lang::IllegalArgumentException  if the given object is NULL

Implemented in SimplePofContext.

virtual bool isUserType ( Class::View  vClass  )  const [pure virtual]

Determine if the given class is a user type known to this PofContext.

Parameters:
  vClass  the class to test; must not be NULL
Returns:
true iff the specified class is a valid user type known to this PofContext
Exceptions:
  coherence::lang::IllegalArgumentException  if the given class is NULL

Implemented in SimplePofContext.

virtual bool isUserType ( String::View  vsClass  )  const [pure virtual]

Determine if the class with the given name is a user type known to this PofContext.

Parameters:
  vsClass  the name of the class to test; must not be NULL
Returns:
true iff the class with the specified name is a valid user type
Exceptions:
  coherence::lang::IllegalArgumentException  if the given class name is NULL

Implemented in SimplePofContext.


The documentation for this class was generated from the following file:

Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.