Oracle Coherence for C++ API
Release 3.7.1.0

E22845-01

SerializationHelper Class Reference

#include <coherence/util/SerializationHelper.hpp>

Inherits Object.

List of all members.


Detailed Description

Miscellaneous serialization utilities.

Author:
phf 2011.04.19
Since:
Coherence 3.7.1
 

Public Types

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

Static Public Member Functions

static Binary::View decorateBinary (Binary::View vBinValue, int32_t nDecoration)
 Decorate the specified Binary value with the specified integer decoration.
static int32_t extractIntDecoration (Binary::View vBin)
 Extract a decoration value from the specified Binary that contains an int decoration.
static bool isIntDecorated (Binary::View vBin)
 Check whether or not the specified Binary has an integer decoration.
static Binary::View removeIntDecoration (Binary::View vBin)
 Remove a decoration value from the specified Binary that contains a representation of an IntDecoratedObject.
static Binary::View toBinary (Object::View v, Serializer::View vSerializer)
 Serialize an object into its Binary form.
static Object::Holder fromBinary (Binary::View vBin, Serializer::View vSerializer)
 Deserialize an object from its Binary form.

Static Protected Attributes

static const int32_t deco_value
 Decoration: The original value (before being decorated).
static const octet_t fmt_bin_deco
 Serialization format: Decorated Binary value.
static const octet_t fmt_bin_ext_deco
 Serialization format: Extended-range Decorated Binary value.
static const octet_t fmt_ext
 Serialization format: A DefaultSerializer is NOT used.
static const octet_t fmt_ido
 Serialization format: Integer-decorated value.

Member Function Documentation

static Binary::View decorateBinary ( Binary::View  vBinValue,
    int32_t  nDecoration 
  )    [static]

Decorate the specified Binary value with the specified integer decoration.

Parameters:
 vBinValue the Binary value to be decorated
 nDecoration the integer decoration
Returns:
the decorated (with integer decoration) Binary object

static int32_t extractIntDecoration ( Binary::View  vBin  )  [static]

Extract a decoration value from the specified Binary that contains an int decoration.

Parameters:
 vBin the Binary object
Returns:
the integer decoration value
Exceptions:
 IllegalArgumentException if the Binary does not have an int decoration

static bool isIntDecorated ( Binary::View  vBin  )  [static]

Check whether or not the specified Binary has an integer decoration.

Parameters:
 vBin the Binary object
Returns:
true if the Binary contains (starts with) an integer decoration; false otherwise

static Binary::View removeIntDecoration ( Binary::View  vBin  )  [static]

Remove a decoration value from the specified Binary that contains a representation of an IntDecoratedObject.

Parameters:
 vBin the Binary object
Returns:
the undecorated Binary value

static Binary::View toBinary ( Object::View  v,
    Serializer::View  vSerializer 
  )    [static]

Serialize an object into its Binary form.

Parameters:
 v object to serialize
 vSerializer Serializer to use
Returns:
Binary representation of the specified object

static Object::Holder fromBinary ( Binary::View  vBin,
    Serializer::View  vSerializer 
  )    [static]

Deserialize an object from its Binary form.

Parameters:
 vBin Binary representation of an object
 vSerializer Serializer to use
Returns:
deserialized object
Exceptions:
 IOException if an I/O error occurs


Member Data Documentation

const octet_t fmt_bin_deco [static, protected]

Serialization format: Decorated Binary value.

Structure is:

 byte 0    : format identifier (18)
 byte 1    : bit mask of decoration identifiers (see DECO_* constants)
 byte 2    : packed int specifying the length of the first decoration
 byte next : binary data
 ...
 
For each decoration, there is a packed int for its length, followed by its binary data. The first decoration is the decorated value itself, if present.

Note: fmt_ido cannot be combined with fmt_bin_deco.

const octet_t fmt_bin_ext_deco [static, protected]

Serialization format: Extended-range Decorated Binary value.

Structure is:

 byte 0    : format identifier (19)
 byte 1    : bit mask of decoration identifiers (see DECO_* constants),
             in the packed long format (1-10 bytes)
 byte next : packed int specifying the length of the first decoration
 byte next : binary data
 ...
 
For each decoration, there is a packed int for its length, followed by its binary data. The first decoration is the decorated value itself, if present.

Note: fmt_ido cannot be combined with fmt_bin_ext_deco.


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