diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-05-05 07:19:41 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-05-05 07:19:41 +0000 |
commit | f2d36e3bcc1d55bb62e969bc2407c9136a00c365 (patch) | |
tree | 808937bf9b591f19dd97c781a095db338c85af0c /TAO/tao/Environment.h | |
parent | dfccb2a83d56941e787aea501737209153b7cae3 (diff) | |
download | ATCD-f2d36e3bcc1d55bb62e969bc2407c9136a00c365.tar.gz |
*** empty log message ***
Diffstat (limited to 'TAO/tao/Environment.h')
-rw-r--r-- | TAO/tao/Environment.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/TAO/tao/Environment.h b/TAO/tao/Environment.h index bbd6e0a9fc0..92fd8d65886 100644 --- a/TAO/tao/Environment.h +++ b/TAO/tao/Environment.h @@ -104,6 +104,7 @@ public: #if !defined(__GNUC__) || __GNUC__ > 2 || __GNUC_MINOR__ >= 8 typedef CORBA_Environment_ptr _ptr_type; + typedef CORBA_Environment_var _var_type; #endif /* __GNUC__ */ // Useful for template programming. @@ -122,6 +123,62 @@ private: }; +class TAO_Export CORBA_Environment_var +{ + // = TITLE + // CORBA_Environment_var + // + // = DESCRIPTION + // Provide for automatic storage deallocation on going out of + // scope. +public: + CORBA_Environment_var (void); // default constructor + CORBA_Environment_var (CORBA_Environment_ptr); + CORBA_Environment_var (const CORBA_Environment_var &); // copy constructor + ~CORBA_Environment_var (void); // destructor + + CORBA_Environment_var &operator= (CORBA_Environment_ptr); + CORBA_Environment_var &operator= (const CORBA_Environment_var &); + CORBA_Environment_ptr operator-> (void) const; + + operator const CORBA_Environment_ptr &() const; + operator CORBA_Environment_ptr &(); + // in, inout, out, _retn + CORBA_Environment_ptr in (void) const; + CORBA_Environment_ptr &inout (void); + CORBA_Environment_ptr &out (void); + CORBA_Environment_ptr _retn (void); + CORBA_Environment_ptr ptr (void) const; + +private: + CORBA_Environment_ptr ptr_; +}; + +class TAO_Export CORBA_Environment_out +{ + // = TITLE + // CORBA_Environment_out + // + // = DESCRIPTION + // The _out class for CORBA_Environment. This is used to help in + // managing the out parameters. +public: + CORBA_Environment_out (CORBA_Environment_ptr &); + CORBA_Environment_out (CORBA_Environment_var &); + CORBA_Environment_out (const CORBA_Environment_out &); + CORBA_Environment_out &operator= (const CORBA_Environment_out &); + CORBA_Environment_out &operator= (CORBA_Environment_ptr); + operator CORBA_Environment_ptr &(); + CORBA_Environment_ptr &ptr (void); + CORBA_Environment_ptr operator-> (void); + +private: + CORBA_Environment_ptr &ptr_; + + CORBA_Environment_out &operator= (const CORBA_Environment_var &); + // Assignment from _var not allowed. +}; + #if defined (__ACE_INLINE__) # include "tao/Environment.i" #endif /* __ACE_INLINE__ */ |