Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef TAO_ABSTRACTBASE_H
00014 #define TAO_ABSTRACTBASE_H
00015
00016 #include "ace/pre.h"
00017
00018 #include "tao/Valuetype/valuetype_export.h"
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif
00023
00024 #include "tao/Valuetype/Value_CORBA_methods.h"
00025 #include "tao/Object_Argument_T.h"
00026 #include "tao/Arg_Traits_T.h"
00027 #include "tao/Objref_VarOut_T.h"
00028 #include "tao/Object.h"
00029 #include "tao/Pseudo_VarOut_T.h"
00030
00031 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00032
00033 class TAO_Stub;
00034 class TAO_Abstract_ServantBase;
00035
00036 #if defined (TAO_EXPORT_MACRO)
00037 #undef TAO_EXPORT_MACRO
00038 #endif
00039 #define TAO_EXPORT_MACRO TAO_Valuetype_Export
00040
00041 namespace CORBA
00042 {
00043 class ValueBase;
00044
00045 typedef TAO_Pseudo_Var_T<AbstractBase> AbstractBase_var;
00046 typedef TAO_Pseudo_Out_T<AbstractBase> AbstractBase_out;
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056 class TAO_Valuetype_Export AbstractBase
00057 {
00058 public:
00059
00060
00061
00062
00063
00064
00065 AbstractBase (TAO_Stub *p,
00066 CORBA::Boolean collocated,
00067 TAO_Abstract_ServantBase *servant);
00068
00069 typedef CORBA::AbstractBase_ptr _ptr_type;
00070 typedef CORBA::AbstractBase_var _var_type;
00071 typedef CORBA::AbstractBase_out _out_type;
00072
00073 static CORBA::AbstractBase_ptr _narrow (CORBA::AbstractBase_ptr obj
00074 );
00075
00076 static CORBA::AbstractBase_ptr _duplicate (CORBA::AbstractBase_ptr obj);
00077 static CORBA::AbstractBase_ptr _nil (void);
00078
00079
00080 static void _tao_any_destructor (void*);
00081
00082
00083 CORBA::Object_ptr _to_object (void);
00084 CORBA::ValueBase *_to_value (void);
00085
00086 virtual CORBA::Boolean _is_a (const char *type_id
00087 );
00088 virtual const char* _interface_repository_id (void) const;
00089
00090
00091
00092 virtual const char* _tao_obv_repository_id (void) const;
00093 virtual CORBA::Boolean _tao_marshal_v (TAO_OutputCDR &strm) const;
00094 virtual CORBA::Boolean _tao_unmarshal_v (TAO_InputCDR &strm);
00095 virtual CORBA::Boolean _tao_match_formal_type (ptrdiff_t) const;
00096
00097 #if defined (GEN_OSTREAM_OPS)
00098
00099
00100
00101 static std::ostream& _tao_stream (std::ostream &strm,
00102 const AbstractBase_ptr _tao_objref);
00103 virtual std::ostream& _tao_stream_v (std::ostream &strm) const;
00104
00105 #endif
00106
00107
00108 virtual void _add_ref (void);
00109 virtual void _remove_ref (void);
00110
00111 CORBA::Boolean _is_objref (void) const;
00112
00113
00114 TAO_Stub *_stubobj (void) const;
00115
00116
00117 CORBA::Boolean _is_collocated (void) const;
00118 TAO_Abstract_ServantBase *_servant (void) const;
00119 CORBA::Boolean _is_local (void) const;
00120
00121
00122
00123
00124
00125
00126
00127 CORBA::Object_ptr equivalent_objref (void);
00128
00129 protected:
00130
00131 AbstractBase (void);
00132 AbstractBase (const AbstractBase &);
00133
00134 virtual ~AbstractBase (void);
00135
00136 protected:
00137
00138 CORBA::Boolean is_objref_;
00139
00140 private:
00141
00142 AbstractBase & operator= (const AbstractBase &);
00143
00144 virtual CORBA::ValueBase *_tao_to_value (void);
00145
00146 private:
00147
00148 TAO_Stub *concrete_stubobj_;
00149 CORBA::Boolean is_collocated_;
00150 TAO_Abstract_ServantBase *servant_;
00151 CORBA::Boolean is_local_;
00152
00153
00154
00155
00156 CORBA::Object_var equivalent_obj_;
00157 };
00158
00159 extern TAO_Valuetype_Export TypeCode_ptr const _tc_AbstractBase;
00160 }
00161
00162 TAO_Valuetype_Export CORBA::Boolean
00163 operator<< (TAO_OutputCDR &, const CORBA::AbstractBase_ptr);
00164
00165 TAO_Valuetype_Export CORBA::Boolean
00166 operator>> (TAO_InputCDR &, CORBA::AbstractBase_ptr &);
00167
00168 #if defined (GEN_OSTREAM_OPS)
00169
00170 TAO_Valuetype_Export std::ostream&
00171 operator<< (std::ostream &, CORBA::AbstractBase_ptr);
00172
00173 #endif
00174
00175
00176 namespace TAO
00177 {
00178 template<>
00179 class TAO_Valuetype_Export Arg_Traits<CORBA::AbstractBase>
00180 : public Object_Arg_Traits_T<
00181 CORBA::AbstractBase_ptr,
00182 CORBA::AbstractBase_var,
00183 CORBA::AbstractBase_out,
00184 TAO::Objref_Traits<CORBA::AbstractBase>,
00185 TAO::Any_Insert_Policy_Stream
00186 >
00187 {
00188 };
00189 }
00190
00191 TAO_END_VERSIONED_NAMESPACE_DECL
00192
00193 #if defined (__ACE_INLINE__)
00194 # include "tao/Valuetype/AbstractBase.inl"
00195 #endif
00196
00197 #include "ace/post.h"
00198
00199 #endif