TAO_CosNotification  2.2.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
TAO_Notify::Topology_Saver Class Referenceabstract

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

#include <Topology_Saver.h>

Inheritance diagram for TAO_Notify::Topology_Saver:
Inheritance graph
Collaboration diagram for TAO_Notify::Topology_Saver:
Collaboration graph

Public Member Functions

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

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 ( )

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 
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.

idnumeric id for this object
typestring containing the unique type name for this class of objects
attrsa collection of name/value attributes
changedtrue if this object's attributes have changed.
bool want_all_children. If true even changed children should be saved.

Implemented in TAO_Notify::XML_Saver.

void TAO_Notify::Topology_Saver::close ( void  )

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 

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.

idnumeric id for the deleted child
typethe type name for the class of the deleted child.
virtual void TAO_Notify::Topology_Saver::end_object ( CORBA::Long  id,
const ACE_CString type 
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: