xref: /trunk/main/autodoc/source/parser_i/inc/s2_dsapi/tk_xml.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef DSAPI_TK_XML_HXX
29 #define DSAPI_TK_XML_HXX
30 
31 // USED SERVICES
32     // BASE CLASSES
33 #include <s2_dsapi/dsapitok.hxx>
34     // COMPONENTS
35     // PARAMETERS
36 #include <luxenum.hxx>
37 
38 
39 namespace csi
40 {
41 namespace dsapi
42 {
43 
44 
45 class Tok_XmlTag : public Token
46 {
47   public:
48 };
49 
50 class Tok_XmlConst : public Tok_XmlTag
51 {
52   public:
53     // TYPE
54     enum  E_TokenId
55     {
56         e_none = 0,
57         e_true = 1,
58         e_false = 2,
59         e_null = 3,
60         e_void = 4
61     };
62     typedef lux::Enum<E_TokenId> EV_TokenId;
63 
64     // Spring and Fall
65                         Tok_XmlConst(
66                             EV_TokenId          i_eTag )
67                                                 :   eTag(i_eTag) {}
68     // OPERATIONS
69     virtual void        Trigger(
70                             TokenInterpreter &  io_rInterpreter ) const;
71     // INQUIRY
72     virtual const char* Text() const;
73     E_TokenId           Id() const              { return eTag; }
74 
75   private:
76     // DATA
77     EV_TokenId          eTag;
78 };
79 
80 class Tok_XmlLink_Tag : public Tok_XmlTag
81 {
82   public:
83     // TYPE
84     enum E_TokenId
85     {
86         e_none = 0,
87         e_const = 1,
88         member = 2,
89         type = 3
90     };
91     typedef lux::Enum<E_TokenId> EV_TokenId;
92 };
93 
94 class Tok_XmlLink_BeginTag : public Tok_XmlLink_Tag
95 {
96   public:
97     // Spring and Fall
98                         Tok_XmlLink_BeginTag(
99                             EV_TokenId          i_eTag,
100                             const String  &     i_sScope,
101                             const String  &     i_sDim )
102                                                 :   eTag(i_eTag),
103                                                     sScope(i_sScope),
104                                                     sDim(i_sDim) {}
105     // OPERATIONS
106     virtual void        Trigger(
107                             TokenInterpreter &  io_rInterpreter ) const;
108     // INQUIRY
109     virtual const char* Text() const;
110     E_TokenId           Id() const              { return eTag; }
111     const String  &     Scope() const           { return sScope; }
112     const String  &     Dim() const             { return sDim; }
113 
114   private:
115     // DATA
116     EV_TokenId          eTag;
117     String              sScope;
118     String              sDim;
119 };
120 
121 class Tok_XmlLink_EndTag : public Tok_XmlLink_Tag
122 {
123   public:
124     // Spring and Fall
125                         Tok_XmlLink_EndTag(
126                             EV_TokenId          i_eTag )
127                                                 :   eTag(i_eTag) {}
128     // OPERATIONS
129     virtual void        Trigger(
130                             TokenInterpreter &  io_rInterpreter ) const;
131     // INQUIRY
132     virtual const char* Text() const;
133     E_TokenId           Id() const              { return eTag; }
134 
135   private:
136     // DATA
137     EV_TokenId          eTag;
138 };
139 
140 class Tok_XmlFormat_Tag : public Tok_XmlTag
141 {
142   public:
143     // TYPE
144     enum E_TokenId
145     {
146         e_none = 0,
147         code = 1,
148         listing = 2,
149         atom = 3
150     };
151     typedef lux::Enum<E_TokenId> EV_TokenId;
152 };
153 
154 class Tok_XmlFormat_BeginTag : public Tok_XmlFormat_Tag
155 {
156   public:
157     // Spring and Fall
158                         Tok_XmlFormat_BeginTag(
159                             EV_TokenId          i_eTag,
160                             const String  &     i_sDim )
161                                                 :   eTag(i_eTag),
162                                                     sDim(i_sDim) {}
163     // OPERATIONS
164     virtual void        Trigger(
165                             TokenInterpreter &  io_rInterpreter ) const;
166     // INQUIRY
167     virtual const char* Text() const;
168     E_TokenId           Id() const              { return eTag; }
169     const String  &     Dim() const             { return sDim; }
170 
171   private:
172     // DATA
173     EV_TokenId          eTag;
174     String              sDim;
175 };
176 
177 class Tok_XmlFormat_EndTag : public Tok_XmlFormat_Tag
178 {
179   public:
180     // Spring and Fall
181                         Tok_XmlFormat_EndTag(
182                             EV_TokenId          i_eTag )
183                                                 :   eTag(i_eTag) {}
184     // OPERATIONS
185     virtual void        Trigger(
186                             TokenInterpreter &  io_rInterpreter ) const;
187     // INQUIRY
188     virtual const char* Text() const;
189     E_TokenId           Id() const              { return eTag; }
190 
191   private:
192     // DATA
193     EV_TokenId          eTag;
194 };
195 
196 
197 }   // namespace dsapi
198 }   // namespace csi
199 
200 #endif
201 
202