diff options
Diffstat (limited to 'TAO/tao/principa.cpp')
-rw-r--r-- | TAO/tao/principa.cpp | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/TAO/tao/principa.cpp b/TAO/tao/principa.cpp deleted file mode 100644 index 052d9d18743..00000000000 --- a/TAO/tao/principa.cpp +++ /dev/null @@ -1,77 +0,0 @@ -// @ (#)principa.cpp 1.4 95/11/04 -// Copyright 1994-1995 by Sun Microsystems Inc. -// All Rights Reserved -// -// ORB: Principal identifier pseudo-objref - -#include "tao/corba.h" - -void -CORBA::release (CORBA::Principal_ptr principal) -{ - if (principal) - principal->Release (); -} - -CORBA::Boolean -CORBA::is_nil (CORBA::Principal_ptr principal) -{ - return (CORBA::Boolean) (principal == 0); -} - -CORBA_Principal::CORBA_Principal (void) -{ -} - -CORBA_Principal::~CORBA_Principal (void) -{ - assert (refcount_ == 0); - - if (id.buffer) - delete [] id.buffer; -} - -// For COM -- IUnKnown operations - -// {A201E4C0-F258-11ce-9598-0000C07CA898} -DEFINE_GUID (IID_CORBA_Principal, -0xa201e4c0, 0xf258, 0x11ce, 0x95, 0x98, 0x0, 0x0, 0xc0, 0x7c, 0xa8, 0x98); - - -ULONG __stdcall -CORBA_Principal::AddRef (void) -{ - ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, guard, this->lock_, 0)); - - return ++refcount_; -} - -ULONG __stdcall -CORBA_Principal::Release (void) -{ - { - ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, mon, this->lock_, 0)); - - if (--refcount_ != 0) - return refcount_; - } - - delete this; - return 0; -} - -HRESULT __stdcall -CORBA_Principal::QueryInterface (REFIID riid, - void **ppv) -{ - *ppv = 0; - - if (IID_CORBA_Principal == riid || IID_IUnknown == riid) - *ppv = this; - - if (*ppv == 0) - return ResultFromScode (E_NOINTERFACE); - - (void) AddRef (); - return NOERROR; -} |