Update ooo320-m1
[ooovba.git] / autodoc / source / display / html / hdimpl.hxx
blob2ad82db477baf6f067437799286209a082ad0548
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: hdimpl.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef ADC_DISPLAY_HDIMPL_HXX
32 #define ADC_DISPLAY_HDIMPL_HXX
34 // BASE CLASSES
35 #include <udm/html/htmlitem.hxx>
36 // USED SERVICES
37 #include "easywri.hxx"
38 #include <cosv/bstream.hxx>
39 #include <ary/ary_disp.hxx>
40 #include <ary/cpp/c_namesp.hxx>
41 #include <ary/cpp/c_ce.hxx>
42 #include "aryattrs.hxx" // For compatibility with earlier times, when those funtions were in this header.
45 namespace ary
47 namespace cpp
49 class CodeEntity;
50 class Class;
51 class DisplayGate;
52 class Function;
53 class DefineEntity;
54 class OperationSignature;
57 class QualifiedName;
59 namespace csi
61 namespace xml
63 class Element;
65 namespace html
67 class Table;
71 namespace adcdisp
73 class ParameterTable;
76 class OuputPage_Environment;
77 class Docu_Display;
79 class HtmlDisplay_Impl
81 public:
82 ~HtmlDisplay_Impl();
84 const OuputPage_Environment &
85 Env() const { return *pEnv; }
87 // ACCESS
88 OuputPage_Environment &
89 Env() { return *pEnv; }
90 EasyWriter & Easy() { return aWriteHelper; }
91 csi::xml::Element & CurOut() { return aWriteHelper.Out(); }
93 protected:
94 HtmlDisplay_Impl(
95 OuputPage_Environment &
96 io_rEnv );
97 private:
98 // DATA
99 OuputPage_Environment *
100 pEnv;
101 EasyWriter aWriteHelper;
105 namespace dshelp
108 void DisplaySlot(
109 ary::Display & o_rDisplay,
110 const ary::AryGroup &
111 i_rGroup,
112 ary::SlotAccessId i_nSlot );
115 const char * PathUp(
116 uintt i_nLevels );
117 const char * PathPerLevelsUp(
118 uintt i_nLevels,
119 const char * i_nPathBelowDestinationLevel );
121 const char * PathPerRoot(
122 const OuputPage_Environment &
123 i_rEnv,
124 const char * i_sPathFromRootDir );
125 const char * PathPerNamespace(
126 const OuputPage_Environment &
127 i_rEnv,
128 const char * i_sPathFromNamespaceDir );
130 void Create_ChildListLabel(
131 csi::xml::Element & o_rParentElement,
132 const char * i_sLabel );
133 DYN csi::html::Table &
134 Create_ChildListTable(
135 const char * i_sTitle );
137 const char * HtmlFileName(
138 const char * i_sPrefix,
139 const char * i_sEntityName );
141 inline const char *
142 ClassFileName( const char * i_sClassLocalName )
143 { return HtmlFileName( "c-", i_sClassLocalName); }
144 inline const char *
145 EnumFileName( const char * i_sEnumLocalName )
146 { return HtmlFileName( "e-", i_sEnumLocalName); }
147 inline const char *
148 TypedefFileName( const char * i_sTypedefLocalName )
149 { return HtmlFileName( "t-", i_sTypedefLocalName); }
150 inline const char *
151 FileFileName( const char * i_sFileLocalName )
152 { return HtmlFileName( "f-", i_sFileLocalName); }
154 const char * Path2Class(
155 uintt i_nLevelsUp,
156 const char * i_sClassLocalName );
158 const char * Path2Child(
159 const char * i_sFileName,
160 const char * i_sSubDir = 0 );
162 const char * Path2ChildNamespace(
163 const char * i_sLocalName );
165 String OperationLink(
166 const ary::cpp::Gate & i_gate,
167 const String & i_sOpName,
168 ary::cpp::Ce_id i_nOpId,
169 const char * i_sPrePath = "" );
170 const char * DataLink(
171 const String & i_sLocalName,
172 const char * i_sPrePath = "" );
174 inline String
175 OperationLabel( const String & i_sOpName,
176 ary::cpp::Ce_id i_nOpId,
177 const ary::cpp::Gate & i_gate )
178 { return String(OperationLink(i_gate, i_sOpName, i_nOpId) + 1); } // Skip '#' in front.
179 inline const char *
180 DataLabel( const String & i_sLocalName )
181 { return DataLink(i_sLocalName) + 1; } // Skip '#' in front.
184 void Get_LinkedTypeText(
185 csi::xml::Element & o_rOut,
186 const OuputPage_Environment &
187 i_rEnv,
188 ary::cpp::Type_id i_nId,
189 bool i_bWithAbsolutifier = true );
192 const char * Link2Ce(
193 const OuputPage_Environment &
194 i_rEnv,
195 const ary::cpp::CodeEntity &
196 i_rCe );
198 const char * Link2CppDefinition(
199 const OuputPage_Environment &
200 i_rEnv,
201 const ary::cpp::DefineEntity &
202 i_rDef );
204 const ary::cpp::CodeEntity *
205 FindUnambiguousCe(
206 const OuputPage_Environment &
207 i_rEnv,
208 const ary::QualifiedName &
209 i_rQuName,
210 const ary::cpp::Class * i_pJustDocumentedClass );
212 void ShowDocu_On(
213 csi::xml::Element & o_rOut,
214 Docu_Display & io_rDisplay,
215 const ary::cpp::CppEntity &
216 i_rRE );
218 void WriteOut_TokenList(
219 csi::xml::Element & o_rOut,
220 const StringVector & i_rTokens,
221 const char * i_sSeparator );
223 void EraseLeadingSpace(
224 String & io_rStr );
226 /** @param o_bIsConst
227 *o_bIsConst will be set to true, if o_bIsConst != 0 and function is const.
228 If the function is not const, *o_bIsConst remains unchanged!
230 @param o_bIsVirtual
231 The same as o_bIsConst.
233 void WriteOut_LinkedFunctionText(
234 csi::xml::Element & o_rTitleOut,
235 adcdisp::ParameterTable &
236 o_rParameters,
237 const ary::cpp::Function &
238 i_rFunction,
239 const OuputPage_Environment &
240 i_rEnv,
241 bool * o_bIsConst = 0,
242 bool * o_bIsVirtual = 0 );
246 } // namespace dshelp
248 using namespace dshelp;
250 #endif