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:
AdobeXMPCommon::IConfigurationManager_v1 AdobeXMPCommon::IError_v1 AdobeXMPCommon::IUTF8String_v1 AdobeXMPCore::IDOMImplementationRegistry_v1 AdobeXMPCore::IDOMParser_v1 AdobeXMPCore::IDOMSerializer_v1 AdobeXMPCore::INameSpacePrefixMap_v1 AdobeXMPCore::INode_v1 AdobeXMPCore::INodeIterator_v1 AdobeXMPCore::IPath_v1 AdobeXMPCore::IPathSegment_v1

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 27 of file ISharedObject.h.

Constructor & Destructor Documentation

AdobeXMPCommon::ISharedObject::~ISharedObject ( )
inlineprotectedpure virtual

protected virtual destructor.

Definition at line 67 of file ISharedObject.h.

67 { }

Member Function Documentation

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.

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.

AdobeXMPCommon::ISharedObject::REQ_FRIEND_CLASS_DECLARATION ( )
protected

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

XMPToolkit documentation generated by doxygen 1.8.11