TAO_CosNotification  2.1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TAO_Notify::XML_Saver Class Reference

Save Notification Service Topology to an XML file. More...

#include <XML_Saver.h>

Inheritance diagram for TAO_Notify::XML_Saver:
Inheritance graph
Collaboration diagram for TAO_Notify::XML_Saver:
Collaboration graph

Public Member Functions

 XML_Saver (bool timestamp=true)
 
virtual ~XML_Saver ()
 
bool open (const ACE_TString &file_name, size_t backup_count)
 
virtual bool begin_object (CORBA::Long id, const ACE_CString &type, const NVPList &attrs, bool changed)
 
virtual void end_object (CORBA::Long id, const ACE_CString &type)
 
virtual void close (void)
 Close the saver.
 
- Public Member Functions inherited from TAO_Notify::Topology_Saver
virtual ~Topology_Saver ()
 The destructor.
 
virtual bool begin_object (CORBA::Long id, const ACE_CString &type, const NVPList &attrs, bool changed)=0
 Begin the storage of an object.
 
virtual void delete_child (CORBA::Long id, const ACE_CString &type)
 Report deleted children to the saver.
 
virtual void end_object (CORBA::Long id, const ACE_CString &type)=0
 End the storage of an object.
 

Private Member Functions

void backup_file_name (ACE_TCHAR *file_path, size_t nfile)
 

Private Attributes

FILE * output_
 A stream representing our current output.
 
bool close_out_
 
ACE_TString base_name_
 the name of the output file
 
size_t backup_count_
 
bool timestamp_
 true to enable timestamping
 
ACE_CString indent_
 A string consisting of spaces that is our current indentation level.
 

Detailed Description

Save Notification Service Topology to an XML file.

Constructor & Destructor Documentation

TAO_Notify::XML_Saver::XML_Saver ( bool  timestamp = true)

Construct an XML_Saver. Initialization is deferred to "open()"

TAO_Notify::XML_Saver::~XML_Saver ( )
virtual

Member Function Documentation

void TAO_Notify::XML_Saver::backup_file_name ( ACE_TCHAR file_path,
size_t  nfile 
)
private
bool TAO_Notify::XML_Saver::begin_object ( CORBA::Long  id,
const ACE_CString type,
const NVPList attrs,
bool  changed 
)
virtual
void TAO_Notify::XML_Saver::close ( void  )
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 from TAO_Notify::Topology_Saver.

void TAO_Notify::XML_Saver::end_object ( CORBA::Long  id,
const ACE_CString type 
)
virtual
bool TAO_Notify::XML_Saver::open ( const ACE_TString file_name,
size_t  backup_count 
)

Open the output file.

Parameters
file_namethe fully qualified file name
Returns
true if successful

Member Data Documentation

size_t TAO_Notify::XML_Saver::backup_count_
private
ACE_TString TAO_Notify::XML_Saver::base_name_
private

the name of the output file

bool TAO_Notify::XML_Saver::close_out_
private
ACE_CString TAO_Notify::XML_Saver::indent_
private

A string consisting of spaces that is our current indentation level.

FILE* TAO_Notify::XML_Saver::output_
private

A stream representing our current output.

bool TAO_Notify::XML_Saver::timestamp_
private

true to enable timestamping


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