Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

AbstractBase.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file     AbstractBase.h
00006  *
00007  *  $Id: AbstractBase.h,v 1.1.1.1 2003/02/21 18:36:44 chad Exp $
00008  *
00009  *  @author  Jeff Parsons  <parsons@cs.wust.edu>
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef TAO_ABSTRACTBASE_H
00015 #define TAO_ABSTRACTBASE_H
00016 
00017 #include "ace/pre.h"
00018 #include "tao/corbafwd.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #include "tao/Object.h"
00025 #include "tao/ValueBase.h"
00026 #include "tao/ValueFactory.h"
00027 
00028 /**
00029  * @class CORBA_AbstractBase
00030  *
00031  * @brief Abstract base class for Interfaces and Valuetypes
00032  *
00033  * Allows the determination of whether an object has been
00034  * passed by reference or by value to be deferred until runtime.
00035  */
00036 class TAO_Export CORBA_AbstractBase
00037 {
00038 public:
00039   /// So the extraction operator can call the protectec constructor.
00040   friend TAO_Export CORBA::Boolean
00041          operator<< (TAO_OutputCDR &, const CORBA_AbstractBase_ptr);
00042 
00043   friend TAO_Export CORBA::Boolean
00044          operator>> (TAO_InputCDR &, CORBA_AbstractBase_ptr &);
00045 
00046   typedef CORBA_AbstractBase_ptr _ptr_type;
00047   typedef CORBA_AbstractBase_var _var_type;
00048 
00049   static int _tao_class_id;
00050 
00051   static CORBA::AbstractBase_ptr _narrow (CORBA::AbstractBase_ptr obj
00052                                           ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00053   static CORBA::AbstractBase_ptr _unchecked_narrow (
00054       CORBA::AbstractBase_ptr obj
00055       ACE_ENV_ARG_DECL_WITH_DEFAULTS
00056     );
00057 
00058   static CORBA::AbstractBase_ptr _duplicate (CORBA::AbstractBase_ptr obj);
00059   static CORBA::AbstractBase_ptr _nil (void);
00060 
00061   CORBA::Object_ptr _to_object (void);
00062   CORBA::ValueBase *_to_value (void);
00063 
00064   virtual CORBA::Boolean _is_a (const char *type_id
00065                                 ACE_ENV_ARG_DECL_WITH_DEFAULTS);
00066   virtual void *_tao_QueryInterface (ptr_arith_t type);
00067   virtual const char* _interface_repository_id (void) const;
00068   virtual const char* _tao_obv_repository_id (void) const;
00069   virtual void *_tao_obv_narrow (ptr_arith_t type_id);
00070   virtual CORBA::Boolean _tao_marshal_v (TAO_OutputCDR &strm);
00071   virtual CORBA::Boolean _tao_unmarshal_v (TAO_InputCDR &strm);
00072 
00073   virtual void _add_ref (void);
00074   virtual void _remove_ref (void);
00075 
00076   CORBA::Boolean _is_objref (void) const;
00077   TAO_Stub *_stubobj (void) const;
00078   CORBA::Boolean _is_collocated (void) const;
00079   TAO_Abstract_ServantBase *_servant (void) const;
00080   CORBA::Boolean _is_local (void) const;
00081 
00082 protected:
00083   CORBA_AbstractBase (void);
00084   CORBA_AbstractBase (const CORBA_AbstractBase &);
00085   CORBA_AbstractBase (TAO_Stub *p,
00086                       CORBA::Boolean collocated,
00087                       TAO_Abstract_ServantBase *servant);
00088 
00089   virtual ~CORBA_AbstractBase (void);
00090 
00091 protected:
00092   CORBA::Boolean is_objref_;
00093 
00094 private:
00095   CORBA_AbstractBase & operator= (const CORBA_AbstractBase &);
00096 
00097   virtual CORBA::ValueBase *_tao_to_value (void);
00098 
00099 private:
00100   TAO_Stub *concrete_stubobj_;
00101   CORBA::Boolean is_collocated_;
00102   TAO_Abstract_ServantBase *servant_;
00103   CORBA::Boolean is_local_;
00104 };
00105 
00106 /**
00107  * @class CORBA_AbstractBase_var
00108  *
00109  * @brief _var class for AbstractBase
00110  */
00111 class TAO_Export CORBA_AbstractBase_var
00112 {
00113 public:
00114   CORBA_AbstractBase_var (void);
00115   CORBA_AbstractBase_var (CORBA::AbstractBase_ptr);
00116   CORBA_AbstractBase_var (const CORBA_AbstractBase_var &);
00117   ~CORBA_AbstractBase_var (void);
00118 
00119   CORBA_AbstractBase_var &operator= (CORBA::AbstractBase_ptr);
00120   CORBA_AbstractBase_var &operator= (const CORBA_AbstractBase_var &);
00121   CORBA::AbstractBase_ptr operator-> (void) const;
00122 
00123   /// in, inout, out, _retn
00124   operator const CORBA::AbstractBase_ptr &() const;
00125   operator CORBA::AbstractBase_ptr &();
00126   CORBA::AbstractBase_ptr in (void) const;
00127   CORBA::AbstractBase_ptr &inout (void);
00128   CORBA::AbstractBase_ptr &out (void);
00129   CORBA::AbstractBase_ptr _retn (void);
00130   CORBA::AbstractBase_ptr ptr (void) const;
00131 
00132   static CORBA::AbstractBase_ptr tao_duplicate (CORBA::AbstractBase_ptr);
00133   static void tao_release (CORBA::AbstractBase_ptr);
00134   static CORBA::AbstractBase_ptr tao_nil (void);
00135   static CORBA::AbstractBase_ptr tao_narrow (CORBA::AbstractBase *
00136                                              ACE_ENV_ARG_DECL_NOT_USED);
00137   static CORBA::AbstractBase * tao_upcast (void *);
00138 
00139 private:
00140   CORBA::AbstractBase_ptr ptr_;
00141 };
00142 
00143 /**
00144  * @class CORBA_AbstractBase_out
00145  *
00146  * @brief _out class for AbstractBase
00147  */
00148 class TAO_Export CORBA_AbstractBase_out
00149 {
00150 public:
00151   CORBA_AbstractBase_out (CORBA::AbstractBase_ptr &);
00152   CORBA_AbstractBase_out (CORBA_AbstractBase_var &);
00153   CORBA_AbstractBase_out (const CORBA_AbstractBase_out &);
00154   CORBA_AbstractBase_out &operator= (const CORBA_AbstractBase_out &);
00155   CORBA_AbstractBase_out &operator= (const CORBA_AbstractBase_var &);
00156   CORBA_AbstractBase_out &operator= (CORBA::AbstractBase_ptr);
00157   operator CORBA::AbstractBase_ptr &();
00158   CORBA::AbstractBase_ptr &ptr (void);
00159   CORBA::AbstractBase_ptr operator-> (void);
00160 
00161 private:
00162   CORBA::AbstractBase_ptr &ptr_;
00163 };
00164 
00165 TAO_Export CORBA::Boolean
00166 operator<< (TAO_OutputCDR &, const CORBA_AbstractBase_ptr);
00167 
00168 TAO_Export CORBA::Boolean
00169 operator>> (TAO_InputCDR &, CORBA_AbstractBase_ptr &);
00170 
00171 #if defined (__ACE_INLINE__)
00172 # include "tao/AbstractBase.inl"
00173 #endif /* __ACE_INLINE__) */
00174 
00175 #include "ace/post.h"
00176 
00177 #endif /* TAO_ABSTRACTBASE_H */

Generated on Mon Jun 16 13:47:56 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002