blob: aba15a69a2ad8ed0f0d19e174c6c9e8b9bffae1a (
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
|
// $Id$
// ============================================================================
//
// = LIBRARY
// TAO/tests
//
// = FILENAME
// server.h
//
// = AUTHOR
// Andy Gokhale, Sumedh Mungee, and Sergio Flores-Gaitan
//
// ============================================================================
// ACE includes.
#include "ace/Get_Opt.h"
#include "ace/Log_Msg.h"
#include "ace/ARGV.h"
#include "ace/Sched_Params.h"
// TAO includes.
#include "tao/corba.h"
// MT Cubit application includes.
#include "cubit_i.h"
#if defined (VME_DRIVER)
#include <hostLib.h>
extern "C" STATUS vmeDrv (void);
extern "C" STATUS vmeDevCreate (char *);
#endif /* VME_DRIVER */
// Global Variables
static CORBA::String key = CORBA::String ("Cubit");
// Size of the string for holding the stringified object reference.
// Sumedh, what is the rationale for a string of size 30? Can you use
// a more general parameter instead? Perhaps this needs to go into
// TAO somewhere?
const u_int OBJECT_STRING_SIZE = 30;
class Cubit_Task : public ACE_Task<ACE_NULL_SYNCH>
// = TITLE
// Encapsulates an ORB for the Cubit application.
{
public:
Cubit_Task (const char *args,
const char* orbname,
u_int num_of_objs);
// Constructor.
virtual int svc (void);
// Active Object entry point.
protected:
Cubit_Task (void);
// No-op constructor.
private:
int initialize_orb (void);
// Initialize the ORB, and POA.
int create_servants (void);
// Create the servants
char *orbname_;
// Name of the ORB.
char *orbargs_;
// ORB arguments.
u_int num_of_objs_;
// Number of objects we're managing.
CORBA::ORB_var orb_;
// Pointer to the ORB
PortableServer::POA_var root_poa_;
// Pointer to the Root POA
PortableServer::POA_var poa_;
// Pointer to the child POA used on the application.
PortableServer::POAManager_var poa_manager_;
// The POA Manager for both the root POA and the child POA.
Cubit_i **servants_;
// Array to hold the servants
};
|