SessionItemDeserializer Class Reference

Used by SessionItems during session deserialization to restore their state from the saved session. More...

#include <SessionItemDeserializer.h>

List of all members.

Public Member Functions

virtual bool deserialize (void *pData, unsigned int size)=0
virtual bool deserialize (std::vector< unsigned char > &data)=0
virtual
XERCES_CPP_NAMESPACE_QUALIFIER
DOMDocument * 
deserialize (XmlReader &reader)=0
virtual
XERCES_CPP_NAMESPACE_QUALIFIER
DOMElement * 
deserialize (XmlReader &reader, const char *pRootElementName)=0
virtual int getCurrentBlock () const =0
virtual void nextBlock ()=0
virtual std::vector< int64_t > getBlockSizes () const =0

Protected Member Functions

virtual ~SessionItemDeserializer ()


Detailed Description

Used by SessionItems during session deserialization to restore their state from the saved session.

See also:
SessionItem, SessionItemSerializer

Definition at line 25 of file SessionItemDeserializer.h.


Constructor & Destructor Documentation

virtual SessionItemDeserializer::~SessionItemDeserializer (  )  [protected, virtual]

Destroys the SessionItemDeserializer object.

The SessionItemDeserializer object is automatically deleted by SessionManager. Plug-ins do not need to destroy it.

Definition at line 132 of file SessionItemDeserializer.h.


Member Function Documentation

virtual bool SessionItemDeserializer::deserialize ( void *  pData,
unsigned int  size 
) [pure virtual]

Restores a portion of the data from a serialized SessionItem.

This method reads some data from the session and provides it back to the caller. The data will be retrieved from the current block. The data in a block in the session can be retrieved incrementally via multiple calls to this method.

Parameters:
pData A pointer to a buffer into which the data is to be placed. The buffer must be big enough to hold the specified number of bytes of data.
size The number of bytes to be placed into the buffer
Returns:
True if the specified number of bytes were successfully retrieved from the session or false otherwise.

virtual bool SessionItemDeserializer::deserialize ( std::vector< unsigned char > &  data  )  [pure virtual]

Restores a portion of the data from a serialized SessionItem.

This method reads some data from the session and provides it back to the caller. The data will be retrieved from the current block. The data in a block in the session can be retrieved incrementally via multiple calls to this method.

Parameters:
data A vector into which the data should be placed. The size of the vector determines the amount of data that will be retrieved from the session.
Returns:
True if enough data to fill the vector were successfully retrieved from the session or false otherwise.

virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* SessionItemDeserializer::deserialize ( XmlReader reader  )  [pure virtual]

Restores a portion of the data from a serialized SessionItem.

This method reads all of the data from a block in the session, parses it as XML and returns the root node.

Parameters:
reader The XmlReader to parse the session data with.
Returns:
The XML root node if the parse was successful, or NULL otherwise.

virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* SessionItemDeserializer::deserialize ( XmlReader reader,
const char *  pRootElementName 
) [pure virtual]

Restores a portion of the data from a serialized SessionItem.

This is a convenience function that reads all of the data from a block in the session, parses it as XML and returns the root node if the root node has the specified name.

Parameters:
reader The XmlReader to parse the session data with.
pRootElementName The name of the root element.
Returns:
The XML root node if the parse was successful, or NULL otherwise.

virtual int SessionItemDeserializer::getCurrentBlock (  )  const [pure virtual]

Accessor for the current block index.

Returns:
The block number of the current block.

virtual void SessionItemDeserializer::nextBlock (  )  [pure virtual]

Moves to the next block of the serialized session.

This method moves the deserializer to the next block of serialized data in the session. This method should be used when deserializing data from a SessionItem that stored its data in multiple blocks via SessionItemSerializer::endBlock().

See also:
SessionItemSerializer

virtual std::vector<int64_t> SessionItemDeserializer::getBlockSizes (  )  const [pure virtual]

Returns the sizes of the blocks in the serialized item.

This method returns the sizes of the blocks that were saved when the SessionItem was serialized.

Returns:
A vector containing the size of each block.


Software Development Kit - Opticks 4.9.0 Build 16218