/usr/include/omniORB4/CORBA_Any_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 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | // -*- Mode: C++; -*-
// Package : omniORB
// CORBA_Any_vartypes.h Created on: 2001/08/17
// Author : Duncan Grisby (dpg1)
//
// Copyright (C) 2004 Apasphere Ltd
// Copyright (C) 2001 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:
// CORBA::Any_var, etc.
//
/*
$Log$
Revision 1.1.4.3 2004/10/13 17:58:18 dgrisby
Abstract interfaces support; values support interfaces; value bug fixes.
Revision 1.1.4.2 2004/07/23 10:29:56 dgrisby
Completely new, much simpler Any implementation.
Revision 1.1.4.1 2003/03/23 21:04:25 dgrisby
Start of omniORB 4.1.x development branch.
Revision 1.1.2.2 2001/10/17 16:43:59 dpg1
Update DynAny to CORBA 2.5 spec, const Any exception extraction.
Revision 1.1.2.1 2001/08/17 13:39:44 dpg1
Split CORBA.h into separate bits.
*/
#ifndef INSIDE_OMNIORB_CORBA_MODULE
# error "Must only be #included by CORBA.h"
#endif
class Any_OUT_arg;
class Any_var {
public:
inline Any_var() { pd_data = 0; }
inline Any_var(Any* p) { pd_data = p; }
inline Any_var(const Any_var& p) {
if (!p.pd_data) {
pd_data = 0;
return;
}
else {
pd_data = new Any;
if (!pd_data) {
_CORBA_new_operator_return_null();
// never reach here
}
*pd_data = *p.pd_data;
}
}
inline ~Any_var() { if (pd_data) delete pd_data; }
inline Any_var& operator= (Any* p) {
if (pd_data) delete pd_data;
pd_data = p;
return *this;
}
inline Any_var& operator= (const Any_var& p) {
if (p.pd_data) {
if (!pd_data) {
pd_data = new Any;
if (!pd_data) {
_CORBA_new_operator_return_null();
// never reach here
}
}
*pd_data = *p.pd_data;
}
else {
if (pd_data) delete pd_data;
pd_data = 0;
}
return *this;
}
inline Any* operator->() const { return (Any*)pd_data; }
//#if defined(__GNUG__) && __GNUG__ == 2 && __GNUC_MINOR__ == 7
#if defined(__GNUG__)
inline operator Any& () const { return (Any&) *pd_data; }
#else
inline operator const Any& () const { return *pd_data; }
inline operator Any& () { return *pd_data; }
#endif
inline const Any& in() const { return *pd_data; }
inline Any& inout() { return *pd_data; }
inline Any*& out() {
if( pd_data ){
delete pd_data;
pd_data = 0;
}
return pd_data;
}
inline Any* _retn() {
Any* tmp = pd_data;
pd_data = 0;
return tmp;
}
// Any member-function insertion operators:
inline void operator<<=(Short s) {
*pd_data <<= s;
}
inline void operator<<=(UShort u) {
*pd_data <<= u;
}
inline void operator<<=(Long l) {
*pd_data <<= l;
}
inline void operator<<=(ULong u) {
*pd_data <<= u;
}
#ifdef HAS_LongLong
inline void operator<<=(LongLong l) {
*pd_data <<= l;
}
inline void operator<<=(ULongLong u) {
*pd_data <<= u;
}
#endif
#if !defined(NO_FLOAT)
inline void operator<<=(Float f) {
*pd_data <<= f;
}
inline void operator<<=(Double d) {
*pd_data <<= d;
}
#ifdef HAS_LongDouble
inline void operator<<=(LongDouble d) {
*pd_data <<= d;
}
#endif
#endif
inline void operator<<=(const Any& a) {
*pd_data <<= a;
}
inline void operator<<=(Any* a) {
*pd_data <<= a;
}
inline void operator<<=(TypeCode_ptr tc) {
*pd_data <<= tc;
}
inline void operator<<=(Object_ptr obj) {
*pd_data <<= obj;
}
inline void operator<<=(const char* s) {
*pd_data <<= s;
}
inline void operator<<=(const WChar* s) {
*pd_data <<= s;
}
inline void operator<<=(Any::from_boolean f) {
*pd_data <<= f;
}
inline void operator<<=(Any::from_char c) {
*pd_data <<= c;
}
inline void operator<<=(Any::from_wchar c) {
*pd_data <<= c;
}
inline void operator<<=(Any::from_octet o) {
*pd_data <<= o;
}
inline void operator<<=(Any::from_string s) {
*pd_data <<= s;
}
inline void operator<<=(Any::from_wstring s) {
*pd_data <<= s;
}
inline void operator<<=(Any::from_fixed f) {
*pd_data <<= f;
}
// Any member-function extraction operators:
inline Boolean operator>>=(Short& s) const {
return (*pd_data >>= s);
}
inline Boolean operator>>=(UShort& u) const {
return (*pd_data >>= u);
}
inline Boolean operator>>=(Long& l) const {
return (*pd_data >>= l);
}
inline Boolean operator>>=(ULong& u) const {
return (*pd_data >>= u);
}
#ifdef HAS_LongLong
inline Boolean operator>>=(LongLong& l) const {
return (*pd_data >>= l);
}
inline Boolean operator>>=(ULongLong& u) const {
return (*pd_data >>= u);
}
#endif
#if !defined(NO_FLOAT)
inline Boolean operator>>=(Float& f) const {
return (*pd_data >>= f);
}
inline Boolean operator>>=(Double& d) const {
return (*pd_data >>= d);
}
#ifdef HAS_LongDouble
inline Boolean operator>>=(LongDouble& d) const {
return (*pd_data >>= d);
}
#endif
#endif
inline Boolean operator>>=(const Any*& a) const {
return (*pd_data >>= a);
}
inline Boolean operator>>=(Any*& a) const {
return (*pd_data >>= a);
}
Boolean operator>>=(Any& a) const { // pre CORBA-2.3, obsoluted do not use
return (*pd_data >>= a);
}
inline Boolean operator>>=(TypeCode_ptr& tc) const {
return (*pd_data >>= tc);
}
inline Boolean operator>>=(const char*& s) const {
return (*pd_data >>= s);
}
inline Boolean operator>>=(Object_ptr& obj) const {
return (*pd_data >>= obj);
}
inline Boolean operator>>=(const WChar*& s) const {
return (*pd_data >>= s);
}
inline Boolean operator>>=(Any::to_boolean b) const {
return (*pd_data >>= b);
}
inline Boolean operator>>=(Any::to_char c) const {
return (*pd_data >>= c);
}
inline Boolean operator>>=(Any::to_wchar c) const {
return (*pd_data >>= c);
}
inline Boolean operator>>=(Any::to_octet o) const {
return (*pd_data >>= o);
}
inline Boolean operator>>=(Any::to_string s) const {
return (*pd_data >>= s);
}
inline Boolean operator>>=(Any::to_wstring s) const {
return (*pd_data >>= s);
}
inline Boolean operator>>=(Any::to_fixed f) const {
return (*pd_data >>= f);
}
inline Boolean operator>>=(Any::to_object o) const {
return (*pd_data >>= o);
}
inline Boolean operator>>=(Any::to_abstract_base a) const {
return (*pd_data >>= a);
}
inline Boolean operator>>=(Any::to_value v) const {
return (*pd_data >>= v);
}
inline Boolean operator>>=(const CORBA::SystemException*& e) const {
return (*pd_data >>= e);
}
friend class Any_OUT_arg;
private:
Any* pd_data;
};
class Any_OUT_arg {
public:
inline Any_OUT_arg(Any*& p) : _data(p) { _data = (Any*) 0; }
inline Any_OUT_arg(Any_var& p) : _data(p.pd_data) {
p = (Any*)0;
}
inline Any_OUT_arg(const Any_OUT_arg& p) : _data(p._data) {}
inline Any_OUT_arg& operator=(const Any_OUT_arg& p) {
_data = p._data; return *this;
}
inline Any_OUT_arg& operator=(Any* p) { _data = p; return *this; }
operator Any*& () { return _data; }
Any*& ptr() { return _data; }
Any*& _data;
private:
Any_OUT_arg();
Any_OUT_arg& operator=(const Any_var&);
};
typedef Any_OUT_arg Any_out;
|