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