| XMP Toolkit SDK 6.0.0

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

Version1 of the interface that represents one segment in a path to a node into the XMP tree. More...

`#include <IPathSegment.h>`

Inheritance diagram for AdobeXMPCore::IPathSegment_v1:

## Public Types
enum | ePathSegmentType { kPSTNone = 0, kPSTProperty = 1, kPSTArrayIndex = 1 << 1, kPSTQualifier = 1 << 2, kPSTQualifierSelector = 1 << 3, kPSTAll = kAllBits }
| This enumeration represents the types of a path segment. More...

## Public Member Functions
virtual spcIUTF8String APICALL | GetNameSpace () const =0
| Gets the name space of the path segment. More...
virtual spcIUTF8String APICALL | GetName () const =0
| Gets the name of the path segment. More...
virtual ePathSegmentType APICALL | GetType () const =0
| Gets the type of the path segment. More...
virtual sizet APICALL | GetIndex () const __NOTHROW__=0
| Gets the index of the array type path segment. More...
virtual spcIUTF8String APICALL | GetValue () const =0
| Gets the value of the qualifier type path segment. 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...

## Static Public Member Functions
static XMP_PRIVATE spcIPathSegment | CreatePropertyPathSegment (const char *nameSpace, sizet nameSpaceLength, const char *name, sizet nameLength)
| Creates a normal property path segment.These are essentially all properties (simple, struct and arrays). More...
static XMP_PRIVATE spcIPathSegment | CreateArrayIndexPathSegment (const char *nameSpace, sizet nameSpaceLength, sizet index)
| Creates an array index path segment that denotes a specific element of an array. More...
static XMP_PRIVATE spcIPathSegment | CreateQualifierPathSegment (const char *nameSpace, sizet nameSpaceLength, const char *name, sizet nameLength)
| Creates a Qualifier path segment, which behaves like a normal property. More...
static XMP_PRIVATE spcIPathSegment | CreateQualifierSelectorPathSegment (const char *nameSpace, sizet nameSpaceLength, const char *name, sizet nameLength, const char *value, sizet valueLength)
| Creates a path segment that selects a specific qualifier by its value. For example a specific language in a alternative array of languages. More...

## Protected Member Functions
virtual | ~IPathSegment_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 ()

## Detailed Description

Version1 of the interface that represents one segment in a path to a node into the XMP tree.

Provides all the functions to access properties of the path segment and factory functions to create various kinds of path segments.

Attention
  Not thread safe and not required as only read only access is provided to client.

Definition at line 26 of file IPathSegment.h.

## Member Enumeration Documentation

## ◆ ePathSegmentType

enum AdobeXMPCore::IPathSegment_v1::ePathSegmentType

This enumeration represents the types of a path segment.

Enumerator
kPSTNone | None type.
kPSTProperty | Any property that consists of namespace and a localName.
kPSTArrayIndex | An array index which does not have a namespace or localName itself.
kPSTQualifier | A qualifier of a property, also consists of namespace and localName.
kPSTQualifierSelector | Selects a specific qualifier by its value (e.g. specific language)
kPSTAll | Represents all property types.

Definition at line 35 of file IPathSegment.h.

35 {
37 kPSTNone = 0,
38
40 kPSTProperty = 1,
41
43 kPSTArrayIndex = 1 << 1,
44
46 kPSTQualifier = 1 << 2,
47
49 kPSTQualifierSelector = 1 << 3,
50
52 kPSTAll = kAllBits
53 } ePathSegmentType;

## Constructor & Destructor Documentation

## ◆ ~IPathSegment_v1()

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

Destructor

Definition at line 210 of file IPathSegment.h.

210 {}

## Member Function Documentation

## ◆ CreateArrayIndexPathSegment()

static XMP_PRIVATE spcIPathSegment AdobeXMPCore::IPathSegment_v1::CreateArrayIndexPathSegment | ( | const char * | nameSpace,
|  | sizet | nameSpaceLength,
|  | sizet | index
| ) |  |
| static

Creates an array index path segment that denotes a specific element of an array.

Such segments do not have an own name and inherits the namespace from the Array property itself.

Parameters

  [in] | nameSpace | Pointer to a constant char buffer containing name space URI of the property.
  [in] | nameSpaceLength | Number of characters in nameSpace. In case nameSpace is null terminated set it to #AdobeXMPCommon::npos.
  [in] | index | An object of type #AdobeXMP::sizet containting the index of the array element.

Returns
  A shared pointer to const #IPathSegment.

Attention
  Throws #AdobeXMP::pcIError in case
  - pointers to const char buffers are NULL,
  - their content is empty.

## ◆ CreatePropertyPathSegment()

static XMP_PRIVATE spcIPathSegment AdobeXMPCore::IPathSegment_v1::CreatePropertyPathSegment | ( | const char * | nameSpace,
|  | sizet | nameSpaceLength,
|  | const char * | name,
|  | sizet | nameLength
| ) |  |
| static

Creates a normal property path segment.These are essentially all properties (simple, struct and arrays).

Parameters

  [in] | nameSpace | Pointer to a constant char buffer containing name space URI of the property.
  [in] | nameSpaceLength | Number of characters in nameSpace. In case nameSpace is null terminated set it to #AdobeXMPCommon::npos.
  [in] | name | Pointer to a constant char buffer containing local name of the property.
  [in] | nameLength | Number of characters in name. In case name is null terminated set it to #AdobeXMPCommon::npos.

Returns
  A shared pointer to const #IPathSegment.

Attention
  Throws #AdobeXMPCommon::pcIError in case
  - pointers to const char buffers are NULL,
  - their content is empty.

## ◆ CreateQualifierPathSegment()

static XMP_PRIVATE spcIPathSegment AdobeXMPCore::IPathSegment_v1::CreateQualifierPathSegment | ( | const char * | nameSpace,
|  | sizet | nameSpaceLength,
|  | const char * | name,
|  | sizet | nameLength
| ) |  |
| static

Creates a Qualifier path segment, which behaves like a normal property.

Parameters

  [in] | nameSpace | Pointer to a constant char buffer containing name space URI of the property.
  [in] | nameSpaceLength | Number of characters in nameSpace. In case nameSpace is null terminated set it to #AdobeXMPCommon::npos.
  [in] | name | Pointer to a constant char buffer containing local name of the property.
  [in] | nameLength | Number of characters in name. In case name is null terminated set it to #AdobeXMPCommon::npos.

Returns
  A shared pointer to const #IPathSegment.

Attention
  Throws #AdobeXMPCommon::pcIError in case
  - pointers to const char buffers are NULL,
  - their content is empty.

## ◆ CreateQualifierSelectorPathSegment()

static XMP_PRIVATE spcIPathSegment AdobeXMPCore::IPathSegment_v1::CreateQualifierSelectorPathSegment | ( | const char * | nameSpace,
|  | sizet | nameSpaceLength,
|  | const char * | name,
|  | sizet | nameLength,
|  | const char * | value,
|  | sizet | valueLength
| ) |  |
| static

Creates a path segment that selects a specific qualifier by its value. For example a specific language in a alternative array of languages.

Parameters

  [in] | nameSpace | Pointer to a constant char buffer containing name space URI of the property.
  [in] | nameSpaceLength | Number of characters in nameSpace. In case nameSpace is null terminated set it to #AdobeXMPCommon::npos.
  [in] | name | Pointer to a constant char buffer containing local name of the property.
  [in] | nameLength | Number of characters in name. In case name is null terminated set it to #AdobeXMPCommon::npos.
  [in] | value | Pointer to a constant char buffer containing value of the language (xml:lang)
  [in] | valueLength | Number of characters in value. In case value is null terminated set it to #AdobeXMPCommon::npos.

Returns
  A shared pointer to const #IPathSegment.

Attention
  Throws AdobeXMPCommon::pcIError in case
  - pointers to const char buffers are NULL,
  - their content is empty.

## ◆ GetIndex()

virtual sizet APICALL AdobeXMPCore::IPathSegment_v1::GetIndex | ( |  | ) | const
| pure virtual

Gets the index of the array type path segment.

Returns
  An objet of type #AdobeXMPCommon::sizet object representing index of the array type path segment. In case path segment is not of type kPSTArrayIndex, it returns #AdobeXMPCommon::kMaxSize.

## ◆ GetName()

virtual spcIUTF8String APICALL AdobeXMPCore::IPathSegment_v1::GetName | ( |  | ) | const
| pure virtual

Gets the name of the path segment.

Returns
  A shared pointer to const #AdobeXMPCommon::IUTF8String object containing name of the path segment. In case path segment has no name space, an invalid shared pointer is returned.

## ◆ GetNameSpace()

virtual spcIUTF8String APICALL AdobeXMPCore::IPathSegment_v1::GetNameSpace | ( |  | ) | const
| pure virtual

Gets the name space of the path segment.

Returns
  A shared pointer to const #AdobeXMPCommon::IUTF8String object representing namespace of the path segment.

## ◆ GetType()

virtual ePathSegmentType APICALL AdobeXMPCore::IPathSegment_v1::GetType | ( |  | ) | const
| pure virtual

Gets the type of the path segment.

Returns
  An object of type #ePathSegmentType representing type of the path segment.

## ◆ GetValue()

virtual spcIUTF8String APICALL AdobeXMPCore::IPathSegment_v1::GetValue | ( |  | ) | const
| pure virtual

Gets the value of the qualifier type path segment.

Returns
  A shared pointer to const #AdobeXMP::IUTF8String object representing value of the qualifier type path segment. In case path segment is not of type kPSTQualifier an invalid shared pointer is returned.

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

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

AdobeXMPCore::IPathSegment_v1::kPSTArrayIndex
@ kPSTArrayIndex
An array index which does not have a namespace or localName itself.
Definition: IPathSegment.h:43
AdobeXMPCore::IPathSegment_v1::kPSTQualifier
@ kPSTQualifier
A qualifier of a property, also consists of namespace and localName.
Definition: IPathSegment.h:46
AdobeXMPCore::IPathSegment_v1::kPSTAll
@ kPSTAll
Represents all property types.
Definition: IPathSegment.h:52
AdobeXMPCore::IPathSegment_v1::kPSTProperty
@ kPSTProperty
Any property that consists of namespace and a localName.
Definition: IPathSegment.h:40
AdobeXMPCore::IPathSegment_v1::ePathSegmentType
ePathSegmentType
This enumeration represents the types of a path segment.
Definition: IPathSegment.h:35
AdobeXMPCore::IPathSegment_v1::kPSTNone
@ kPSTNone
None type.
Definition: IPathSegment.h:37
AdobeXMPCore::IPathSegment_v1::kPSTQualifierSelector
@ kPSTQualifierSelector
Selects a specific qualifier by its value (e.g. specific language)
Definition: IPathSegment.h:49
AdobeXMPCommon::kAllBits
static const uint32 kAllBits(0xFFFFFFFF)