7fd59977 |
1 | -- File: Units_UnitsLexicon.cdl |
2 | -- Created: Fri Oct 8 10:34:10 1993 |
3 | -- Author: Gilles DEBARBOUILLE |
4 | -- <gde@meteox> |
5 | ---Copyright: Matra Datavision 1993 |
6 | |
7 | |
8 | private class UnitsLexicon from Units |
9 | |
10 | inherits |
11 | |
12 | Lexicon from Units |
13 | ---Purpose: This class defines a lexicon useful to analyse and |
14 | -- recognize the different key words included in a |
15 | -- sentence. The lexicon is stored in a sequence of |
16 | -- tokens. |
17 | |
18 | uses |
19 | |
20 | HAsciiString from TCollection, |
21 | AsciiString from TCollection |
22 | |
23 | |
24 | is |
25 | |
26 | Create returns mutable UnitsLexicon from Units; |
27 | |
28 | ---Level: Internal |
29 | |
30 | ---Purpose: Returns an empty instance of UnitsLexicon |
31 | |
32 | Creates(me : mutable ; afilename1 , afilename2 : CString ; |
33 | amode : Boolean = Standard_True) |
34 | |
35 | ---Level: Internal |
36 | |
37 | ---Purpose: Reads the files <afilename1> and <afilename2> to |
38 | -- create a sequence of tokens stored in |
39 | -- <thesequenceoftokens>. |
40 | |
41 | is static; |
42 | |
43 | FileName2(me) returns AsciiString from TCollection |
44 | |
45 | ---Level: Internal |
46 | |
47 | ---Purpose: Returns in a AsciiString from TCollection the name of the file. |
48 | |
49 | is static; |
50 | |
51 | UpToDate(me) returns Boolean |
52 | |
53 | ---Level: Internal |
54 | |
55 | ---Purpose: Returns true if the file has not changed since the |
56 | -- creation of the Lexicon object. Returns false |
57 | -- otherwise. |
58 | |
59 | is redefined; |
60 | |
61 | Dump(me) |
62 | |
63 | ---Level: Internal |
64 | |
65 | ---C++: inline |
66 | ---Purpose: Useful for debugging. |
67 | |
68 | is redefined; |
69 | |
70 | fields |
71 | |
72 | thefilename : HAsciiString from TCollection; |
73 | thetime : Integer; |
74 | |
75 | end UnitsLexicon; |