InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ActionMapper.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 __ActionMapper_H__
25 #define __ActionMapper_H__
26 #include "K2Vector.tpp"
27 #include "K2Pair.h"
28 
30 protected:
31  ActionMapper(){};
32 
33 public:
35  typedef ActionClassPairVector::size_type size_type;
36 
37  static ActionMapper* ActionMapperFactory();
38  static void ActionMapperDestroy();
39  ~ActionMapper(){actionMapperPtr = nil;};
40  void AddAction(ActionID actionID, ClassID classID);
41  ClassID LookUpAction(ActionID actionID);
42  size_type GetNumMaps() {return action2ClassMapping.size();}
43  K2Pair<ActionID, ClassID> GetNthActionClassPair(size_type location){return action2ClassMapping[location];};
44  void ClearMap() {action2ClassMapping.clear();};
45 private:
46  K2Vector<K2Pair<ActionID, ClassID> > action2ClassMapping;
47  static ActionMapper* actionMapperPtr;
48 };
49 
50 
51 
52 
53 #endif // __ActionMapper_H__