XMPCommonFwdDeclarations.h
Go to the documentation of this file.
1 #ifndef __XMPCommonFwdDeclarations_h__
2 #define __XMPCommonFwdDeclarations_h__ 1
3 
4 // =================================================================================================
5 // ADOBE SYSTEMS INCORPORATED
6 // Copyright 2014 Adobe Systems Incorporated
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.
11 // =================================================================================================
12 
15 #include <vector>
16 
17 #if SUPPORT_SHARED_POINTERS_IN_STD
18  #include <memory>
19  #include <functional>
20 #elif SUPPORT_SHARED_POINTERS_IN_TR1
21  #if XMP_WinBuild
22  #include <memory>
23  #else
24  #include <tr1/memory>
25  #include <tr1/functional>
26  #endif
27 #else
28  #error "location of shared pointer stuff is unknown"
29 #endif
30 
31 namespace AdobeXMPCommon {
32 
33  #if SUPPORT_SHARED_POINTERS_IN_STD
34  using std::shared_ptr;
35  using std::enable_shared_from_this;
36  using std::mem_fn;
37  #elif SUPPORT_SHARED_POINTERS_IN_TR1
38  using std::tr1::shared_ptr;
39  using std::tr1::enable_shared_from_this;
40  using std::tr1::mem_fn;
41  #endif
42 
43  // void
44  typedef void * pvoid;
45  typedef const void * pcvoid;
46  typedef shared_ptr< void > spvoid;
47  typedef shared_ptr< const void * > spcvoid;
48 
49  // IObjectFactory
54  typedef BASE_CLASS( IObjectFactory, IOBJECTFACTORY_VERSION ) IObjectFactory;
55  typedef IObjectFactory * pIObjectFactory;
56  typedef const IObjectFactory * pcIObjectFactory;
57 
58  // IError
59  class IError_v1;
60  typedef IError_v1 IError_base;
61  typedef IError_v1 * pIError_base;
62  typedef const IError_v1 * pcIError_base;
63  typedef BASE_CLASS( IError, IERROR_VERSION ) IError;
64  typedef IError * pIError;
65  typedef const IError * pcIError;
66  typedef shared_ptr< IError > spIError;
67  typedef shared_ptr< const IError > spcIError;
68 
69  // IUTF8String
71  typedef IUTF8String_v1 IUTF8String_base;
72  typedef IUTF8String_v1 * pIUTF8String_base;
73  typedef const IUTF8String_v1 * pcIUTF8String_base;
74  typedef BASE_CLASS( IUTF8String, IUTF8STRING_VERSION ) IUTF8String;
75  typedef IUTF8String * pIUTF8String;
76  typedef const IUTF8String * pcIUTF8String;
77  typedef shared_ptr< IUTF8String > spIUTF8String;
78  typedef shared_ptr< const IUTF8String > spcIUTF8String;
79 
80  // IMemoryAllocator
82  typedef IMemoryAllocator_v1 IMemoryAllocator_base;
83  typedef IMemoryAllocator_v1 * pIMemoryAllocator_base;
84  typedef const IMemoryAllocator_v1 * pcIMemoryAllocator_base;
85  typedef BASE_CLASS( IMemoryAllocator, IMEMORYALLOCATOR_VERSION ) IMemoryAllocator;
86  typedef IMemoryAllocator * pIMemoryAllocator;
87  typedef const IMemoryAllocator * pcIMemoryAllocator;
88  typedef shared_ptr< IMemoryAllocator > spIMemoryAllocator;
89  typedef shared_ptr< const IMemoryAllocator > spcIMemoryAllocator;
90 
91  // IErrorNotifier
93  typedef IErrorNotifier_v1 IErrorNotifier_base;
94  typedef IErrorNotifier_v1 * pIErrorNotifier_base;
95  typedef const IErrorNotifier_v1 * pcIErrorNotifier_base;
96  typedef BASE_CLASS( IErrorNotifier, IERRORNOTIFIER_VERSION ) IErrorNotifier;
97  typedef IErrorNotifier * pIErrorNotifier;
98  typedef const IErrorNotifier * pcIErrorNotifier;
99  typedef shared_ptr< IErrorNotifier > spIErrorNotifier;
100  typedef shared_ptr< const IErrorNotifier > spcIErrorNotifier;
101 
102  // IConfigurationManager
104  typedef IConfigurationManager_v1 IConfigurationManager_base;
105  typedef IConfigurationManager_v1 * pIConfigurationManager_base;
106  typedef const IConfigurationManager_v1 * pcIConfigurationManager_base;
107  typedef BASE_CLASS( IConfigurationManager, ICONFIGURATIONMANAGER_VERSION ) IConfigurationManager;
108  typedef IConfigurationManager * pIConfigurationManager;
109  typedef const IConfigurationManager * pcIConfigurationManager;
110  typedef shared_ptr< IConfigurationManager > spIConfigurationManager;
111  typedef shared_ptr< const IConfigurationManager > spcIConfigurationManager;
112 
113  // IConfigurable
115  typedef IConfigurable * pIConfigurable;
116  typedef const IConfigurable * pcIConfigurable;
117 
118  // typedefs for vectors and their corresponding shared pointers.
119  typedef std::vector< spIUTF8String > IUTF8Strings;
120  typedef std::vector< spcIUTF8String > cIUTF8Strings;
121  typedef shared_ptr< IUTF8Strings > spIUTF8Strings;
122  typedef shared_ptr< cIUTF8Strings > spcIUTF8Strings;
123  typedef shared_ptr< const IUTF8Strings > spIUTF8Strings_const;
124  typedef shared_ptr< const cIUTF8Strings > spcIUTF8Strings_const;
125 
132  typedef void * ( *MemAllocateProc )( sizet sz );
133  void * MemAllocate( sizet size ) __NOTHROW__;
134 
139  typedef void( *MemReleaseProc )( void * ptr );
140  void MemRelease( void * ptr ) __NOTHROW__;
141 
142 } // namespace AdobeXMPCommon
143 
145 
146  // ISharedObject_I
147  class ISharedObject_I;
148  typedef ISharedObject_I * pISharedObject_I;
149  typedef const ISharedObject_I * pcISharedObject_I;
150 
151  // IThreadSafe_I
152  class IThreadSafe_I;
153  typedef IThreadSafe_I * pIThreadSafe_I;
154  typedef const IThreadSafe_I * pcIThreadSafe_I;
155 
156 }
157 
158 #endif // __XMPCommonFwdDeclarations_h__
ISharedObject_I * pISharedObject_I
void * MemAllocate(sizet size) __NOTHROW__
std::vector< spcIUTF8String > cIUTF8Strings
const IErrorNotifier * pcIErrorNotifier
shared_ptr< IErrorNotifier > spIErrorNotifier
shared_ptr< IConfigurationManager > spIConfigurationManager
shared_ptr< IMemoryAllocator > spIMemoryAllocator
const IObjectFactory_v1 * pcIObjectFactory_base
#define IMEMORYALLOCATOR_VERSION
IErrorNotifier * pIErrorNotifier
IObjectFactory_v1 IObjectFactory_base
Version1 of the interface that represents an interface to be implemented by client in case he is inte...
shared_ptr< IError > spIError
const ISharedObject_I * pcISharedObject_I
shared_ptr< const IError > spcIError
#define __NOTHROW__
shared_ptr< const IUTF8String > spcIUTF8String
void MemRelease(void *ptr) __NOTHROW__
#define IUTF8STRING_VERSION
const IObjectFactory * pcIObjectFactory
const IConfigurationManager * pcIConfigurationManager
Interface that allows to attach various key-value parameters to the underlying object.
Definition: IConfigurable.h:30
Version1 of the interface that represents an interface to be implemented by client in case he is inte...
std::vector< spIUTF8String > IUTF8Strings
IConfigurationManager * pIConfigurationManager
IUTF8String * pIUTF8String
const IUTF8String * pcIUTF8String
#define ICONFIGURATIONMANAGER_VERSION
void(* MemReleaseProc)(void *ptr)
A function pointer to get the memory freed from the library.
shared_ptr< const IMemoryAllocator > spcIMemoryAllocator
void *(* MemAllocateProc)(sizet sz)
A function pointer to get the memory allocated from the library.
shared_ptr< void > spvoid
Version1 of a interface that represents a factory to create various artifacts defined within AdobeXMP...
#define IERROR_VERSION
shared_ptr< const cIUTF8Strings > spcIUTF8Strings_const
Version1 of the interface that represents an error/warning encountered during processing.
Definition: IError.h:26
const IMemoryAllocator * pcIMemoryAllocator
shared_ptr< const void * > spcvoid
const IThreadSafe_I * pcIThreadSafe_I
shared_ptr< const IErrorNotifier > spcIErrorNotifier
shared_ptr< const IConfigurationManager > spcIConfigurationManager
IObjectFactory * pIObjectFactory
shared_ptr< IUTF8Strings > spIUTF8Strings
Version1 of the interface that represents configuration settings controllable by the client...
IObjectFactory_v1 * pIObjectFactory_base
typedef BASE_CLASS(IObjectFactory, IOBJECTFACTORY_VERSION) IObjectFactory
IMemoryAllocator * pIMemoryAllocator
#define IERRORNOTIFIER_VERSION
Version1 of the interface that represents an UTF8String.
Definition: IUTF8String.h:23
#define IOBJECTFACTORY_VERSION
Macro to include a client file through with client can control the interface versions he wants to sti...
shared_ptr< IUTF8String > spIUTF8String
shared_ptr< cIUTF8Strings > spcIUTF8Strings
shared_ptr< const IUTF8Strings > spIUTF8Strings_const

XMPToolkit documentation generated by doxygen 1.8.11