XML_Topology_Factory.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    XML_Topology_Factory.h
00006  *
00007  *  XML_Topology_Factory.h,v 1.9 2006/03/14 06:14:34 jtc Exp
00008  *
00009  *  @author Jonathan Pollack <pollack_j@ociweb.com>
00010  */
00011 //=============================================================================
00012 
00013 #ifndef XML_TOPOLOGY_FACTORY_H
00014 #define XML_TOPOLOGY_FACTORY_H
00015 #include /**/ "ace/pre.h"
00016 
00017 #include "orbsvcs/Notify/Topology_Factory.h"
00018 #include "orbsvcs/Notify/notify_persist_export.h"
00019 
00020 #include "tao/corba.h"
00021 #include "ace/SString.h"
00022 
00023 
00024 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00025 #pragma once
00026 #endif /* ACE_LACKS_PRAGMA_ONCE */
00027 
00028 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00029 
00030 namespace TAO_Notify
00031 {
00032   extern const char TOPOLOGY_ID_NAME[];
00033 
00034   /**
00035    * \brief Create XML topology savers and loaders
00036    *
00037    * Loaded by a svc.conf line like:
00038    * dynamic Topology_Factory Service_Object* TAO_CosNotificationd:_make_XML_Topology_Factory() "[arguments]"
00039    *  where arguments are:
00040    *    -base_path        Base path (directory and filename) for both saving and loading.
00041    *                      .xml will be appended to the base path
00042    *                      Default is ./Notification_Service_Topology
00043    *    -save_base_path   Base path for saving.
00044    *    -load_base_path   Base path for loading.
00045    *    -file_count       How many backup copies to keep.  Default is 1
00046    *    -no_timestamp     Disable timestamping (makes files diffable)
00047    *        Note: you can set both saving and storing to the same file using -base_path
00048    *              Or you can set them independently using -save_base_path
00049    *              and -load_base_path
00050    *
00051    */
00052   class TAO_Notify_Persist_Export XML_Topology_Factory : public Topology_Factory
00053   {
00054   public:
00055     /// The constructor.
00056     XML_Topology_Factory ();
00057     virtual ~XML_Topology_Factory ();
00058 
00059     ////////////////////////////////////
00060     // Override Topology_Factory methods
00061     // documented in Topology_Factory.h
00062     virtual Topology_Saver* create_saver ();
00063     virtual Topology_Loader* create_loader();
00064 
00065     ////////////////////////////////
00066     // Override Share_Object methods
00067     // documented in ace/Shared_Object.h
00068     virtual int init (int argc, ACE_TCHAR *argv[]);
00069     virtual int fini ();
00070 
00071    private:
00072     ACE_CString save_base_path_;
00073     ACE_CString load_base_path_;
00074     size_t backup_count_;
00075     bool timestamp_;
00076   };
00077 
00078 } // namespace TAO_Notify
00079 
00080 TAO_END_VERSIONED_NAMESPACE_DECL
00081 
00082 ACE_FACTORY_DECLARE (TAO_Notify_Persist, TAO_Notify_XML_Topology_Factory)
00083 
00084 #include /**/ "ace/post.h"
00085 #endif /* XML_TOPOLOGY_FACTORY_H */

Generated on Thu Nov 9 13:24:17 2006 for TAO_CosNotification by doxygen 1.3.6