Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / AnyTypeCode_Adapter.h
blob0a0a90daa93cd8e68868b1884586f1f0722981d0
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file AnyTypeCode_Adapter.h
7 * @author Johnny Willemsen <jwillemsen@remedy.nl>
8 */
9 //=============================================================================
11 #ifndef TAO_ANYTYPECODE_ADAPTER
12 #define TAO_ANYTYPECODE_ADAPTER
14 #include /**/ "ace/pre.h"
16 #include /**/ "tao/TAO_Export.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "ace/Service_Object.h"
23 #include "ace/CDR_Stream.h"
25 #include "tao/Basic_Types.h"
27 #include <string>
29 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
31 namespace CORBA
33 class TypeCode;
34 typedef TypeCode *TypeCode_ptr;
36 class Any;
38 class Policy;
39 typedef Policy *Policy_ptr;
41 class BooleanSeq;
42 class OctetSeq;
43 class CharSeq;
44 class WCharSeq;
45 class ShortSeq;
46 class UShortSeq;
47 class LongSeq;
48 class ULongSeq;
49 class LongLongSeq;
50 class ULongLongSeq;
51 class FloatSeq;
52 class DoubleSeq;
53 class LongDoubleSeq;
54 class StringSeq;
55 class WStringSeq;
58 /**
59 * @class TAO_AnyTypeCode_Adapter
61 class TAO_Export TAO_AnyTypeCode_Adapter
62 : public ACE_Service_Object
64 public:
65 virtual ~TAO_AnyTypeCode_Adapter ();
67 #define ANYTYPECODE__EXCEPTION_LIST \
68 TAO_SYSTEM_EXCEPTION (UNKNOWN) \
69 TAO_SYSTEM_EXCEPTION (BAD_PARAM) \
70 TAO_SYSTEM_EXCEPTION (NO_MEMORY) \
71 TAO_SYSTEM_EXCEPTION (IMP_LIMIT) \
72 TAO_SYSTEM_EXCEPTION (COMM_FAILURE) \
73 TAO_SYSTEM_EXCEPTION (INV_OBJREF) \
74 TAO_SYSTEM_EXCEPTION (OBJECT_NOT_EXIST) \
75 TAO_SYSTEM_EXCEPTION (NO_PERMISSION) \
76 TAO_SYSTEM_EXCEPTION (INTERNAL) \
77 TAO_SYSTEM_EXCEPTION (MARSHAL) \
78 TAO_SYSTEM_EXCEPTION (INITIALIZE) \
79 TAO_SYSTEM_EXCEPTION (NO_IMPLEMENT) \
80 TAO_SYSTEM_EXCEPTION (BAD_TYPECODE) \
81 TAO_SYSTEM_EXCEPTION (BAD_OPERATION) \
82 TAO_SYSTEM_EXCEPTION (NO_RESOURCES) \
83 TAO_SYSTEM_EXCEPTION (NO_RESPONSE) \
84 TAO_SYSTEM_EXCEPTION (PERSIST_STORE) \
85 TAO_SYSTEM_EXCEPTION (BAD_INV_ORDER) \
86 TAO_SYSTEM_EXCEPTION (TRANSIENT) \
87 TAO_SYSTEM_EXCEPTION (FREE_MEM) \
88 TAO_SYSTEM_EXCEPTION (INV_IDENT) \
89 TAO_SYSTEM_EXCEPTION (INV_FLAG) \
90 TAO_SYSTEM_EXCEPTION (INTF_REPOS) \
91 TAO_SYSTEM_EXCEPTION (BAD_CONTEXT) \
92 TAO_SYSTEM_EXCEPTION (OBJ_ADAPTER) \
93 TAO_SYSTEM_EXCEPTION (DATA_CONVERSION) \
94 TAO_SYSTEM_EXCEPTION (INV_POLICY) \
95 TAO_SYSTEM_EXCEPTION (REBIND) \
96 TAO_SYSTEM_EXCEPTION (TIMEOUT) \
97 TAO_SYSTEM_EXCEPTION (TRANSACTION_UNAVAILABLE) \
98 TAO_SYSTEM_EXCEPTION (TRANSACTION_MODE) \
99 TAO_SYSTEM_EXCEPTION (TRANSACTION_REQUIRED) \
100 TAO_SYSTEM_EXCEPTION (TRANSACTION_ROLLEDBACK) \
101 TAO_SYSTEM_EXCEPTION (INVALID_TRANSACTION) \
102 TAO_SYSTEM_EXCEPTION (CODESET_INCOMPATIBLE) \
103 TAO_SYSTEM_EXCEPTION (BAD_QOS) \
104 TAO_SYSTEM_EXCEPTION (INVALID_ACTIVITY) \
105 TAO_SYSTEM_EXCEPTION (ACTIVITY_COMPLETED) \
106 TAO_SYSTEM_EXCEPTION (ACTIVITY_REQUIRED) \
107 TAO_SYSTEM_EXCEPTION (THREAD_CANCELLED) \
108 TAO_SYSTEM_EXCEPTION (WrongTransaction) \
109 TAO_SYSTEM_EXCEPTION (PolicyError) \
110 TAO_SYSTEM_EXCEPTION (InvalidPolicies)
112 #define TAO_SYSTEM_EXCEPTION(name) \
113 virtual CORBA::TypeCode_ptr _tao_type_ ## name () const = 0;
115 ANYTYPECODE__EXCEPTION_LIST
116 #undef TAO_SYSTEM_EXCEPTION
118 virtual void insert_into_any (CORBA::Any * any, CORBA::Char const * mychar) = 0;
120 virtual void insert_into_any (CORBA::Any * any, CORBA::WChar const * mywchar) = 0;
122 virtual void insert_into_any (CORBA::Any * any, const std::string & value) = 0;
124 #if !defined(ACE_LACKS_STD_WSTRING)
125 virtual void insert_into_any (CORBA::Any * any, const std::wstring & value) = 0;
126 #endif /* ACE_LACKS_STD_WSTRING */
128 virtual void insert_into_any (CORBA::Any * any, CORBA::Policy_ptr policy) = 0;
130 virtual void insert_into_any (CORBA::Any * any, CORBA::Policy_ptr * policy) = 0;
132 virtual void insert_into_any (CORBA::Any * any, CORBA::ULong value) = 0;
134 virtual void insert_into_any (CORBA::Any * any, CORBA::Long value) = 0;
136 virtual void insert_into_any (CORBA::Any * any, CORBA::Short value) = 0;
138 virtual void insert_into_any (CORBA::Any * any, CORBA::UShort value) = 0;
140 virtual void insert_into_any (CORBA::Any * any, CORBA::Float value) = 0;
142 virtual void insert_into_any (CORBA::Any * any, CORBA::Double value) = 0;
144 virtual void insert_into_any (CORBA::Any * any, CORBA::LongLong value) = 0;
146 virtual void insert_into_any (CORBA::Any * any, CORBA::ULongLong value) = 0;
148 virtual void insert_into_any (CORBA::Any * any, CORBA::LongDouble value) = 0;
150 virtual void insert_into_any (CORBA::Any * any, ACE_OutputCDR::from_wchar value) = 0;
152 virtual void insert_into_any (CORBA::Any * any, ACE_OutputCDR::from_char value) = 0;
154 virtual void insert_into_any (CORBA::Any * any, ACE_OutputCDR::from_octet value) = 0;
156 virtual void insert_into_any (CORBA::Any * any, ACE_OutputCDR::from_boolean value) = 0;
158 virtual void insert_into_any (CORBA::Any * any, const CORBA::BooleanSeq & value) = 0;
160 virtual void insert_into_any (CORBA::Any * any, const CORBA::OctetSeq & value) = 0;
162 virtual void insert_into_any (CORBA::Any * any, const CORBA::CharSeq & value) = 0;
164 virtual void insert_into_any (CORBA::Any * any, const CORBA::WCharSeq & value) = 0;
166 virtual void insert_into_any (CORBA::Any * any, const CORBA::ShortSeq & value) = 0;
168 virtual void insert_into_any (CORBA::Any * any, const CORBA::UShortSeq & value) = 0;
170 virtual void insert_into_any (CORBA::Any * any, const CORBA::LongSeq & value) = 0;
172 virtual void insert_into_any (CORBA::Any * any, const CORBA::ULongSeq & value) = 0;
174 virtual void insert_into_any (CORBA::Any * any, const CORBA::LongLongSeq & value) = 0;
176 virtual void insert_into_any (CORBA::Any * any, const CORBA::ULongLongSeq & value) = 0;
178 virtual void insert_into_any (CORBA::Any * any, const CORBA::FloatSeq & value) = 0;
180 virtual void insert_into_any (CORBA::Any * any, const CORBA::DoubleSeq & value) = 0;
182 virtual void insert_into_any (CORBA::Any * any, const CORBA::LongDoubleSeq & value) = 0;
184 virtual void insert_into_any (CORBA::Any * any, const CORBA::StringSeq & value) = 0;
186 virtual void insert_into_any (CORBA::Any * any, const CORBA::WStringSeq & value) = 0;
189 TAO_END_VERSIONED_NAMESPACE_DECL
191 #include /**/ "ace/post.h"
192 #endif /* TAO_ANYTYPECODE_ADAPTER */