Updated core
[LibreOffice.git] / autodoc / inc / ary / info / all_dts.hxx
blob9fcee0abd2bff3969020aa1e8a4b988c9e2fcaf5
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef ARY_INFO_ALL_DTS_HXX
21 #define ARY_INFO_ALL_DTS_HXX
25 // USED SERVICES
26 // BASE CLASSES
27 // COMPONENTS
28 // PARAMETERS
31 namespace ary
33 namespace info
36 class DocuDisplay;
38 class DocuToken
40 public:
41 virtual ~DocuToken() {}
43 void StoreAt(
44 DocuDisplay & o_rDisplay ) const;
45 bool IsWhite() const;
47 private:
48 virtual void do_StoreAt(
49 DocuDisplay & o_rDisplay ) const = 0;
50 virtual bool inq_IsWhite() const = 0;
53 class DT_Text : public DocuToken
55 public:
56 DT_Text(
57 const char * i_sText )
58 : sText( i_sText ) {}
60 const String & Text() const { return sText; }
62 private:
63 virtual void do_StoreAt(
64 DocuDisplay & o_rDisplay ) const;
65 virtual bool inq_IsWhite() const;
67 String sText;
70 class DT_MaybeLink : public DocuToken
72 public:
73 DT_MaybeLink(
74 const char * i_sText,
75 bool i_bIsGlobal,
76 bool i_bIsFunction )
77 : sText( i_sText ),
78 bIsGlobal(i_bIsGlobal),
79 bIsFunction(i_bIsFunction) { }
81 const String & Text() const { return sText; }
82 bool IsAbsolute() const { return bIsGlobal; }
83 bool IsFunction() const { return bIsFunction; }
85 private:
86 virtual void do_StoreAt(
87 DocuDisplay & o_rDisplay ) const;
88 virtual bool inq_IsWhite() const;
90 String sText;
91 bool bIsGlobal;
92 bool bIsFunction;
95 class DT_Whitespace : public DocuToken
97 public:
98 DT_Whitespace(
99 UINT8 i_nLength )
100 : nLength( i_nLength ) {}
101 UINT8 Length() const { return nLength; }
103 private:
104 virtual void do_StoreAt(
105 DocuDisplay & o_rDisplay ) const;
106 virtual bool inq_IsWhite() const;
108 UINT8 nLength;
112 class DT_Eol : public DocuToken
114 virtual void do_StoreAt(
115 DocuDisplay & o_rDisplay ) const;
116 virtual bool inq_IsWhite() const;
119 class DT_Xml : public DocuToken
121 public:
122 DT_Xml(
123 const char * i_sText )
124 : sText( i_sText ) {}
126 const String & Text() const { return sText; }
128 private:
129 virtual void do_StoreAt(
130 DocuDisplay & o_rDisplay ) const;
131 virtual bool inq_IsWhite() const;
133 String sText;
137 // IMPLEMENTATION
139 inline void
140 DocuToken::StoreAt( DocuDisplay & o_rDisplay ) const
141 { do_StoreAt(o_rDisplay); }
142 inline bool
143 DocuToken::IsWhite() const
144 { return inq_IsWhite(); }
151 #endif
153 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */