Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef DSAPI_TK_XML_HXX
21 : #define DSAPI_TK_XML_HXX
22 :
23 : // USED SERVICES
24 : // BASE CLASSES
25 : #include <s2_dsapi/dsapitok.hxx>
26 : // COMPONENTS
27 : // PARAMETERS
28 : #include <luxenum.hxx>
29 :
30 :
31 : namespace csi
32 : {
33 : namespace dsapi
34 : {
35 :
36 :
37 48546 : class Tok_XmlTag : public Token
38 : {
39 : public:
40 : };
41 :
42 3710 : class Tok_XmlConst : public Tok_XmlTag
43 : {
44 : public:
45 : // TYPE
46 : enum E_TokenId
47 : {
48 : e_none = 0,
49 : e_true = 1,
50 : e_false = 2,
51 : e_null = 3,
52 : e_void = 4
53 : };
54 : typedef lux::Enum<E_TokenId> EV_TokenId;
55 :
56 : // Spring and Fall
57 1855 : Tok_XmlConst(
58 : EV_TokenId i_eTag )
59 1855 : : eTag(i_eTag) {}
60 : // OPERATIONS
61 : virtual void Trigger(
62 : TokenInterpreter & io_rInterpreter ) const;
63 : // INQUIRY
64 : virtual const char* Text() const;
65 : E_TokenId Id() const { return eTag; }
66 :
67 : private:
68 : // DATA
69 : EV_TokenId eTag;
70 : };
71 :
72 38262 : class Tok_XmlLink_Tag : public Tok_XmlTag
73 : {
74 : public:
75 : // TYPE
76 : enum E_TokenId
77 : {
78 : e_none = 0,
79 : e_const = 1,
80 : member = 2,
81 : type = 3
82 : };
83 : typedef lux::Enum<E_TokenId> EV_TokenId;
84 : };
85 :
86 19140 : class Tok_XmlLink_BeginTag : public Tok_XmlLink_Tag
87 : {
88 : public:
89 : // Spring and Fall
90 9570 : Tok_XmlLink_BeginTag(
91 : EV_TokenId i_eTag,
92 : const String & i_sScope,
93 : const String & i_sDim )
94 : : eTag(i_eTag),
95 : sScope(i_sScope),
96 9570 : sDim(i_sDim) {}
97 : // OPERATIONS
98 : virtual void Trigger(
99 : TokenInterpreter & io_rInterpreter ) const;
100 : // INQUIRY
101 : virtual const char* Text() const;
102 9570 : E_TokenId Id() const { return eTag; }
103 8696 : const String & Scope() const { return sScope; }
104 9574 : const String & Dim() const { return sDim; }
105 :
106 : private:
107 : // DATA
108 : EV_TokenId eTag;
109 : String sScope;
110 : String sDim;
111 : };
112 :
113 19122 : class Tok_XmlLink_EndTag : public Tok_XmlLink_Tag
114 : {
115 : public:
116 : // Spring and Fall
117 9561 : Tok_XmlLink_EndTag(
118 : EV_TokenId i_eTag )
119 9561 : : eTag(i_eTag) {}
120 : // OPERATIONS
121 : virtual void Trigger(
122 : TokenInterpreter & io_rInterpreter ) const;
123 : // INQUIRY
124 : virtual const char* Text() const;
125 9561 : E_TokenId Id() const { return eTag; }
126 :
127 : private:
128 : // DATA
129 : EV_TokenId eTag;
130 : };
131 :
132 6574 : class Tok_XmlFormat_Tag : public Tok_XmlTag
133 : {
134 : public:
135 : // TYPE
136 : enum E_TokenId
137 : {
138 : e_none = 0,
139 : code = 1,
140 : listing = 2,
141 : atom = 3
142 : };
143 : typedef lux::Enum<E_TokenId> EV_TokenId;
144 : };
145 :
146 3296 : class Tok_XmlFormat_BeginTag : public Tok_XmlFormat_Tag
147 : {
148 : public:
149 : // Spring and Fall
150 1648 : Tok_XmlFormat_BeginTag(
151 : EV_TokenId i_eTag,
152 : const String & i_sDim )
153 : : eTag(i_eTag),
154 1648 : sDim(i_sDim) {}
155 : // OPERATIONS
156 : virtual void Trigger(
157 : TokenInterpreter & io_rInterpreter ) const;
158 : // INQUIRY
159 : virtual const char* Text() const;
160 1648 : E_TokenId Id() const { return eTag; }
161 1660 : const String & Dim() const { return sDim; }
162 :
163 : private:
164 : // DATA
165 : EV_TokenId eTag;
166 : String sDim;
167 : };
168 :
169 3278 : class Tok_XmlFormat_EndTag : public Tok_XmlFormat_Tag
170 : {
171 : public:
172 : // Spring and Fall
173 1639 : Tok_XmlFormat_EndTag(
174 : EV_TokenId i_eTag )
175 1639 : : eTag(i_eTag) {}
176 : // OPERATIONS
177 : virtual void Trigger(
178 : TokenInterpreter & io_rInterpreter ) const;
179 : // INQUIRY
180 : virtual const char* Text() const;
181 1639 : E_TokenId Id() const { return eTag; }
182 :
183 : private:
184 : // DATA
185 : EV_TokenId eTag;
186 : };
187 :
188 :
189 : } // namespace dsapi
190 : } // namespace csi
191 :
192 : #endif
193 :
194 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|