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 #include <precomp.h>
23 #include <adoc/tk_docw.hxx>
24 
25 
26 // NOT FULLY DEFINED SERVICES
27 #include <adoc/tokintpr.hxx>
28 
29 
30 
31 namespace adoc {
32 
33 
34     static const char C_sSpace[300] =
35         "                                         "
36         "                                         "
37         "                                         "
38         "                                         "
39         "                                         "
40         "                                        ";
41 
42 
43 //***********************   Tok_DocWord     ******************//
44 
45 void
Trigger(TokenInterpreter & io_rInterpreter) const46 Tok_DocWord::Trigger( TokenInterpreter & io_rInterpreter ) const
47 {
48 	io_rInterpreter.Hdl_DocWord(*this);
49 }
50 
51 const char *
Text() const52 Tok_DocWord::Text() const
53 {
54 	return sText;
55 }
56 
57 //***********************   Tok_Whitespace     ******************//
58 
59 
60 void
Trigger(TokenInterpreter & io_rInterpreter) const61 Tok_Whitespace::Trigger( TokenInterpreter & io_rInterpreter ) const
62 {
63 	io_rInterpreter.Hdl_Whitespace(*this);
64 }
65 
66 const char *
Text() const67 Tok_Whitespace::Text() const
68 {
69 	return C_sSpace + 299 - nSize;
70 }
71 
72 
73 
74 //***********************   Tok_LineStart     ******************//
75 
76 
77 void
Trigger(TokenInterpreter & io_rInterpreter) const78 Tok_LineStart::Trigger( TokenInterpreter &	io_rInterpreter ) const
79 {
80 	io_rInterpreter.Hdl_LineStart(*this);
81 }
82 
83 const char *
Text() const84 Tok_LineStart::Text() const
85 {
86 	return C_sSpace + 299 - nSize;
87 }
88 
89 
90 //***********************   Tok_Eol     ******************//
91 
92 void
Trigger(TokenInterpreter & io_rInterpreter) const93 Tok_Eol::Trigger( TokenInterpreter & io_rInterpreter ) const
94 {
95 	io_rInterpreter.Hdl_Eol(*this);
96 }
97 
98 const char *
Text() const99 Tok_Eol::Text() const
100 {
101 	return "\n";
102 }
103 
104 
105 
106 //***********************   Tok_EoDocu     ******************//
107 
108 void
Trigger(TokenInterpreter & io_rInterpreter) const109 Tok_EoDocu::Trigger( TokenInterpreter & io_rInterpreter ) const
110 {
111 	io_rInterpreter.Hdl_EoDocu(*this);
112 }
113 
114 const char *
Text() const115 Tok_EoDocu::Text() const
116 {
117 	return "*/";
118 }
119 
120 }   // namespace adoc
121 
122 
123