InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
OTFeature.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Tommy Donovan
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 // ABSTRACT:
24 // This file defines the struct OneOTFeature, which is used to represent an
25 // OpenType feature.
26 //
27 //========================================================================================
28 
29 #ifndef __OTFEATURE__
30 #define __OTFEATURE__
31 
32 #include "K2Vector.h"
33 
35 {
36  typedef base_type data_type;
37  OneOTFeature() : fFeature(0), fChoice(0)
38  {}
39  OneOTFeature(const char *c, int32 choice) : fChoice(choice)
40  { fFeature = *((int32*)(c)); }
41 
42  void SetFeature(const char* c)
43  { fFeature = *((int32*)(c)); }
44  const char* GetFeature() const
45  { return (char *)(&fFeature); }
46 
47  void SetChoice(int32 choice)
48  { fChoice = choice; }
49  const int32 GetChoice() const
50  { return fChoice; }
51 
52  int32 fFeature;
53  int32 fChoice;
54 };
55 
56 /*
57 template<>
58 inline int32 K2Vector<OneOTFeature>::Location(const OneOTFeature& ) const
59 { ASSERT_FAIL("not supported"); return -1; }
60 */
61 
62 inline int operator==(const OneOTFeature&, const OneOTFeature&)
63 {
64  ASSERT_FAIL("not supported"); return -1;
65 }
66 
68 
69 // also in InDesignComposerDef.h as kHL_AutoOpenTypePositionalFormsFeatureTag
70 // not as a constant in a namespace because it adds the code for every obj
71 #define kOT_AutoOpenTypePositionalFormsFeatureTag (*((int32*)("_APF")))
72 
73 
74 #endif // __OTFEATURE__