|
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 |
| |
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:
-
|
|
virtual int32_t |
getUserTypeIdentifier (Object::View v) const |
| |
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:
-
|
|
virtual int32_t |
getUserTypeIdentifier (Class::View vClass) const |
| |
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:
-
|
|
virtual int32_t |
getUserTypeIdentifier (String::View vsClass) const |
| |
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:
-
|
|
virtual String::View |
getClassName (int32_t nTypeId) const |
| |
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:
-
|
|
virtual Class::View |
getClass (int32_t nTypeId) const |
| |
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:
-
|
|
virtual bool |
isUserType (Object::View v) const |
| |
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:
-
|
|
virtual bool |
isUserType (Class::View vClass) const |
| |
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:
-
|
|
virtual bool |
isUserType (String::View vsClass) const |
| |
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:
-
|
|
virtual void |
serialize (WriteBuffer::BufferOutput::Handle hOut, Object::View v) const |
| |
Serialize an object to a WriteBuffer by writing its state using the specified BufferOutput object.
- Parameters:
-
|
hOut |
the BufferOutput with which to write the object's state |
|
v |
the object to serialize |
virtual void IOException if an I/O error occurs
|
|
virtual Object::Holder |
deserialize (ReadBuffer::BufferInput::Handle hIn) const |
| |
Deserialize an object from a ReadBuffer by reading its state using the specified BufferInput object.
- Parameters:
-
|
hIn |
the BufferInput with which to read the object's state |
- Returns:
- the deserialized user type instance
virtual void IOException if an I/O error occurs
|
|
virtual void |
toStream (std::ostream &out) const |
| |
Output a human-readable description of this Object to the given stream.
coherence::lang::operator<<(std::ostream, Object::View) is defined and will call into the toStream method, to output Objects. If a managed String object is desired, the COH_TO_STRING macro can be used to build up a String from streamable contents.
- Parameters:
-
|
out |
the stream used to output the description |
|
Protected Member Functions
|
| virtual void |
validateTypeId (int32_t nTypeId) const |
| |
Ensure that the given user type identifier is valid.
|
Protected Attributes
|
|
FinalHandle< LongArray > |
m_hlaClass |
| |
A LongArray of user types, indexed by type identifier.
|
|
FinalHandle< LongArray > |
m_hlaSerializer |
| |
A LongArray of PofSerializer objects, indexed by type identifier.
|
|
FinalHandle< Map > |
m_hMapClassName |
| |
A Map that contains mappings from a registered class name to type identifier.
|
|
FinalHandle< ThreadGate > |
m_hGate |
| |
ThreadGate used to synchronize access to this PofContext.
|