TAO_Notify::Topology_Saver Class Reference

An interface to be implemented by objects that save Topology. More...

#include <Topology_Saver.h>

Inheritance diagram for TAO_Notify::Topology_Saver:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~Topology_Saver ()
 The destructor.
virtual bool begin_object (CORBA::Long id, const ACE_CString &type, const NVPList &attrs, bool changed ACE_ENV_ARG_DECL)=0
 Begin the storage of an object.
virtual void delete_child (CORBA::Long id, const ACE_CString &type ACE_ENV_ARG_DECL_NOT_USED)
 Report deleted children to the saver.
virtual void end_object (CORBA::Long id, const ACE_CString &type ACE_ENV_ARG_DECL)=0
 End the storage of an object.
virtual void close (ACE_ENV_SINGLE_ARG_DECL)
 Close the saver.

Detailed Description

An interface to be implemented by objects that save Topology.

A persistent topology store must provide an implemention this interface.


Constructor & Destructor Documentation

TAO_Notify::Topology_Saver::~Topology_Saver  )  [virtual]
 

The destructor.


Member Function Documentation

virtual bool TAO_Notify::Topology_Saver::begin_object CORBA::Long  id,
const ACE_CString type,
const NVPList attrs,
bool changed  ACE_ENV_ARG_DECL
[pure virtual]
 

Begin the storage of an object.

Call this function with the type and ID of an object to be stored. This object may have children, and this will necessitate nested calls to begin_object. Design principle: Names should be descriptive enough to allow the objects' parent to create an instance of the desired class. This instance will be registered with the poa using the id. The instance itself should will load its own attributes. Example <proxy type="push_supplier" events="any" id="20"...> is not a good design because the name "proxy" is not descriptive enough. "<structured_proxy_push_supplier id="20"...> is better because this allows the parent to create the correct type of object without decoding attributes.

Parameters:
id numeric id for this object
type string containing the unique type name for this class of objects
attrs a collection of name/value attributes
change true if this object's attributes have changed.
Returns:
bool want_all_children. If true even changed children should be saved.

Implemented in TAO_Notify::XML_Saver.

virtual void TAO_Notify::Topology_Saver::close ACE_ENV_SINGLE_ARG_DECL   )  [virtual]
 

Close the saver.

This is not pure virtual. The default implementation does nothing.

There should be a corresponding open, but the signature may vary based on the type of saver, so we can't include it in the interface.

Reimplemented in TAO_Notify::XML_Saver.

virtual void TAO_Notify::Topology_Saver::delete_child CORBA::Long  id,
const ACE_CString &type  ACE_ENV_ARG_DECL_NOT_USED
[inline, virtual]
 

Report deleted children to the saver.

Use the ID and "type" as passed in to determine which child we should delete. A parent should call this function when one of its children is deleted.

Parameters:
id numeric id for the deleted child
type the type name for the class of the deleted child.

virtual void TAO_Notify::Topology_Saver::end_object CORBA::Long  id,
const ACE_CString &type  ACE_ENV_ARG_DECL
[pure virtual]
 

End the storage of an object.

This function should be called to end the scope of the current object and commit it to the persistent store.

Implemented in TAO_Notify::XML_Saver.


The documentation for this class was generated from the following files:
Generated on Wed Nov 23 16:24:03 2005 for TAO_CosNotification by  doxygen 1.4.5