InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CContentIteratorReg.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Steve Pellegrin
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 
24 #if !defined(__CContentIteratorReg__)
25 #define __CContentIteratorReg__
26 
27 
28 // ----- Interfaces -----
29 
30 #include "IContentIteratorRegister.h"
31 
32 // ----- Includes -----
33 
34 #include "K2Vector.h"
35 
36 // ----- Utility files -----
37 
38 #include "SchemaUtils.h"
39 
40 
41 class FormatID;
42 class VersionID;
43 
44 
45 //========================================================================================
46 // CLASS CContentIteratorRegister
47 //========================================================================================
48 
49 #ifdef PUBLIC_BUILD
50 #endif
51 
52 
60 {
61 public:
63 
64  virtual uint32 GetClassIDCount();
65  virtual void GetNthClassID(uint32 n, ClassID &id);
66 
67  virtual uint32 GetImplementationIDCount();
68  virtual void GetNthImplementationID(uint32 n, ImplementationID &id);
69 
70  virtual IContentReadIterator *NewNthClassReadIterator(uint32 n, const VersionID &version, IPMStream *s);
71  virtual IContentWriteIterator *NewNthClassWriteIterator(uint32 n, const VersionID &version, IPMStream *s);
72 
73  virtual IContentReadIterator *NewNthImplementationReadIterator(uint32 n, const VersionID &version, IPMStream *s);
74  virtual IContentWriteIterator *NewNthImplementationWriteIterator(uint32 n, const VersionID &version, IPMStream *s);
75 
76 protected:
84  {return NewClosestSchemaReadIterator(true, classID.Get(), version, s);}
85 
93  {return NewClosestSchemaReadIterator(false, implID.Get(), version, s);}
94 
95 private:
96  IContentReadIterator *NewClosestSchemaReadIterator(bool isClass, uint32 idValue, const VersionID &version, IPMStream *s);
97  const Schemas::Schema *FindSchema(bool isClass, uint32 idValue, const VersionID &version);
98  const Schemas::Schema *AddSchema(bool isClass, uint32 idValue, const VersionID &version);
99 
100 private:
101  PluginID fMyPlugin;
102  PluginManager fPluginManager;
103  SchemaManager fSchemaMgr;
104  PathManager fPathMgr;
106 };
107 
108 #ifdef PUBLIC_BUILD
109 #endif
110 
111 
112 #endif // __CContentIteratorReg__