CXXR (C++ R)
Public Member Functions | Static Public Member Functions
CXXR::S11nScope Class Reference

Class providing supplementary information for serialization. More...

#include <S11nScope.hpp>

List of all members.

Public Member Functions

 S11nScope ()
 Primary constructor.

Static Public Member Functions

static void defineRelocation (GCNode *from, GCNode *to)
 Define a deserialization relocation.
static GCNoderelocate (GCNode *from)
 Apply defined relocations.

Detailed Description

Class providing supplementary information for serialization.

This class is used to provide supplementary information to control the behaviour of deserialization. It is mandatory that any use of boost::serialization to deserialize GCNode objects takes place within the lifetime of a S11nScope object.

One function of this class is to manage relocation during deserialization, as described for class GCNode::PtrS11n . This is achieved using the functions defineRelocation() and relocate().

S11nScope objects are intended to be allocated on the processor stack: specifically, the class implementation requires that S11nScope objects are destroyed in the reverse order of creation, and the destructor checks this.


Member Function Documentation

void S11nScope::defineRelocation ( GCNode from,
GCNode to 
)
static

Define a deserialization relocation.

This function defines a deserialization relocation within the innermost S11nScope.

Parameters:
fromNon-null pointer value to be relocated.
toNon-null pointer value to which from is to be mapped.
GCNode * S11nScope::relocate ( GCNode from)
static

Apply defined relocations.

Parameters:
fromPointer possibly to be relocated.
Returns:
If a relocation of from has been defined within the innermost S11nScope, returns the pointer value to which from is mapped. Otherwise returns a null pointer.

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