Link with C++ linker
[oweals/cde.git] / cde / programs / nsgmls / Recognizer.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: Recognizer.h /main/1 1996/07/29 17:02:44 cde-hp $ */
24 // Copyright (c) 1994 James Clark
25 // See the file COPYING for copying permission.
26
27 #ifndef Recognizer_INCLUDED
28 #define Recognizer_INCLUDED 1
29 #ifdef __GNUG__
30 #pragma interface
31 #endif
32
33 #include "Resource.h"
34 #include "Owner.h"
35 #include "XcharMap.h"
36 #include "types.h"
37 #include "Vector.h"
38
39 #ifdef SP_NAMESPACE
40 namespace SP_NAMESPACE {
41 #endif
42
43 class Messenger;
44 class InputSource;
45 class Trie;
46
47 class Recognizer : public Resource {
48 public:
49   Recognizer(Trie *, const XcharMap<EquivCode> &);
50   Recognizer(Trie *, const XcharMap<EquivCode> &, Vector<Token> &);
51   Token recognize(InputSource *, Messenger &) const;
52 private:
53   Recognizer(const Recognizer &); // undefined
54   void operator=(const Recognizer &); // undefined
55   Boolean multicode_;
56   Owner<Trie> trie_;
57   XcharMap<EquivCode> map_;
58   Vector<Token> suppressTokens_;
59 };
60
61 #ifdef SP_NAMESPACE
62 }
63 #endif
64
65 #endif /* not Recognizer_INCLUDED */