| XMP Toolkit SDK 6.0.0

Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
AdobeXMPCore::INameSpacePrefixMap_v1 Class Referenceabstract

Version1 of the interface that represents map where each entry consists of prefix string as the key and corresponding nameSpace string as its value. More...

`#include <INameSpacePrefixMap.h>`

Inheritance diagram for AdobeXMPCore::INameSpacePrefixMap_v1:

## Public Member Functions
virtual bool APICALL | Insert (const char *prefix, sizet prefixLength, const char *nameSpace, sizet nameSpaceLength)=0
| Adds a new pair of prefix string and its corresponding nameSpace string or replace an existing entry. More...
virtual bool APICALL | RemovePrefix (const char *prefix, sizet prefixLength)=0
| Finds the prefix string in the map and removes an entry corresponding to it in the map. More...
virtual bool APICALL | RemoveNameSpace (const char *nameSpace, sizet nameSpaceLength)=0
| Finds the nameSpace string in the map and removes an entry corresponding to it in the map. More...
virtual bool APICALL | IsPrefixPresent (const char *prefix, sizet prefixLength) const =0
| Checks for the existence of a particular prefix in the map. More...
virtual bool APICALL | IsNameSpacePresent (const char *nameSpace, sizet nameSpaceLength) const =0
| Checks for the existence of a particular nameSpace in the map. More...
virtual spcIUTF8String APICALL | GetNameSpace (const char *prefix, sizet prefixLength) const =0
| Gets the nameSpace string corresponding to the prefix string. More...
virtual spcIUTF8String APICALL | GetPrefix (const char *nameSpace, sizet nameSpaceLength) const =0
| Get the prefix string corresponding to the nameSpace string. More...
virtual sizet APICALL | Size () const __NOTHROW__=0
| To get the total number of entries in the map. More...
bool | IsEmpty () const __NOTHROW__
| To check whether the map is empty or not. More...
virtual void APICALL | Clear () __NOTHROW__=0
| Clear all the entries in the map. More...
virtual spINameSpacePrefixMap APICALL | Clone () const =0
| Virtual Copy Constructor. More...
Public Member Functions inherited from AdobeXMPCommon::ISharedObject
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...
Public Member Functions inherited from AdobeXMPCommon::IVersionable
template<typename requestedInterface >
XMP_PRIVATE requestedInterface * | GetInterfacePointer ()
| Get the raw pointer to an interface object implementing the requested version. More...
template<typename requestedInterface >
const XMP_PRIVATE requestedInterface * | GetInterfacePointer () const
| Get the raw pointer to a const interface object implementing the requested version. More...
Public Member Functions inherited from AdobeXMPCommon::IThreadSafe
virtual void APICALL | EnableThreadSafety () const __NOTHROW__=0
| Enables the thread safety on an object. More...
virtual void APICALL | DisableThreadSafety () const __NOTHROW__=0
| Disables the thread safety on an object. More...
virtual bool APICALL | IsThreadSafe () const =0
| Informs whether object can be used across multiple threads or not. More...

## Static Public Member Functions
static XMP_PRIVATE spcINameSpacePrefixMap | GetDefaultNameSpacePrefixMap ()
| Provides the default mapping of prefix string and nameSpace strings used by XMPCore. More...
static XMP_PRIVATE spINameSpacePrefixMap | CreateNameSpacePrefixMap ()
| Creates an empty namespace - prefix map and returns it to the client as a shared pointer. More...

## Protected Member Functions
virtual | ~INameSpacePrefixMap_v1 () __NOTHROW__
Protected Member Functions inherited from AdobeXMPCommon::ISharedObject
virtual | ~ISharedObject () __NOTHROW__=0
| REQ_FRIEND_CLASS_DECLARATION ()
Protected Member Functions inherited from AdobeXMPCommon::IVersionable
virtual | ~IVersionable ()
| REQ_FRIEND_CLASS_DECLARATION ()
Protected Member Functions inherited from AdobeXMPCommon::IThreadSafe
| REQ_FRIEND_CLASS_DECLARATION ()

## Detailed Description

Version1 of the interface that represents map where each entry consists of prefix string as the key and corresponding nameSpace string as its value.

Provides all the functions to get/set the entries inside the map.

Attention
  Supports Multi-threading at object level through locks.

Definition at line 28 of file INameSpacePrefixMap.h.

## Constructor & Destructor Documentation

## ◆ ~INameSpacePrefixMap_v1()

virtual AdobeXMPCore::INameSpacePrefixMap_v1::~INameSpacePrefixMap_v1 | ( |  | ) |
| inline protected virtual

Destructor

Definition at line 217 of file INameSpacePrefixMap.h.

217 {}

## Member Function Documentation

## ◆ Clear()

virtual void APICALL AdobeXMPCore::INameSpacePrefixMap_v1::Clear | ( |  | ) |
| pure virtual

Clear all the entries in the map.

## ◆ Clone()

virtual spINameSpacePrefixMap APICALL AdobeXMPCore::INameSpacePrefixMap_v1::Clone | ( |  | ) | const
| pure virtual

Virtual Copy Constructor.

Makes an another object which is exact replica of the existing object.

## ◆ CreateNameSpacePrefixMap()

static XMP_PRIVATE spINameSpacePrefixMap AdobeXMPCore::INameSpacePrefixMap_v1::CreateNameSpacePrefixMap | ( |  | ) |
| static

Creates an empty namespace - prefix map and returns it to the client as a shared pointer.

Returns
  A shared pointer to an empty INameSpacePrefixMap object.

## ◆ GetDefaultNameSpacePrefixMap()

static XMP_PRIVATE spcINameSpacePrefixMap AdobeXMPCore::INameSpacePrefixMap_v1::GetDefaultNameSpacePrefixMap | ( |  | ) |
| static

Provides the default mapping of prefix string and nameSpace strings used by XMPCore.

Returns
  A shared pointer to const INameSpacePrefixMap object containing all the mappings used as default by the XMPCore.

## ◆ GetNameSpace()

virtual spcIUTF8String APICALL AdobeXMPCore::INameSpacePrefixMap_v1::GetNameSpace | ( | const char * | prefix,
|  | sizet | prefixLength
| ) |  | const
| pure virtual

Gets the nameSpace string corresponding to the prefix string.

Parameters

  [in] | prefix | Pointer to a const char buffer containing prefix string.
  [in] | prefixLength | Number of characters in prefix. In case prefix is null terminated set it to #AdobeXMPCommon::npos.

Returns
  A shared pointer to const #AdobeXMPCommon::IUTF8String object containing nameSpace string corresponding to prefix string if a mapping exists, otherwise invalid shared pointer is returned.

Note
  Raises warning in case of
  - prefix is null pointer, or
  - prefixLength is 0.

## ◆ GetPrefix()

virtual spcIUTF8String APICALL AdobeXMPCore::INameSpacePrefixMap_v1::GetPrefix | ( | const char * | nameSpace,
|  | sizet | nameSpaceLength
| ) |  | const
| pure virtual

Get the prefix string corresponding to the nameSpace string.

Parameters

  [in] | nameSpace | Pointer to a constant char buffer containing nameSpace string.
  [in] | nameSpaceLength | Number of characters in nameSpace. In case nameSpace is null terminated set it to #AdobeXMPCommon::npos.

Returns
  A shared pointer to const #AdobeXMPCommon::IUTF8String object containing prefix string corresponding to nameSpace string if a mapping exists, otherwise invalid shared pointer is returned.

Note
  Raises warning in case of
  - nameSpace is null pointer, or
  - nameSpaceLength is 0.

## ◆ Insert()

virtual bool APICALL AdobeXMPCore::INameSpacePrefixMap_v1::Insert | ( | const char * | prefix,
|  | sizet | prefixLength,
|  | const char * | nameSpace,
|  | sizet | nameSpaceLength
| ) |  |
| pure virtual

Adds a new pair of prefix string and its corresponding nameSpace string or replace an existing entry.

Parameters

  [in] | prefix | Pointer to a constant char buffer containing prefix string.
  [in] | prefixLength | Number of characters in prefix. In case prefix is null terminated set it to #AdobeXMPCommon::npos.
  [in] | nameSpace | Pointer to a constant char buffer containing nameSpace string.
  [in] | nameSpaceLength | Number of characters in nameSpace. In case nameSpace is null terminated set it to #AdobeXMPCommon::npos.

Returns
  A bool type object containing true in case operation was successful, false otherwise.

Note
  Raises warning in case of
  - prefix or nameSpace are null pointers
  - prefixLength or nameSpaceLength is 0.

## ◆ IsEmpty()

bool AdobeXMPCore::INameSpacePrefixMap_v1::IsEmpty | ( |  | ) | const

To check whether the map is empty or not.

Returns
  True in case map is empty; false otherwise.

## ◆ IsNameSpacePresent()

virtual bool APICALL AdobeXMPCore::INameSpacePrefixMap_v1::IsNameSpacePresent | ( | const char * | nameSpace,
|  | sizet | nameSpaceLength
| ) |  | const
| pure virtual

Checks for the existence of a particular nameSpace in the map.

Parameters

  [in] | nameSpace | Pointer to a constant char buffer containing nameSpace string.
  [in] | nameSpaceLength | Number of characters in nameSpace. In case nameSpace is null terminated set it to #AdobeXMPCommon::npos.

Returns
  A bool type object containing true in case there is an entry present corresponding to the nameSpace string, otherwise false.

Note
  Raises warning in case of
  - nameSpace is null pointer, or
  - nameSpaceLength is 0.

## ◆ IsPrefixPresent()

virtual bool APICALL AdobeXMPCore::INameSpacePrefixMap_v1::IsPrefixPresent | ( | const char * | prefix,
|  | sizet | prefixLength
| ) |  | const
| pure virtual

Checks for the existence of a particular prefix in the map.

Parameters

  [in] | prefix | Pointer to a const char buffer containing prefix string.
  [in] | prefixLength | Number of characters in prefix. In case prefix is null terminated set it to #AdobeXMPCommon::npos.

Returns
  A bool type object containing true in case there is an entry present corresponding to the prefix string, otherwise false.

Note
  Raises warning in case of
  - prefix is null pointer, or
  - prefixLength is 0.

## ◆ RemoveNameSpace()

virtual bool APICALL AdobeXMPCore::INameSpacePrefixMap_v1::RemoveNameSpace | ( | const char * | nameSpace,
|  | sizet | nameSpaceLength
| ) |  |
| pure virtual

Finds the nameSpace string in the map and removes an entry corresponding to it in the map.

Parameters

  [in] | nameSpace | Pointer to a constant char buffer containing nameSpace string.
  [in] | nameSpaceLength | Number of characters in nameSpace. In case nameSpace is null terminated set it to #AdobeXMPCommon::npos.

Returns
  A bool type object containing true in case entry was found and then deleted from the map, false otherwise.

Note
  Raises warning in case of
  - nameSpace is null pointer, or
  - nameSpaceLength is 0.

Attention
  Throws AdobeXMPCommon::pcIError in case of failure in removing or searching process.

## ◆ RemovePrefix()

virtual bool APICALL AdobeXMPCore::INameSpacePrefixMap_v1::RemovePrefix | ( | const char * | prefix,
|  | sizet | prefixLength
| ) |  |
| pure virtual

Finds the prefix string in the map and removes an entry corresponding to it in the map.

Parameters

  [in] | prefix | Pointer to a const char buffer containing prefix string.
  [in] | prefixLength | Number of characters in prefix. In case prefix is null terminated set it to #AdobeXMPCommon::npos.

Returns
  A bool type object containing true in case entry was found and then deleted from the map, false otherwise.

Note
  Raises warning in case of
  - prefix is null pointer, or
  - prefixLength is 0.

Attention
  Throws AdobeXMPCommon::pcIError in case of failure in removing or searching process.

## ◆ Size()

virtual sizet APICALL AdobeXMPCore::INameSpacePrefixMap_v1::Size | ( |  | ) | const
| pure virtual

To get the total number of entries in the map.

Returns
  An object of type #AdobeXMPCommon::sizet containing the count of entries in the map.

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

- public/include/XMPCore/Interfaces/INameSpacePrefixMap.h