#include <coherence/io/pof/SimplePofContext.hpp>
Public Types | |
typedef spec::Handle | Handle |
SimplePofContext Handle definition. | |
typedef spec::View | View |
SimplePofContext View definition. | |
typedef spec::Holder | Holder |
SimplePofContext Holder definition. | |
Public Member Functions | |
virtual void | registerUserType (int32_t nTypeId, Class::View vClass, PofSerializer::View vSerializer) |
Associate a user type with a type identifier and PofSerializer. | |
virtual void | unregisterUserType (int32_t nTypeId) |
Unregister a user type previously registered using the specified type identifier. | |
virtual PofSerializer::View | getPofSerializer (int32_t nTypeId) const |
virtual int32_t | getUserTypeIdentifier (Object::View v) const |
virtual int32_t | getUserTypeIdentifier (Class::View vClass) const |
virtual int32_t | getUserTypeIdentifier (String::View vsClass) const |
virtual String::View | getClassName (int32_t nTypeId) const |
virtual Class::View | getClass (int32_t nTypeId) const |
virtual bool | isUserType (Object::View v) const |
virtual bool | isUserType (Class::View vClass) const |
virtual bool | isUserType (String::View vsClass) const |
virtual void | serialize (WriteBuffer::BufferOutput::Handle hOut, Object::View v) const |
virtual Object::Holder | deserialize (ReadBuffer::BufferInput::Handle hIn) const |
virtual TypedHandle < const String > | toString () const |
virtual bool | isReferenceEnabled () const |
Determine if Identity/Reference type support is enabled for this SimplePofContext. | |
virtual void | setReferenceEnabled (bool fEnabled) |
Enable or disable POF Identity/Reference type support for this SimplePofContext. | |
virtual void | setReferenceEnabled (bool fEnabled) const |
Enable or disable POF Identity/Reference type support for this SimplePofContext. | |
Protected Member Functions | |
SimplePofContext (const SimplePofContext &that) | |
Copy constructor. | |
virtual void | validateTypeId (int32_t nTypeId) const |
Ensure that the given user type identifier is valid. | |
Protected Attributes | |
FinalHandle< LongArray > | f_hlaClass |
A LongArray of user types, indexed by type identifier. | |
FinalHandle< LongArray > | f_hlaSerializer |
A LongArray of PofSerializer objects, indexed by type identifier. | |
FinalHandle< Map > | f_hMapClassName |
A Map that contains mappings from a registered class name to type identifier. | |
bool | m_fReferenceEnabled |
True if POF Identity/Reference type support is enabled. |
virtual void registerUserType | ( | int32_t | nTypeId, | |
Class::View | vClass, | |||
PofSerializer::View | vSerializer | |||
) | [virtual] |
Associate a user type with a type identifier and PofSerializer.
nTypeId | the type identifier of the specified user type; must be greater or equal to 0 | |
vClass | the user type to register with this PofContext; must not be NULL | |
vSerializer | the PofSerializer that will be used to serialize and deserialize objects of the specified class; must not be NULL |
coherence::lang::IllegalArgumentException | on invalid type identifer, class, or PofSerializer |
virtual void unregisterUserType | ( | int32_t | nTypeId | ) | [virtual] |
Unregister a user type previously registered using the specified type identifier.
nTypeId | the type identifier of the user type to unregister |
coherence::lang::IllegalArgumentException | if the specified user type identifier is unknown to this PofContext |
virtual void validateTypeId | ( | int32_t | nTypeId | ) | const [protected, virtual] |
Ensure that the given user type identifier is valid.
nTypeId | the user type identifier to validate |
coherence::lang::IllegalArgumentException | if the given user type identifier is negative |
virtual bool isReferenceEnabled | ( | ) | const [virtual] |
Determine if Identity/Reference type support is enabled for this SimplePofContext.
virtual void setReferenceEnabled | ( | bool | fEnabled | ) | [virtual] |
Enable or disable POF Identity/Reference type support for this SimplePofContext.
fEnabled | true to enable POF Identity/Reference type support; false to disable |
virtual void setReferenceEnabled | ( | bool | fEnabled | ) | const [virtual] |
Enable or disable POF Identity/Reference type support for this SimplePofContext.
fEnabled | true to enable POF Identity/Reference type support; false to disable |