blob: b6dc0686d8a2aa5c5b097afe6f97da3f526b77c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
// -*- C++ -*-
//=============================================================================
/**
* @file XML_Topology_Factory.h
*
* $Id$
*
* @author Jonathan Pollack <pollack_j@ociweb.com>
*/
//=============================================================================
#ifndef XML_TOPOLOGY_FACTORY_H
#define XML_TOPOLOGY_FACTORY_H
#include /**/ "ace/pre.h"
#include "orbsvcs/Notify/Topology_Factory.h"
#include "orbsvcs/Notify/notify_persist_export.h"
#include "tao/corba.h"
#include "ace/SString.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
#pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
namespace TAO_Notify
{
extern const char TOPOLOGY_ID_NAME[];
/**
* \brief Create XML topology savers and loaders
*
* Loaded by a svc.conf line like:
* dynamic Topology_Factory Service_Object* TAO_CosNotificationd:_make_XML_Topology_Factory() "[arguments]"
* where arguments are:
* -base_path Base path (directory and filename) for both saving and loading.
* .xml will be appended to the base path
* Default is ./Notification_Service_Topology
* -save_base_path Base path for saving.
* -load_base_path Base path for loading.
* -file_count How many backup copies to keep. Default is 1
* -no_timestamp Disable timestamping (makes files diffable)
* Note: you can set both saving and storing to the same file using -base_path
* Or you can set them independently using -save_base_path
* and -load_base_path
*
*/
class TAO_Notify_Persist_Export XML_Topology_Factory : public Topology_Factory
{
public:
/// The constructor.
XML_Topology_Factory ();
virtual ~XML_Topology_Factory ();
////////////////////////////////////
// Override Topology_Factory methods
// documented in Topology_Factory.h
virtual Topology_Saver* create_saver ();
virtual Topology_Loader* create_loader();
////////////////////////////////
// Override Share_Object methods
// documented in ace/Shared_Object.h
virtual int init (int argc, ACE_TCHAR *argv[]);
virtual int fini ();
private:
ACE_CString save_base_path_;
ACE_CString load_base_path_;
size_t backup_count_;
bool timestamp_;
};
} // namespace TAO_Notify
TAO_END_VERSIONED_NAMESPACE_DECL
ACE_FACTORY_DECLARE (TAO_Notify_Persist, TAO_Notify_XML_Topology_Factory)
#include /**/ "ace/post.h"
#endif /* XML_TOPOLOGY_FACTORY_H */
|