AdobeXMPCommon::IVersionable Class Reference

Interface that serves as the base interface for all the externally exposed interfaces which needs to provide evolving versions of the interface. More...

#include <IVersionable.h>

Inheritance diagram for AdobeXMPCommon::IVersionable:
AdobeXMPCommon::IConfigurationManager_v1 AdobeXMPCommon::IError_v1 AdobeXMPCommon::IObjectFactory_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

template<typename requestedInterface >
XMP_PRIVATE requestedInterface * GetInterfacePointer ()
 Get the raw pointer to an interface object implementing the requested version. More...
 
template<typename requestedInterface >
XMP_PRIVATE const requestedInterface * GetInterfacePointer () const
 Get the raw pointer to a const interface object implementing the requested version. More...
 

Protected Member Functions

virtual ~IVersionable ()
 
 REQ_FRIEND_CLASS_DECLARATION ()
 

Detailed Description

Interface that serves as the base interface for all the externally exposed interfaces which needs to provide evolving versions of the interface.

Provide pointer to interface requested by client. Requirements on the class type

  1. Need to implement a function GetInterfaceID() returning a unique id for the interface. Only required to be implemented in first version of the interface.
  2. Need to implement a function GetVersionNumber() returning the version of the interface. Required to implemented by each version of the interface.

Definition at line 28 of file IVersionable.h.

Constructor & Destructor Documentation

virtual AdobeXMPCommon::IVersionable::~IVersionable ( )
inlineprotectedvirtual

Definition at line 56 of file IVersionable.h.

References __NOTHROW__, and REQ_FRIEND_CLASS_DECLARATION.

56 {}

Member Function Documentation

template<typename requestedInterface >
XMP_PRIVATE requestedInterface* AdobeXMPCommon::IVersionable::GetInterfacePointer ( )
inline

Get the raw pointer to an interface object implementing the requested version.

Returns
a raw pointer to an interface object implementing the requested version.
Attention
In case a particular version number is not supported than an error is thrown.

Definition at line 38 of file IVersionable.h.

Referenced by AdobeXMPCommon::IObjectFactory_v1::MakeObjectFactory().

38  {
39  pvoid ptr = GetInterfacePointer( requestedInterface::GetInterfaceID(),
40  requestedInterface::GetInterfaceVersion() );
41  return static_cast< requestedInterface * >( ptr );
42  }
XMP_PRIVATE requestedInterface * GetInterfacePointer()
Get the raw pointer to an interface object implementing the requested version.
Definition: IVersionable.h:38
template<typename requestedInterface >
XMP_PRIVATE const requestedInterface* AdobeXMPCommon::IVersionable::GetInterfacePointer ( ) const
inline

Get the raw pointer to a const interface object implementing the requested version.

Returns
a raw pointer to a const interface object implementing the requested version.
Attention
In case a particular version number is not supported than an error is thrown.

Definition at line 51 of file IVersionable.h.

51  {
52  return const_cast< IVersionable * >( this )->GetInterfacePointer< requestedInterface >();
53  }
AdobeXMPCommon::IVersionable::REQ_FRIEND_CLASS_DECLARATION ( )
protected

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

XMPToolkit documentation generated by doxygen 1.8.11