| XMP Toolkit SDK 6.0.0

ISimpleNode.h
Go to the documentation of this file.
1 #ifndef __ISimpleNode_h__
2 #define __ISimpleNode_h__ 1
3
4 // =================================================================================================
5 // Copyright Adobe
6 // Copyright 2014 Adobe
7 // All Rights Reserved
8 //
9 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
10 // of the Adobe license agreement accompanying it. If you have received this file from a source other
11 // than Adobe, then your use, modification, or distribution of it requires the prior written permission
12 // of Adobe.
13 // =================================================================================================
14
15 #include "XMPCore/Interfaces/INode.h"
16
17 namespace AdobeXMPCore {
18
25 class XMP_PUBLIC ISimpleNode_v1
26 : public virtual INode_v1
27 {
28 public:
29
35 virtual spcIUTF8String APICALL GetValue() const = 0;
36
43 virtual void APICALL SetValue( const char * value, sizet valueLength ) = 0;
44
49 virtual bool APICALL IsURIType() const = 0;
50
55 virtual void APICALL SetURIType( bool isURI ) = 0;
56
57 // Factories to create the simple node
58
73 XMP_PRIVATE static spISimpleNode CreateSimpleNode( const char * nameSpace, sizet nameSpaceLength, const char * name, sizet nameLength,
74 const char * value = NULL, sizet valueLength = AdobeXMPCommon::npos );
75
76
79
85 virtual pISimpleNode APICALL GetActualISimpleNode() __NOTHROW__ = 0;
86 XMP_PRIVATE pcISimpleNode GetActualISimpleNode() const __NOTHROW__ {
87 return const_cast< ISimpleNode_v1 * >( this )->GetActualISimpleNode();
88 }
91
97 virtual AdobeXMPCore_Int::pISimpleNode_I APICALL GetISimpleNode_I() __NOTHROW__ = 0;
98
99 XMP_PRIVATE AdobeXMPCore_Int::pcISimpleNode_I GetISimpleNode_I() const __NOTHROW__ {
100 return const_cast< ISimpleNode_v1 * >( this )->GetISimpleNode_I();
101 }
104
111 XMP_PRIVATE static spISimpleNode MakeShared( pISimpleNode_base ptr );
112 XMP_PRIVATE static spcISimpleNode MakeShared( pcISimpleNode_base ptr ) {
113 return MakeShared( const_cast< pISimpleNode_base >( ptr ) );
114 }
117
122 XMP_PRIVATE static uint64 GetInterfaceID() { return kISimpleNodeID; }
123
128 XMP_PRIVATE static uint32 GetInterfaceVersion() { return 1; }
130
131 protected:
135 virtual ~ISimpleNode_v1() __NOTHROW__ {}
136
138 virtual pcIUTF8String_base APICALL getValue( pcIError_base & error ) const __NOTHROW__ = 0;
139 virtual void APICALL setValue( const char * value, sizet valueLength, pcIError_base & error ) __NOTHROW__ = 0;
140 virtual uint32 APICALL isURIType( pcIError_base & error ) const __NOTHROW__ = 0;
141 virtual void APICALL setURIType( uint32 isURI, pcIError_base & error ) __NOTHROW__ = 0;
142
143 #ifdef FRIEND_CLASS_DECLARATION
144 FRIEND_CLASS_DECLARATION();
145 #endif
146 REQ_FRIEND_CLASS_DECLARATION();
148
149 };
150 }
151
152 #endif // __ISimpleNode_h__
XMP_PRIVATE
#define XMP_PRIVATE
Definition: XMP_Environment.h:222
__NOTHROW__
#define __NOTHROW__
Definition: XMPCommonDefines.h:147
AdobeXMPCore::INode_v1
Version1 of the interface that serves as a base interface to all types of nodes in the XMP DOM.
Definition: INode.h:28
XMP_PUBLIC
#define XMP_PUBLIC
Definition: XMP_Environment.h:221
AdobeXMPCommon::pcIUTF8String_base
const typedef IUTF8String_v1 * pcIUTF8String_base
Definition: XMPCommonFwdDeclarations.h:75
AdobeXMPCore::pISimpleNode
ISimpleNode * pISimpleNode
Definition: XMPCoreFwdDeclarations.h:77
AdobeXMPCore::kISimpleNodeID
static const uint64 kISimpleNodeID(0x63536d6c4e6f6465)
AdobeXMPCore::spISimpleNode
shared_ptr< ISimpleNode > spISimpleNode
Definition: XMPCoreFwdDeclarations.h:79
INode.h
AdobeXMPCommon::spcIUTF8String
shared_ptr< const IUTF8String > spcIUTF8String
Definition: XMPCommonFwdDeclarations.h:80
AdobeXMPCommon::npos
const sizet npos(kMaxSize)
AdobeXMPCore
Definition: IArrayNode.h:18
AdobeXMPCore_Int::pcISimpleNode_I
const typedef ISimpleNode_I * pcISimpleNode_I
Definition: XMPCoreFwdDeclarations.h:258
AdobeXMPCommon::uint32
XMP_Uns32 uint32
Definition: XMPCommonDefines.h:174
AdobeXMPCommon::sizet
uint32 sizet
Definition: XMPCommonDefines.h:176
AdobeXMPCore::spcISimpleNode
shared_ptr< const ISimpleNode > spcISimpleNode
Definition: XMPCoreFwdDeclarations.h:80
REQ_FRIEND_CLASS_DECLARATION
#define REQ_FRIEND_CLASS_DECLARATION()
Definition: XMPCommonDefines.h:137
AdobeXMPCore::ISimpleNode_v1
Version1 of the interface that represents a Simple Property Node of XMP DOM.
Definition: ISimpleNode.h:25
AdobeXMPCore_Int::pISimpleNode_I
ISimpleNode_I * pISimpleNode_I
Definition: XMPCoreFwdDeclarations.h:256
AdobeXMPCore::ISimpleNode_v1::~ISimpleNode_v1
virtual ~ISimpleNode_v1() __NOTHROW__
Definition: ISimpleNode.h:135
AdobeXMPCommon::pcIError_base
const typedef IError_v1 * pcIError_base
Definition: XMPCommonFwdDeclarations.h:64
AdobeXMPCore::pcISimpleNode
const typedef ISimpleNode * pcISimpleNode
Definition: XMPCoreFwdDeclarations.h:78
AdobeXMPCore::pcISimpleNode_base
const typedef ISimpleNode_v1 * pcISimpleNode_base
Definition: XMPCoreFwdDeclarations.h:75
AdobeXMPCommon::uint64
XMP_Uns64 uint64
Definition: XMPCommonDefines.h:172