Add missing license headers on *.hh files and others
[oweals/cde.git] / cde / programs / dtinfo / dtinfo / src / UAS / DtSR / Tml_TextRenderer.hh
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 libraries 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: Tml_TextRenderer.hh /main/7 1996/08/21 15:44:59 drk $
24 /*      Copyright (c) 1995,1996 FUJITSU LIMITED         */
25 /*      All Rights Reserved                             */
26
27 #ifndef _TML_TEXTRUNCOUNTER_HH_
28 #define _TML_TEXTRUNCOUNTER_HH_
29
30 #include <StyleSheet/Attribute.h>
31 #include <StyleSheet/Element.h>
32 #include <StyleSheet/Renderer.h>
33
34 #include <sstream>
35 using namespace std;
36
37 #include "dti_cc/CC_Stack.h"
38
39 #include "UAS_SearchZones.hh"
40
41 #ifndef True
42 #define True    1
43 #endif
44 #ifndef False
45 #define False   0
46 #endif
47
48 #define ShiftIn         (char)0x0E
49 #define ShiftOut        (char)0x0F
50
51 class Tml_TextRenderer : public Renderer
52 {
53   public:
54
55     Tml_TextRenderer(ostringstream &, UAS_SearchZones &);
56     ~Tml_TextRenderer();
57
58     FeatureSet * initialize();
59
60     unsigned int   BeginElement(const Element     &element,
61                                 const FeatureSet  &local,
62                                 const FeatureSet  &complete,
63                                 const FeatureSet  &parentComplete);
64
65     void        data(const char *data, unsigned int size);
66
67     void        EndElement(const Symbol &name);
68
69     void        Begin();
70     void        End();
71
72   private:
73
74     int effective_zone(UAS_SearchZones::uas_zones);
75
76     ostringstream       &f_ostr;
77     UAS_SearchZones     &f_zones;
78
79     int f_current_level;
80     Stack<int> f_marked_level;
81
82     Stack<char> f_effect;
83     Stack<int>  f_ignore_stack;
84 };
85
86 #endif