Bump for 3.6-28
[LibreOffice.git] / autodoc / inc / ary / info / all_dts.hxx
blob2508248f860f450341c8838b74ce4b65c30f7feb
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef ARY_INFO_ALL_DTS_HXX
30 #define ARY_INFO_ALL_DTS_HXX
34 // USED SERVICES
35 // BASE CLASSES
36 // COMPONENTS
37 // PARAMETERS
40 namespace ary
42 namespace info
45 class DocuDisplay;
47 class DocuToken
49 public:
50 virtual ~DocuToken() {}
52 void StoreAt(
53 DocuDisplay & o_rDisplay ) const;
54 bool IsWhite() const;
56 private:
57 virtual void do_StoreAt(
58 DocuDisplay & o_rDisplay ) const = 0;
59 virtual bool inq_IsWhite() const = 0;
62 class DT_Text : public DocuToken
64 public:
65 DT_Text(
66 const char * i_sText )
67 : sText( i_sText ) {}
69 const String & Text() const { return sText; }
71 private:
72 virtual void do_StoreAt(
73 DocuDisplay & o_rDisplay ) const;
74 virtual bool inq_IsWhite() const;
76 String sText;
79 class DT_MaybeLink : public DocuToken
81 public:
82 DT_MaybeLink(
83 const char * i_sText,
84 bool i_bIsGlobal,
85 bool i_bIsFunction )
86 : sText( i_sText ),
87 bIsGlobal(i_bIsGlobal),
88 bIsFunction(i_bIsFunction) { }
90 const String & Text() const { return sText; }
91 bool IsAbsolute() const { return bIsGlobal; }
92 bool IsFunction() const { return bIsFunction; }
94 private:
95 virtual void do_StoreAt(
96 DocuDisplay & o_rDisplay ) const;
97 virtual bool inq_IsWhite() const;
99 String sText;
100 bool bIsGlobal;
101 bool bIsFunction;
104 class DT_Whitespace : public DocuToken
106 public:
107 DT_Whitespace(
108 UINT8 i_nLength )
109 : nLength( i_nLength ) {}
110 UINT8 Length() const { return nLength; }
112 private:
113 virtual void do_StoreAt(
114 DocuDisplay & o_rDisplay ) const;
115 virtual bool inq_IsWhite() const;
117 UINT8 nLength;
121 class DT_Eol : public DocuToken
123 virtual void do_StoreAt(
124 DocuDisplay & o_rDisplay ) const;
125 virtual bool inq_IsWhite() const;
128 class DT_Xml : public DocuToken
130 public:
131 DT_Xml(
132 const char * i_sText )
133 : sText( i_sText ) {}
135 const String & Text() const { return sText; }
137 private:
138 virtual void do_StoreAt(
139 DocuDisplay & o_rDisplay ) const;
140 virtual bool inq_IsWhite() const;
142 String sText;
146 // IMPLEMENTATION
148 inline void
149 DocuToken::StoreAt( DocuDisplay & o_rDisplay ) const
150 { do_StoreAt(o_rDisplay); }
151 inline bool
152 DocuToken::IsWhite() const
153 { return inq_IsWhite(); }
160 #endif
162 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */