summaryrefslogtreecommitdiff
path: root/TAO/tao/Object.h
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-08-14 20:12:03 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-08-14 20:12:03 +0000
commitda49b08671e5d87c9996bb0bcc63c661447f83b2 (patch)
tree4b92710abc7aef7d79efb811391b9254038b5480 /TAO/tao/Object.h
parent66e74009620c1297b07ce26dab97f586ed76edc7 (diff)
downloadATCD-da49b08671e5d87c9996bb0bcc63c661447f83b2.tar.gz
ChangeLogTag:Fri Aug 14 14:44:49 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/Object.h')
-rw-r--r--TAO/tao/Object.h40
1 files changed, 38 insertions, 2 deletions
diff --git a/TAO/tao/Object.h b/TAO/tao/Object.h
index 58ae31182f0..0850f510974 100644
--- a/TAO/tao/Object.h
+++ b/TAO/tao/Object.h
@@ -28,15 +28,22 @@
class TAO_ServantBase;
class STUB_Object;
+class CORBA_Object;
+typedef CORBA_Object* CORBA_Object_ptr;
+
class TAO_Export CORBA_Object
{
public:
- static CORBA::Object_ptr _duplicate (CORBA::Object_ptr obj);
+ static CORBA_Object_ptr _duplicate (CORBA_Object_ptr obj);
// increment the ref count
- static CORBA::Object_ptr _nil (void);
+ static CORBA_Object_ptr _nil (void);
// return a NUL object
+ static CORBA_Object_ptr _narrow (CORBA_Object_ptr obj,
+ CORBA::Environment& env);
+ // no-op it is just here to simplify some templates.
+
// These calls correspond to over-the-wire operations, or at least
// do so in many common cases. The normal implementation assumes a
// particular simple, efficient, protocol-neutral interface for
@@ -197,6 +204,35 @@ private:
CORBA::Object_ptr &ptr_;
};
+class TAO_Object_Field
+{
+ // = TITLE
+ // Base class to represent fields (in structures) corresponding to
+ // object references.
+ //
+ // = DESCRIPTION
+ // When an object reference appears in a structure the marshaling
+ // and demarhsaling of the structure gets complicated:
+ // the interpreter can only marshal CORBA_Object_ptr when it
+ // dermarshal it creates on of those objects.
+ // The downcasting to the right type must be executed by classes
+ // with compile-time knowledge of the object type.
+ // The solution addopted in TAO is to create a special manager
+ // class for that field called TAO_Object_Field_T<T> (see
+ // varout.h), this class serves as an abstract interface to
+ // manipulate instances of those classes (by the interpreter, of
+ // course).
+ //
+public:
+ virtual ~TAO_Object_Field (void);
+ // destructor
+
+ virtual void _downcast (CORBA_Object* base_ptr,
+ CORBA_Environment& env) = 0;
+ virtual CORBA_Object* _upcast (void) = 0;
+ virtual void _release (void) = 0;
+};
+
#if defined (__ACE_INLINE__)
# include "tao/Object.i"
#endif /* __ACE_INLINE__ */