1*1c78a5d6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*1c78a5d6SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*1c78a5d6SAndrew Rist * or more contributor license agreements. See the NOTICE file
5*1c78a5d6SAndrew Rist * distributed with this work for additional information
6*1c78a5d6SAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*1c78a5d6SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*1c78a5d6SAndrew Rist * "License"); you may not use this file except in compliance
9*1c78a5d6SAndrew Rist * with the License. You may obtain a copy of the License at
10*1c78a5d6SAndrew Rist *
11*1c78a5d6SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12*1c78a5d6SAndrew Rist *
13*1c78a5d6SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*1c78a5d6SAndrew Rist * software distributed under the License is distributed on an
15*1c78a5d6SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*1c78a5d6SAndrew Rist * KIND, either express or implied. See the License for the
17*1c78a5d6SAndrew Rist * specific language governing permissions and limitations
18*1c78a5d6SAndrew Rist * under the License.
19*1c78a5d6SAndrew Rist *
20*1c78a5d6SAndrew Rist *************************************************************/
21*1c78a5d6SAndrew Rist
22*1c78a5d6SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir #ifndef ARY_INFO_ALL_DTS_HXX
25cdf0e10cSrcweir #define ARY_INFO_ALL_DTS_HXX
26cdf0e10cSrcweir
27cdf0e10cSrcweir
28cdf0e10cSrcweir
29cdf0e10cSrcweir // USED SERVICES
30cdf0e10cSrcweir // BASE CLASSES
31cdf0e10cSrcweir // COMPONENTS
32cdf0e10cSrcweir // PARAMETERS
33cdf0e10cSrcweir
34cdf0e10cSrcweir
35cdf0e10cSrcweir namespace ary
36cdf0e10cSrcweir {
37cdf0e10cSrcweir namespace info
38cdf0e10cSrcweir {
39cdf0e10cSrcweir
40cdf0e10cSrcweir class DocuDisplay;
41cdf0e10cSrcweir
42cdf0e10cSrcweir class DocuToken
43cdf0e10cSrcweir {
44cdf0e10cSrcweir public:
~DocuToken()45cdf0e10cSrcweir virtual ~DocuToken() {}
46cdf0e10cSrcweir
47cdf0e10cSrcweir void StoreAt(
48cdf0e10cSrcweir DocuDisplay & o_rDisplay ) const;
49cdf0e10cSrcweir bool IsWhite() const;
50cdf0e10cSrcweir
51cdf0e10cSrcweir private:
52cdf0e10cSrcweir virtual void do_StoreAt(
53cdf0e10cSrcweir DocuDisplay & o_rDisplay ) const = 0;
54cdf0e10cSrcweir virtual bool inq_IsWhite() const = 0;
55cdf0e10cSrcweir };
56cdf0e10cSrcweir
57cdf0e10cSrcweir class DT_Text : public DocuToken
58cdf0e10cSrcweir {
59cdf0e10cSrcweir public:
DT_Text(const char * i_sText)60cdf0e10cSrcweir DT_Text(
61cdf0e10cSrcweir const char * i_sText )
62cdf0e10cSrcweir : sText( i_sText ) {}
63cdf0e10cSrcweir
Text() const64cdf0e10cSrcweir const String & Text() const { return sText; }
65cdf0e10cSrcweir
66cdf0e10cSrcweir private:
67cdf0e10cSrcweir virtual void do_StoreAt(
68cdf0e10cSrcweir DocuDisplay & o_rDisplay ) const;
69cdf0e10cSrcweir virtual bool inq_IsWhite() const;
70cdf0e10cSrcweir
71cdf0e10cSrcweir String sText;
72cdf0e10cSrcweir };
73cdf0e10cSrcweir
74cdf0e10cSrcweir class DT_MaybeLink : public DocuToken
75cdf0e10cSrcweir {
76cdf0e10cSrcweir public:
DT_MaybeLink(const char * i_sText,bool i_bIsGlobal,bool i_bIsFunction)77cdf0e10cSrcweir DT_MaybeLink(
78cdf0e10cSrcweir const char * i_sText,
79cdf0e10cSrcweir bool i_bIsGlobal,
80cdf0e10cSrcweir bool i_bIsFunction )
81cdf0e10cSrcweir : sText( i_sText ),
82cdf0e10cSrcweir bIsGlobal(i_bIsGlobal),
83cdf0e10cSrcweir bIsFunction(i_bIsFunction) { }
84cdf0e10cSrcweir
Text() const85cdf0e10cSrcweir const String & Text() const { return sText; }
IsAbsolute() const86cdf0e10cSrcweir bool IsAbsolute() const { return bIsGlobal; }
IsFunction() const87cdf0e10cSrcweir bool IsFunction() const { return bIsFunction; }
88cdf0e10cSrcweir
89cdf0e10cSrcweir private:
90cdf0e10cSrcweir virtual void do_StoreAt(
91cdf0e10cSrcweir DocuDisplay & o_rDisplay ) const;
92cdf0e10cSrcweir virtual bool inq_IsWhite() const;
93cdf0e10cSrcweir
94cdf0e10cSrcweir String sText;
95cdf0e10cSrcweir bool bIsGlobal;
96cdf0e10cSrcweir bool bIsFunction;
97cdf0e10cSrcweir };
98cdf0e10cSrcweir
99cdf0e10cSrcweir class DT_Whitespace : public DocuToken
100cdf0e10cSrcweir {
101cdf0e10cSrcweir public:
DT_Whitespace(UINT8 i_nLength)102cdf0e10cSrcweir DT_Whitespace(
103cdf0e10cSrcweir UINT8 i_nLength )
104cdf0e10cSrcweir : nLength( i_nLength ) {}
Length() const105cdf0e10cSrcweir UINT8 Length() const { return nLength; }
106cdf0e10cSrcweir
107cdf0e10cSrcweir private:
108cdf0e10cSrcweir virtual void do_StoreAt(
109cdf0e10cSrcweir DocuDisplay & o_rDisplay ) const;
110cdf0e10cSrcweir virtual bool inq_IsWhite() const;
111cdf0e10cSrcweir
112cdf0e10cSrcweir UINT8 nLength;
113cdf0e10cSrcweir };
114cdf0e10cSrcweir
115cdf0e10cSrcweir
116cdf0e10cSrcweir class DT_Eol : public DocuToken
117cdf0e10cSrcweir {
118cdf0e10cSrcweir virtual void do_StoreAt(
119cdf0e10cSrcweir DocuDisplay & o_rDisplay ) const;
120cdf0e10cSrcweir virtual bool inq_IsWhite() const;
121cdf0e10cSrcweir };
122cdf0e10cSrcweir
123cdf0e10cSrcweir class DT_Xml : public DocuToken
124cdf0e10cSrcweir {
125cdf0e10cSrcweir public:
DT_Xml(const char * i_sText)126cdf0e10cSrcweir DT_Xml(
127cdf0e10cSrcweir const char * i_sText )
128cdf0e10cSrcweir : sText( i_sText ) {}
129cdf0e10cSrcweir
Text() const130cdf0e10cSrcweir const String & Text() const { return sText; }
131cdf0e10cSrcweir
132cdf0e10cSrcweir private:
133cdf0e10cSrcweir virtual void do_StoreAt(
134cdf0e10cSrcweir DocuDisplay & o_rDisplay ) const;
135cdf0e10cSrcweir virtual bool inq_IsWhite() const;
136cdf0e10cSrcweir
137cdf0e10cSrcweir String sText;
138cdf0e10cSrcweir };
139cdf0e10cSrcweir
140cdf0e10cSrcweir
141cdf0e10cSrcweir // IMPLEMENTATION
142cdf0e10cSrcweir
143cdf0e10cSrcweir inline void
StoreAt(DocuDisplay & o_rDisplay) const144cdf0e10cSrcweir DocuToken::StoreAt( DocuDisplay & o_rDisplay ) const
145cdf0e10cSrcweir { do_StoreAt(o_rDisplay); }
146cdf0e10cSrcweir inline bool
IsWhite() const147cdf0e10cSrcweir DocuToken::IsWhite() const
148cdf0e10cSrcweir { return inq_IsWhite(); }
149cdf0e10cSrcweir
150cdf0e10cSrcweir
151cdf0e10cSrcweir
152cdf0e10cSrcweir }
153cdf0e10cSrcweir }
154cdf0e10cSrcweir
155cdf0e10cSrcweir #endif
156cdf0e10cSrcweir
157