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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
// $Id$
/* -*- C++ -*- */
// ****** Code generated by the The ACE ORB (TAO) IDL Compiler *******
// TAO ORB and the TAO IDL Compiler have been developed by Washington
// University Computer Science's Distributed Object Computing Group.
//
// Information on TAO is available at
// http://www.cs.wustl.edu/~schmidt/TAO.html
#include "tao/corba.h"
#if !defined (__ACE_INLINE__)
#include "PolicyC.i"
#endif /* !defined INLINE */
ACE_RCSID(tao, PolicyC, "$Id$")
CORBA_Policy_ptr CORBA_Policy::_duplicate (CORBA_Policy_ptr obj)
{
if (!CORBA::is_nil (obj))
obj->_incr_refcnt ();
return obj;
} // end of _duplicate
CORBA_Policy_ptr CORBA_Policy::_narrow (
CORBA::Object_ptr obj,
CORBA::Environment &env
)
{
if (CORBA::is_nil (obj))
return CORBA_Policy::_nil ();
if (!obj->_is_a ("IDL:CORBA/Policy:1.0", env))
return CORBA_Policy::_nil ();
STUB_Object *stub = obj->_stubobj ();
stub->_incr_refcnt ();
if (!obj->_is_collocated ()
|| !obj->_servant()
|| obj->_servant()->_downcast ("IDL:CORBA/Policy:1.0") == 0
)
{
CORBA_Policy_ptr new_obj = new CORBA_Policy(stub);
return new_obj;
} // end of if
void* servant = obj->_servant ()->_downcast ("IDL:CORBA/Policy:1.0");
return new POA_CORBA::_tao_collocated_Policy(
ACE_reinterpret_cast(POA_CORBA::Policy_ptr, servant),
stub
);
}
CORBA_Policy_ptr CORBA_Policy::_nil (void)
{
return (CORBA_Policy_ptr)NULL;
} // end of _nil
CORBA::PolicyType CORBA_Policy::policy_type (
CORBA::Environment &_tao_environment
)
{
static const TAO_Param_Data _get_CORBA_Policy_policy_type_paramdata [] =
{
{CORBA::_tc_PolicyType, PARAM_RETURN, 0}
}; // CORBA_Policy_policy_type_paramdata
static const TAO_Call_Data _get_CORBA_Policy_policy_type_calldata =
{"_get_policy_type", 1, 1, _get_CORBA_Policy_policy_type_paramdata, 0, 0};
CORBA::PolicyType _tao_retval = 0;
STUB_Object *istub = this->_stubobj ();
if (istub)
{
void* _tao_arguments[1];
void** _tao_current_arg = _tao_arguments;
*_tao_current_arg = &_tao_retval; _tao_current_arg++;
istub->do_static_call (
_tao_environment,
&_get_CORBA_Policy_policy_type_calldata,
_tao_arguments
);
} // end of if (istub)
return _tao_retval;
}
CORBA_Policy_ptr CORBA_Policy::copy (
CORBA::Environment &_tao_environment
)
{
static const TAO_Param_Data CORBA_Policy_copy_paramdata [] =
{
{CORBA::_tc_Policy, PARAM_RETURN, 0}
}; // CORBA_Policy_copy_paramdata
static const TAO_Call_Data CORBA_Policy_copy_calldata =
{"copy", 1, 1, CORBA_Policy_copy_paramdata, 0, 0};
CORBA_Policy_ptr _tao_retval = CORBA_Policy::_nil ();
STUB_Object *istub = this->_stubobj ();
if (istub)
{
CORBA::Object_ptr _tao_base_retval = CORBA::Object::_nil ();
void* _tao_arguments[1];
void** _tao_current_arg = _tao_arguments;
*_tao_current_arg = &_tao_base_retval; _tao_current_arg++;
istub->do_static_call (
_tao_environment,
&CORBA_Policy_copy_calldata,
_tao_arguments
);
_tao_retval = CORBA_Policy::_narrow (_tao_base_retval, _tao_environment);
CORBA::release (_tao_base_retval);
} // end of if (istub)
return _tao_retval;
}
void CORBA_Policy::destroy (
CORBA::Environment &_tao_environment
)
{
static const TAO_Param_Data CORBA_Policy_destroy_paramdata [] =
{
{CORBA::_tc_void, PARAM_RETURN, 0}
}; // CORBA_Policy_destroy_paramdata
static const TAO_Call_Data CORBA_Policy_destroy_calldata =
{"destroy", 1, 1, CORBA_Policy_destroy_paramdata, 0, 0};
STUB_Object *istub = this->_stubobj ();
if (istub)
{
void* _tao_arguments[1];
void** _tao_current_arg = _tao_arguments;
*_tao_current_arg = 0; _tao_current_arg++;
istub->do_static_call (
_tao_environment,
&CORBA_Policy_destroy_calldata,
_tao_arguments
);
} // end of if (istub)
return;
}
CORBA::Boolean CORBA_Policy::_is_a (const CORBA::Char *value, CORBA::Environment &env)
{
if (
(!ACE_OS::strcmp ((char *)value, "IDL:CORBA/Policy:1.0")) ||
(!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (env))))
return 1; // success using local knowledge
else
return this->CORBA_Object::_is_a (value, env); // remote call
}
const char* CORBA_Policy::_interface_repository_id (void) const
{
return "IDL:CORBA/Policy:1.0";
}
#if !defined (_CORBA_POLICYLIST_CS_)
#define _CORBA_POLICYLIST_CS_
// *************************************************************
// CORBA_PolicyList
// *************************************************************
CORBA_PolicyList::CORBA_PolicyList (void)
{}
CORBA_PolicyList::CORBA_PolicyList (CORBA::ULong max) // uses max size
: TAO_Unbounded_Object_Sequence<CORBA_Policy> (max)
{}
CORBA_PolicyList::CORBA_PolicyList (CORBA::ULong max, CORBA::ULong length, CORBA_Policy_ptr *buffer, CORBA::Boolean release)
: TAO_Unbounded_Object_Sequence<CORBA_Policy> (max, length, buffer, release)
{}
CORBA_PolicyList::CORBA_PolicyList (const CORBA::PolicyList &seq) // copy ctor
: TAO_Unbounded_Object_Sequence<CORBA_Policy> (seq)
{}
CORBA_PolicyList::~CORBA_PolicyList (void) // dtor
{}
#endif /* end #if !defined */
|