xref: /trunk/main/autodoc/source/parser/inc/adoc/tk_docw.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 ADC_ADOC_TK_DOCW_HXX
29 #define ADC_ADOC_TK_DOCW_HXX
30 
31 // USED SERVICES
32     // BASE CLASSES
33 #include <adoc/adoc_tok.hxx>
34     // COMPONENTS
35     // PARAMETERS
36 
37 namespace adoc {
38 
39 
40 class Tok_DocWord : public Token
41 {
42   public:
43     // Spring and Fall
44                         Tok_DocWord(
45                             const char *        i_sText )
46                                                 :   sText(i_sText) {}
47     // OPERATIONS
48     virtual void        Trigger(
49                             TokenInterpreter &  io_rInterpreter ) const;
50     // INQUIRY
51     virtual const char* Text() const;
52     uintt               Length() const          { return sText.length(); }
53 
54   private:
55     // DATA
56     String              sText;
57 };
58 
59 class Tok_Whitespace : public Token
60 {
61   public:
62     // Spring and Fall
63                         Tok_Whitespace(
64                             UINT8               i_nSize )
65                                                 :   nSize(i_nSize) {}
66     // OPERATIONS
67     virtual void        Trigger(
68                             TokenInterpreter &  io_rInterpreter ) const;
69     // INQUIRY
70     virtual const char* Text() const;
71     UINT8               Size() const            { return nSize; }
72 
73   private:
74     // DATA
75     UINT8               nSize;
76 };
77 
78 class Tok_LineStart : public Token
79 {
80   public:
81     // Spring and Fall
82                         Tok_LineStart(
83                             UINT8               i_nSize )
84                                                 :   nSize(i_nSize) {}
85     // OPERATIONS
86     virtual void        Trigger(
87                             TokenInterpreter &  io_rInterpreter ) const;
88     // INQUIRY
89     virtual const char* Text() const;
90     UINT8               Size() const            { return nSize; }
91 
92   private:
93     // DATA
94     UINT8               nSize;
95 };
96 
97 class Tok_Eol : public Token
98 { public:
99     virtual void        Trigger(
100                             TokenInterpreter &  io_rInterpreter ) const;
101     virtual const char *
102                         Text() const;
103 };
104 
105 class Tok_EoDocu : public Token
106 { public:
107     virtual void        Trigger(
108                             TokenInterpreter &  io_rInterpreter ) const;
109     virtual const char *
110                         Text() const;
111 };
112 
113 
114 }   // namespace adoc
115 
116 #endif
117 
118