diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-03-22 02:46:16 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-03-22 02:46:16 +0000 |
commit | 7ad2f2d9de1804cb46748b64925ec8cea997eceb (patch) | |
tree | 2c396e5724b79b5ebf31e997e3db8261837d6006 /TAO/tao/Request.cpp | |
parent | e26ededdc22631b92ffeb64c60cabf142be89bc0 (diff) | |
download | ATCD-ACE-4_6_30.tar.gz |
This commit was manufactured by cvs2svn to create tag 'ACE-4_6_30'.ACE-4_6_30
Diffstat (limited to 'TAO/tao/Request.cpp')
-rw-r--r-- | TAO/tao/Request.cpp | 113 |
1 files changed, 0 insertions, 113 deletions
diff --git a/TAO/tao/Request.cpp b/TAO/tao/Request.cpp deleted file mode 100644 index e45aff5f8ac..00000000000 --- a/TAO/tao/Request.cpp +++ /dev/null @@ -1,113 +0,0 @@ -// $Id$ - -#include "tao/Request.h" - -#if !defined (TAO_HAS_MINIMUM_CORBA) - -#include "tao/Object.h" -#include "tao/Stub.h" - -#if !defined (__ACE_INLINE__) -# include "tao/Request.i" -#endif /* ! __ACE_INLINE__ */ - -ACE_RCSID(tao, Request, "$Id$") - -CORBA::ULong -CORBA_Request::_incr_refcnt (void) -{ - ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->refcount_lock_, 0); - return refcount_++; -} - -CORBA::ULong -CORBA_Request::_decr_refcnt (void) -{ - { - ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->refcount_lock_, 0); - this->refcount_--; - if (this->refcount_ != 0) - return this->refcount_; - } - - delete this; - return 0; -} - -// Reference counting for DII Request object - -// DII Request class implementation - -CORBA_Request::CORBA_Request (CORBA::Object_ptr obj, - const CORBA::Char *op, - CORBA::NVList_ptr args, - CORBA::NamedValue_ptr result, - CORBA::Flags flags) - : args_ (args), - result_ (result), - flags_ (flags), - refcount_ (1) -{ - target_ = CORBA::Object::_duplicate (obj); - opname_ = CORBA::string_copy (op); -} - -CORBA_Request::CORBA_Request (CORBA::Object_ptr obj, - const CORBA::Char *op) - : flags_ (0), - refcount_ (1) -{ - target_ = CORBA::Object::_duplicate (obj); - opname_ = CORBA::string_copy (op); - - ACE_NEW (args_, CORBA::NVList); - ACE_NEW (result_, CORBA::NamedValue); -} - -CORBA_Request::~CORBA_Request (void) -{ - assert (refcount_ == 0); - - CORBA::release (this->target_); - CORBA::string_free ((CORBA::String) this->opname_); - this->opname_ = 0; - CORBA::release (this->args_); - CORBA::release (this->result_); -} - -// The public DII interfaces: normal and oneway calls. -// -// NOTE that using DII, programmers can get the special behaviour of -// discarding the response for normal calls. This doesn't change the -// semantics of any OMG-IDL interface, it just streamlines control -// flow in some exotic situations. - -void -CORBA_Request::invoke (CORBA::Environment &ACE_TRY_ENV) -{ - STUB_Object *stub = this->target_->_stubobj (); - - stub->do_dynamic_call ((char *) opname_, - 1, - args_, - result_, - flags_, - exceptions_, - ACE_TRY_ENV); -} - -void -CORBA_Request::send_oneway (CORBA::Environment &ACE_TRY_ENV) -{ - STUB_Object *stub = this->target_->_stubobj (); - - stub->do_dynamic_call ((char *) opname_, - 0, - args_, - result_, - flags_, - exceptions_, - ACE_TRY_ENV); -} - -#endif /* TAO_HAS_MINIMUM_CORBA */ |