/usr/include/omniORB4/CORBA_vartypes.h is in libomniorb4-dev 4.1.6-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 | // -*- Mode: C++; -*-
// Package : omniORB
// CORBA_vartypes.h Created on: 16/7/99
// Author : Sai Lai Lo (sll)
//
// Copyright (C) 1996-1999 AT&T Laboratories Cambridge
//
// This file is part of the omniORB library
//
// The omniORB library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA
//
//
// Description:
//
/*
$Log$
Revision 1.2.2.4 2001/10/17 16:44:00 dpg1
Update DynAny to CORBA 2.5 spec, const Any exception extraction.
Revision 1.2.2.3 2001/08/17 13:39:49 dpg1
Split CORBA.h into separate bits.
Revision 1.2.2.2 2000/09/27 17:07:25 sll
Updated to use the new cdrStream abstraction.
Revision 1.2.2.1 2000/07/17 10:35:33 sll
Merged from omni3_develop the diff between omni3_0_0_pre3 and omni3_0_0.
Revision 1.3 2000/07/13 15:26:05 dpg1
Merge from omni3_develop for 3.0 release.
Revision 1.1.2.3 2000/06/27 16:15:08 sll
New classes: _CORBA_String_element, _CORBA_ObjRef_Element,
_CORBA_ObjRef_tcDesc_arg to support assignment to an element of a
sequence of string and a sequence of object reference.
Revision 1.1.2.2 1999/10/13 12:44:35 djr
Added definition of TypeCode_out.
Revision 1.1.2.1 1999/09/24 09:51:39 djr
Moved from omniORB2 + some new files.
*/
#ifndef INSIDE_OMNIORB_CORBA_MODULE
# error "Must only be #included by CORBA.h"
#endif
//////////////////////////////////////////////////////////////////////
//////////////////////////// TypeCode_var ////////////////////////////
//////////////////////////////////////////////////////////////////////
class TypeCode_INOUT_arg;
class TypeCode_OUT_arg;
class TypeCode_var {
public:
typedef TypeCode_ptr T_ptr;
typedef TypeCode_var T_var;
typedef TypeCode_member T_member;
inline TypeCode_var() : pd_ref(TypeCode::_nil()) {}
inline TypeCode_var(T_ptr p) : pd_ref(p) {}
inline TypeCode_var(const T_var& p) {
pd_ref = TypeCode::_duplicate(p.pd_ref);
}
TypeCode_var(const TypeCode_member& p) {
pd_ref = TypeCode::_duplicate(p._ptr);
}
~TypeCode_var() { release(pd_ref); }
inline T_var& operator= (T_ptr p) {
release(pd_ref);
pd_ref = p;
return *this;
}
inline T_var& operator= (const T_var& p) {
if( pd_ref != p.pd_ref ) {
release(pd_ref);
pd_ref = TypeCode::_duplicate(p.pd_ref);
}
return *this;
}
inline T_var& operator=(const TypeCode_member& p) {
release(pd_ref);
pd_ref = TypeCode::_duplicate(p._ptr);
return *this;
}
T_ptr operator->() const { return pd_ref; }
operator T_ptr () const { return pd_ref; }
T_ptr in() const { return pd_ref; }
T_ptr& inout() { return pd_ref; }
T_ptr& out() {
release(pd_ref);
pd_ref = TypeCode::_nil();
return pd_ref;
}
T_ptr _retn() {
T_ptr tmp = pd_ref;
pd_ref = TypeCode::_nil();
return tmp;
}
friend class TypeCode_member;
friend class TypeCode_INOUT_arg;
friend class TypeCode_OUT_arg;
private:
T_ptr pd_ref;
};
//////////////////////////////////////////////////////////////////////
///////////////////////// TypeCode_INOUT_arg /////////////////////////
//////////////////////////////////////////////////////////////////////
class TypeCode_INOUT_arg {
public:
inline TypeCode_INOUT_arg(TypeCode_ptr& p) : _data(p) { }
inline TypeCode_INOUT_arg(TypeCode_var& p) : _data(p.pd_ref) { }
inline TypeCode_INOUT_arg(TypeCode_member& p) : _data(p._ptr) { }
inline ~TypeCode_INOUT_arg() {}
inline operator TypeCode_ptr&() { return _data; }
TypeCode_ptr& _data;
private:
TypeCode_INOUT_arg();
};
//////////////////////////////////////////////////////////////////////
////////////////////////// TypeCode_OUT_arg //////////////////////////
//////////////////////////////////////////////////////////////////////
class TypeCode_OUT_arg {
public:
typedef TypeCode T;
typedef TypeCode_ptr T_ptr;
typedef TypeCode_var T_var;
typedef TypeCode_member T_member;
TypeCode_OUT_arg(T_ptr& p) : _data(p) { _data = T::_nil(); }
TypeCode_OUT_arg(T_var& p) : _data(p.pd_ref) {
p = T::_nil();
}
inline TypeCode_OUT_arg(T_member& p) : _data(p._ptr) {
p = T::_nil();
}
inline ~TypeCode_OUT_arg() {}
inline TypeCode_OUT_arg& operator=(T_ptr p) { _data = p; return *this; }
inline TypeCode_OUT_arg& operator=(const T_member& p) {
_data = T::_duplicate(p); return *this;
}
inline operator T_ptr&() { return _data; }
inline T_ptr& ptr() { return _data; }
inline T_ptr operator->() { return _data; }
T_ptr& _data;
private:
TypeCode_OUT_arg();
};
typedef TypeCode_OUT_arg TypeCode_out;
//////////////////////////////////////////////////////////////////////
/////////////////////////////// ORB_var //////////////////////////////
//////////////////////////////////////////////////////////////////////
class ORB_var {
public:
typedef ORB T;
typedef ORB_ptr T_ptr;
typedef ORB_var T_var;
inline ORB_var() : pd_ref(T::_nil()) {}
inline ORB_var(T_ptr p) : pd_ref(p) {}
inline ORB_var(const T_var& p) : pd_ref(T::_duplicate(p.pd_ref)) {}
inline ~ORB_var() { release(pd_ref); }
inline T_var& operator= (T_ptr p) {
release(pd_ref);
pd_ref = p;
return *this;
}
inline T_var& operator= (const T_var& p) {
if( pd_ref != p.pd_ref ) {
release(pd_ref);
pd_ref = T::_duplicate(p.pd_ref);
}
return *this;
}
inline T_ptr operator->() const { return pd_ref; }
inline operator T_ptr() const { return pd_ref; }
inline T_ptr in() const { return pd_ref; }
inline T_ptr& inout() { return pd_ref; }
inline T_ptr& out() {
if( !is_nil(pd_ref) ) {
release(pd_ref);
pd_ref = T::_nil();
}
return pd_ref;
}
inline T_ptr _retn() {
T_ptr tmp = pd_ref;
pd_ref = T::_nil();
return tmp;
}
private:
T_ptr pd_ref;
};
//////////////////////////////////////////////////////////////////////
/////////////////////////////// BOA_var //////////////////////////////
//////////////////////////////////////////////////////////////////////
class BOA_var {
public:
typedef BOA T;
typedef BOA_ptr T_ptr;
typedef BOA_var T_var;
inline BOA_var() : pd_ref(T::_nil()) {}
inline BOA_var(T_ptr p) : pd_ref(p) {}
inline BOA_var(const T_var& p) : pd_ref(T::_duplicate(p.pd_ref)) {}
inline ~BOA_var() { release(pd_ref); }
inline T_var& operator= (T_ptr p) {
release(pd_ref);
pd_ref = p;
return *this;
}
inline T_var& operator= (const T_var& p) {
if( pd_ref != p.pd_ref ) {
release(pd_ref);
pd_ref = T::_duplicate(p.pd_ref);
}
return *this;
}
inline T_ptr operator->() const { return pd_ref; }
inline operator T_ptr() const { return pd_ref; }
inline T_ptr in() const { return pd_ref; }
inline T_ptr& inout() { return pd_ref; }
inline T_ptr& out() {
if( !is_nil(pd_ref) ) {
release(pd_ref);
pd_ref = T::_nil();
}
return pd_ref;
}
inline T_ptr _retn() {
T_ptr tmp = pd_ref;
pd_ref = T::_nil();
return tmp;
}
private:
T_ptr pd_ref;
};
|