InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IThesaurusService.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: hhorton
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 __IThesaurusService__
25 #define __IThesaurusService__
26 
27 #include "IPMUnknown.h"
28 #include "K2Vector.h"
29 #include "LinguisticID.h"
30 
31 //----------------------------------------------------------------------------------------
32 // Interface IThesaurusService
33 //----------------------------------------------------------------------------------------
34 
35 class WideString;
37 
45 {
46  typedef object_type data_type;
47 
48  inline bool16 operator==( const ThesDefinition& rData ) const;
49 
50  WideString fDefinitionStr;
59 };
60 
63 
65 inline bool16 ThesDefinition::operator==( const ThesDefinition& rData ) const
66 {
67  return fDefinitionStr == rData.fDefinitionStr &&
69  fInflectionStr == rData.fInflectionStr &&
70  fSynonyms == rData.fSynonyms &&
71  fComparedWords == rData.fComparedWords &&
72  fRelatedWords == rData.fRelatedWords &&
74  fAntonyms == rData.fAntonyms;
75 }
76 
78 struct ThesRecord
79 {
80  WideString fLookupStr;
82 };
83 
88 {
89 public:
90  enum {kDefaultIID = IID_ITHESAURUSSERVICE};
91 
93  enum ThesResult {kSuccess, kFailure, kThesError};
94 
96  enum ThesWordListEnum {kSynonyms, kAntonyms, kComparedWords, kRelatedWords, kContrastingWords };
97 
105  virtual bool16 GetThesRecord(const PMString &rWord, ThesRecord& thesRecord) = 0;
106 
114  virtual bool16 GetSynonyms(const PMString &rWord, WideStringList& wList) = 0;
115 
123  virtual bool16 GetAntonyms(const PMString &rWord, WideStringList& wList) = 0;
124 
132  virtual bool16 GetNearSynonyms(const PMString &rWord, WideStringList& wList) = 0;
133 
141  virtual bool16 GetNearAntonyms(const PMString &rWord, WideStringList& wList) = 0;
142 
150  virtual bool16 GetSeeAlsoWords(const PMString &rWord, WideStringList& wList) = 0;
151 
160  virtual bool16 GetAltSuggestions(const PMString &rWord, WideStringList& wList) = 0;
161 
168  virtual bool16 Set(const PMString &rThesFileName) = 0;
169 };
170 
171 #endif