InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
PersistUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Robin_Briggs
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //
23 // Utilities for getting objects' persistent identity.
24 //
25 //========================================================================================
26 
27 #ifndef __PersistUtils__
28 #define __PersistUtils__
29 
30 class IContentMgr;
32 
33 #include "UIDRef.h"
34 
48  UID GetUID( const IPMUnknown *obj);
49 
58  IDataBase *GetDataBase(const IPMUnknown *obj);
59 
67  UIDRef GetUIDRef(const IPMUnknown *obj);
68 
82  void PreDirty(IPMUnknown *pFace, ImplementationID prop = kInvalidImpl, bool16 allowModification = kTrue);
83 
84  void PreDirtyAllowDuplicateMessage(IPMUnknown *pFace, ImplementationID prop = kInvalidImpl, bool16 allowModification = kTrue);
85 
86  void PreDirtyNoMessage(IPMUnknown *pFace, ImplementationID prop = kInvalidImpl, bool16 allowModification = kTrue);
87 
88  void PreDirtyOverrideMessage(IPMUnknown *pFace, PMIID overrideIID, ImplementationID prop = kInvalidImpl, bool16 allowModification = kTrue);
89 
90  void PreDirtyOverrideAllowDuplicateMessage(IPMUnknown *pFace, PMIID overrideIID, ImplementationID prop = kInvalidImpl, bool16 allowModification = kTrue);
91 
107  void PreDirty(IControllingUnknown *boss, IPMUnknown *p, ImplementationID prop, bool16 allowModification);
108 
109  void PreDirtyNoMessage(IControllingUnknown *boss, IPMUnknown *p, ImplementationID prop, bool16 allowModification);
110 
118  void PreDirtyViewInterface(IPMUnknown *pFace, ImplementationID prop = kInvalidImpl);
119 
125  ClassID GetClass( const IPMUnknown *obj);
126 
130  bool16 ClassesAreCompatible(const ClassID& aClass, const ClassID& bClass);
131 
136  bool16 ClassIsDescendantOf(const ClassID& anscestor, const ClassID& descendant);
137 
143  void CopyData(IPMStream *inStream, IPMStream *outStream, int32 length);
144 
146  {
147  public:
148  virtual bool Transfer(uchar *buffer, uint32 len) = 0;
149  };
150 
151  void CopyData(IPMStream *inStream, int32 length, CopyDataFunctor *transferOut);
152 
153 
155 
156 
157 
158 #ifdef DEBUG
159 // only only only for debug code!
160  int32 GetRefCount(const IPMUnknown *obj);
161  ImplementationID GetImplID(const IPMUnknown *obj, PMIID interfaceID);
162 #endif
163 
164 
165 // Internal Use Only
166 // passing nil will return the application's plug-in ID.
167  PluginID GetPluginID( const IPMUnknown *obj );
168 
170 
171 
172 
173 
174 #endif // __PersistUtils__