InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IContentTracker.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 
24 #ifndef __IContentTracker__
25 #define __IContentTracker__
26 
27 #include "ShuksanID.h"
28 #include "IPMStream.h"
29 
38 {
39  public:
40  enum { kDefaultIID = IID_ICONTENTTRACKER };
41 
46  virtual void AddTag(ImplementationID tag) = 0;
47 
52  virtual void AddClass(ClassID clsID) = 0;
53 
58  virtual void PushClassContext(ClassID context) = 0;
59 
64  virtual void PushImplementationContext(ImplementationID context) = 0;
65 
69  virtual void PopContext() = 0;
70 
75  virtual void Open(IDataBase *db, UID id) = 0;
76 
78  virtual void Close() = 0;
79 };
80 
81 
88 {
89 public:
95  {
96  fTracker = (IContentTracker *)stream->QueryInterface(IID_ICONTENTTRACKER);
97  if (fTracker != nil)
98  {
99  fTracker->PushClassContext(context);
100  }
101  }
102 
108  {
109  fTracker = (IContentTracker *)stream->QueryInterface(IID_ICONTENTTRACKER);
110  if (fTracker != nil)
111  {
112  fTracker->PushImplementationContext(context);
113  }
114  }
115 
119  {
120  if (fTracker != nil)
121  {
122  fTracker->PopContext();
123  fTracker->Release();
124  }
125  }
126 
132  {
133  return fTracker;
134  }
135 
136 private:
137  IContentTracker * fTracker;
138 };
139 
140 
141 #endif // __IContentTracker__