InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SnipRunManager.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Adobe Developer Technologies
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 _SnipRunManager_
25 #define _SnipRunManager_
26 
27 // Interface includes:
28 
29 // General includes:
30 #include "KeyValuePair.h"
31 
32 // Forward declarations:
33 class PMString;
34 class SnpRunnable;
35 
45 {
46 protected:
51 
52 public:
57  static SnipRunManager* Instance();
58 
62  void DeleteInstance();
63 
66  virtual ~SnipRunManager();
67 
74 
79 
85  void AddSnippet(SnpRunnable* runnable);
86 
91  void RemoveSnippet(SnpRunnable* runnable);
92 
97  int32 GetNumberOfSnippets() const {return fSnippetDict.size();};
98 
102  const SnippetDict& GetSnippets() const {return fSnippetDict;};
103 
108  SnpRunnable* FindSnippet(const PMString& snippetName) const;
109 
113  void SortSnippets(void);
114 
115 private:
116  static SnipRunManager* gSnipRunManager;
117  SnippetDict fSnippetDict;
118 };
119 
120 #endif // _SnipRunManager_
121 
122