| XMP Toolkit SDK 6.0.0

Public Member Functions | Protected Member Functions | List of all members
AdobeXMPCommon::ISharedObject Class Referenceabstract

Interface that serves as the base interface of all the externally exposed interfaces. More...

`#include <ISharedObject.h>`

Inheritance diagram for AdobeXMPCommon::ISharedObject:

## Public Member Functions
virtual void APICALL | Acquire () const __NOTHROW__=0
| Called by the clients of the object to indicate that he has acquired the shared ownership of the object. More...
virtual void APICALL | Release () const __NOTHROW__=0
| Called by the clients of the object to indicate he has released his shared ownership of the object. If this being the last client than this function should call Destroy to delete and release the memory. More...

## Protected Member Functions
virtual | ~ISharedObject () __NOTHROW__=0
| REQ_FRIEND_CLASS_DECLARATION ()

## Detailed Description

Interface that serves as the base interface of all the externally exposed interfaces.

This allows all interfaces to be used as shared pointers so as to reduce the burden of scope management from the client or library code. It makes the heap allocated object to be self manged in in terms of memory and life. This provides functions so as to inform the actual object when a shared pointer is created or destroyed and appropriately release the memory during the last call to Release.

Attention
  Supports Multi-threading at object level through use of Atomic Variables.

Note
  Any interface which inherits from this needs to make sure that its destructor is declared protected so that unknowingly also client of this object cannot call delete on the object.

Definition at line 29 of file ISharedObject.h.

## Constructor & Destructor Documentation

## ◆ ~ISharedObject()

AdobeXMPCommon::ISharedObject::~ISharedObject | ( |  | ) |
| inline protected pure virtual

protected virtual destructor.

Definition at line 69 of file ISharedObject.h.

69 { }

## Member Function Documentation

## ◆ Acquire()

virtual void APICALL AdobeXMPCommon::ISharedObject::Acquire | ( |  | ) | const
| pure virtual

Called by the clients of the object to indicate that he has acquired the shared ownership of the object.

## ◆ Release()

virtual void APICALL AdobeXMPCommon::ISharedObject::Release | ( |  | ) | const
| pure virtual

Called by the clients of the object to indicate he has released his shared ownership of the object. If this being the last client than this function should call Destroy to delete and release the memory.

## ◆ REQ_FRIEND_CLASS_DECLARATION()

AdobeXMPCommon::ISharedObject::REQ_FRIEND_CLASS_DECLARATION | ( |  | ) |
| protected

The documentation for this class was generated from the following file:

- public/include/XMPCommon/Interfaces/BaseInterfaces/ISharedObject.h