1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef ADC_ADOC_TK_DOCW_HXX
25 #define ADC_ADOC_TK_DOCW_HXX
26 
27 // USED SERVICES
28 	// BASE CLASSES
29 #include <adoc/adoc_tok.hxx>
30 	// COMPONENTS
31 	// PARAMETERS
32 
33 namespace adoc {
34 
35 
36 class Tok_DocWord : public Token
37 {
38   public:
39 	// Spring and Fall
Tok_DocWord(const char * i_sText)40 						Tok_DocWord(
41 							const char *		i_sText )
42 												:	sText(i_sText) {}
43 	// OPERATIONS
44 	virtual void		Trigger(
45 							TokenInterpreter &	io_rInterpreter ) const;
46 	// INQUIRY
47 	virtual const char*	Text() const;
Length() const48 	uintt               Length() const          { return sText.length(); }
49 
50   private:
51 	// DATA
52 	String 				sText;
53 };
54 
55 class Tok_Whitespace : public Token
56 {
57   public:
58 	// Spring and Fall
Tok_Whitespace(UINT8 i_nSize)59 						Tok_Whitespace(
60 							UINT8				i_nSize )
61 												:	nSize(i_nSize) {}
62 	// OPERATIONS
63 	virtual void		Trigger(
64 							TokenInterpreter &	io_rInterpreter ) const;
65 	// INQUIRY
66 	virtual const char*	Text() const;
Size() const67 	UINT8				Size() const			{ return nSize; }
68 
69   private:
70 	// DATA
71 	UINT8				nSize;
72 };
73 
74 class Tok_LineStart : public Token
75 {
76   public:
77 	// Spring and Fall
Tok_LineStart(UINT8 i_nSize)78 						Tok_LineStart(
79 							UINT8				i_nSize )
80 												:	nSize(i_nSize) {}
81 	// OPERATIONS
82 	virtual void		Trigger(
83 							TokenInterpreter &	io_rInterpreter ) const;
84 	// INQUIRY
85 	virtual const char*	Text() const;
Size() const86 	UINT8				Size() const			{ return nSize; }
87 
88   private:
89 	// DATA
90 	UINT8				nSize;
91 };
92 
93 class Tok_Eol : public Token
94 { public:
95 	virtual void		Trigger(
96 							TokenInterpreter &	io_rInterpreter ) const;
97 	virtual const char *
98 						Text() const;
99 };
100 
101 class Tok_EoDocu : public Token
102 { public:
103 	virtual void		Trigger(
104 							TokenInterpreter &	io_rInterpreter ) const;
105 	virtual const char *
106 						Text() const;
107 };
108 
109 
110 }   // namespace adoc
111 
112 #endif
113 
114