blob: 647de6858b0ffce803aa501dc9d29afe26236240 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
/***************************************************************************
manage usage labels
-----------------------------------------------------------------------
begin : Sun Dec 19 11:26:53 MET 1999
copyright : (C) 1999-2001 Ewald Arnold
(C) 2001 The KDE-EDU team
email : kvoctrain@ewald-arnold.de
-----------------------------------------------------------------------
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef UsageManager_included
#define UsageManager_included
#include <vector>
using namespace std;
#include "kvoctraindoc.h"
class kvoctrainDoc;
class KConfig;
class kvoctrainExpr;
// internal usage labels, never change !
#define UL_AM "Am"
#define UL_ABBR "abbr"
#define UL_ANAT "anat"
#define UL_ASTR "astr"
#define UL_BIOL "biol"
#define UL_BS "bs"
#define UL_CONTP "contp"
#define UL_ECCL "eccl"
#define UL_FIG "fig"
#define UL_GEOL "geol"
#define UL_HIST "hist"
#define UL_ICHT "icht"
#define UL_IFML "ifm"
#define UL_IRONIC "iro"
#define UL_IRR "irr"
#define UL_LIT "lit"
#define UL_META "metal"
#define UL_METEO "meteo"
#define UL_MIN "miner"
#define UL_MOT "mot"
#define UL_MOUNT "mount"
#define UL_MYT "myth"
#define UL_NPR "npr"
#define UL_OPT "opt"
#define UL_ORN "orn"
#define UL_OS "os"
#define UL_P "p"
#define UL_PARL "parl"
#define UL_PHARM "pharm"
#define UL_PHLS "phls"
#define UL_PHOT "phot"
#define UL_PHYS "phys"
#define UL_PHYSIOL "physio"
#define UL_PL "pl"
#define UL_POET "poet"
#define UL_POL "pol"
#define UL_PROV "prov"
#define UL_PSYCH "psych"
#define UL_RHET "rhet"
#define UL_SURV "surv"
#define UL_TEL "telg"
#define UL_TELEPH "telph"
#define UL_THEA "thea"
#define UL_TYP "typo"
#define UL_UNIV "univ"
#define UL_VET "vet"
#define UL_ZO "zoo"
// usage delimiters
#define UL_USER_USAGE "#" // designates number of user type
#define UL_USAGE_DIV ":" // divide different labels
struct UsageRelation
{
public:
UsageRelation (const TQString & id, const TQString & shorty, const TQString & longy)
:ident(id), shortId(shorty), longId(longy) {}
TQString identStr() const { return ident; }
TQString shortStr() const { return shortId; }
TQString longStr() const { return longId; }
protected:
TQString ident,
shortId,
longId;
};
class UsageManager
{
public:
UsageManager ();
static bool contains (const TQString& label, const TQString& collection);
static vector<UsageRelation> getRelation ();
static void setUsageNames (vector<TQString> names);
protected:
private:
static vector<TQString> userUsages;
};
#endif // UsageManager_included
|