blob: eb3e1ea1bc01cf4d79d7027e271141d5f1ef8baf (
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
86
87
88
89
90
91
92
93
94
|
/* -*- C++ -*- */
//=============================================================================
/**
* @file TAO_Object_Group_Creator.cpp
*
* $Id$
*
* This file is part of Fault Tolerant CORBA.
* Utility to Create Object Group
*
* @author Dale Wilson <wilson_d@ociweb.com>
*/
//=============================================================================
#ifndef TAO_OBJECT_GROUP_CREATOR_H
#define TAO_OBJECT_GROUP_CREATOR_H
#include <ace/ACE.h>
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include <orbsvcs/FT_ReplicationManagerC.h>
#include <orbsvcs/PortableGroupC.h>
#include <ace/SString.h>
#include <ace/Vector_T.h>
namespace TAO
{
class Object_Group_Creator
{
typedef ACE_Vector<ACE_CString> StringVec;
public:
///////////////////////////
// construction/destruction
Object_Group_Creator ();
~Object_Group_Creator ();
/////////////////
// initialization
int parse_args (int argc, char *argv[]);
int init (CORBA::ORB_var & orb ACE_ENV_ARG_DECL);
////////////
// execution
int run (ACE_ENV_SINGLE_ARG_DECL);
////////////
// shut down
int fini ();
/////////////////
// implementation
private:
void usage (ostream & out)const;
int write_ior_file(const char * outputFile, const char * ior);
int create_group(const char * type_id ACE_ENV_ARG_DECL);
int kill_type(const char * type_id ACE_ENV_ARG_DECL);
////////////////////
// forbidden methods
private:
Object_Group_Creator (const Object_Group_Creator & rhs);
Object_Group_Creator & operator = (const Object_Group_Creator & rhs);
////////////////
// Data members
private:
CORBA::ORB_var orb_;
const char * registry_filename_;
PortableGroup::FactoryRegistry_var registry_;
StringVec create_types_;
StringVec kill_types_;
::FT::ReplicationManager_var replication_manager_;
/**
* bool: true if we have a real replication manager
*/
int have_replication_manager_;
/**
* sequence number applied to created IOGRs
*/
unsigned long iogr_seq_;
};
} // namespace TAO
#endif // TAO_OBJECT_GROUP_CREATOR_H
|