1*1c78a5d6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*1c78a5d6SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*1c78a5d6SAndrew Rist * or more contributor license agreements. See the NOTICE file
5*1c78a5d6SAndrew Rist * distributed with this work for additional information
6*1c78a5d6SAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*1c78a5d6SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*1c78a5d6SAndrew Rist * "License"); you may not use this file except in compliance
9*1c78a5d6SAndrew Rist * with the License. You may obtain a copy of the License at
10*1c78a5d6SAndrew Rist *
11*1c78a5d6SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12*1c78a5d6SAndrew Rist *
13*1c78a5d6SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*1c78a5d6SAndrew Rist * software distributed under the License is distributed on an
15*1c78a5d6SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*1c78a5d6SAndrew Rist * KIND, either express or implied. See the License for the
17*1c78a5d6SAndrew Rist * specific language governing permissions and limitations
18*1c78a5d6SAndrew Rist * under the License.
19*1c78a5d6SAndrew Rist *
20*1c78a5d6SAndrew Rist *************************************************************/
21*1c78a5d6SAndrew Rist
22*1c78a5d6SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir #ifndef ADC_DISPLAY_HDIMPL_HXX
25cdf0e10cSrcweir #define ADC_DISPLAY_HDIMPL_HXX
26cdf0e10cSrcweir
27cdf0e10cSrcweir // BASE CLASSES
28cdf0e10cSrcweir #include <udm/html/htmlitem.hxx>
29cdf0e10cSrcweir // USED SERVICES
30cdf0e10cSrcweir #include "easywri.hxx"
31cdf0e10cSrcweir #include <cosv/bstream.hxx>
32cdf0e10cSrcweir #include <ary/ary_disp.hxx>
33cdf0e10cSrcweir #include <ary/cpp/c_namesp.hxx>
34cdf0e10cSrcweir #include <ary/cpp/c_ce.hxx>
35cdf0e10cSrcweir #include "aryattrs.hxx" // For compatibility with earlier times, when those funtions were in this header.
36cdf0e10cSrcweir
37cdf0e10cSrcweir
38cdf0e10cSrcweir namespace ary
39cdf0e10cSrcweir {
40cdf0e10cSrcweir namespace cpp
41cdf0e10cSrcweir {
42cdf0e10cSrcweir class CodeEntity;
43cdf0e10cSrcweir class Class;
44cdf0e10cSrcweir class DisplayGate;
45cdf0e10cSrcweir class Function;
46cdf0e10cSrcweir class DefineEntity;
47cdf0e10cSrcweir class OperationSignature;
48cdf0e10cSrcweir }
49cdf0e10cSrcweir
50cdf0e10cSrcweir class QualifiedName;
51cdf0e10cSrcweir }
52cdf0e10cSrcweir namespace csi
53cdf0e10cSrcweir {
54cdf0e10cSrcweir namespace xml
55cdf0e10cSrcweir {
56cdf0e10cSrcweir class Element;
57cdf0e10cSrcweir }
58cdf0e10cSrcweir namespace html
59cdf0e10cSrcweir {
60cdf0e10cSrcweir class Table;
61cdf0e10cSrcweir }
62cdf0e10cSrcweir }
63cdf0e10cSrcweir
64cdf0e10cSrcweir namespace adcdisp
65cdf0e10cSrcweir {
66cdf0e10cSrcweir class ParameterTable;
67cdf0e10cSrcweir }
68cdf0e10cSrcweir
69cdf0e10cSrcweir class OuputPage_Environment;
70cdf0e10cSrcweir class Docu_Display;
71cdf0e10cSrcweir
72cdf0e10cSrcweir class HtmlDisplay_Impl
73cdf0e10cSrcweir {
74cdf0e10cSrcweir public:
75cdf0e10cSrcweir ~HtmlDisplay_Impl();
76cdf0e10cSrcweir
77cdf0e10cSrcweir const OuputPage_Environment &
Env() const78cdf0e10cSrcweir Env() const { return *pEnv; }
79cdf0e10cSrcweir
80cdf0e10cSrcweir // ACCESS
81cdf0e10cSrcweir OuputPage_Environment &
Env()82cdf0e10cSrcweir Env() { return *pEnv; }
Easy()83cdf0e10cSrcweir EasyWriter & Easy() { return aWriteHelper; }
CurOut()84cdf0e10cSrcweir csi::xml::Element & CurOut() { return aWriteHelper.Out(); }
85cdf0e10cSrcweir
86cdf0e10cSrcweir protected:
87cdf0e10cSrcweir HtmlDisplay_Impl(
88cdf0e10cSrcweir OuputPage_Environment &
89cdf0e10cSrcweir io_rEnv );
90cdf0e10cSrcweir private:
91cdf0e10cSrcweir // DATA
92cdf0e10cSrcweir OuputPage_Environment *
93cdf0e10cSrcweir pEnv;
94cdf0e10cSrcweir EasyWriter aWriteHelper;
95cdf0e10cSrcweir };
96cdf0e10cSrcweir
97cdf0e10cSrcweir
98cdf0e10cSrcweir namespace dshelp
99cdf0e10cSrcweir {
100cdf0e10cSrcweir
101cdf0e10cSrcweir void DisplaySlot(
102cdf0e10cSrcweir ary::Display & o_rDisplay,
103cdf0e10cSrcweir const ary::AryGroup &
104cdf0e10cSrcweir i_rGroup,
105cdf0e10cSrcweir ary::SlotAccessId i_nSlot );
106cdf0e10cSrcweir
107cdf0e10cSrcweir
108cdf0e10cSrcweir const char * PathUp(
109cdf0e10cSrcweir uintt i_nLevels );
110cdf0e10cSrcweir const char * PathPerLevelsUp(
111cdf0e10cSrcweir uintt i_nLevels,
112cdf0e10cSrcweir const char * i_nPathBelowDestinationLevel );
113cdf0e10cSrcweir
114cdf0e10cSrcweir const char * PathPerRoot(
115cdf0e10cSrcweir const OuputPage_Environment &
116cdf0e10cSrcweir i_rEnv,
117cdf0e10cSrcweir const char * i_sPathFromRootDir );
118cdf0e10cSrcweir const char * PathPerNamespace(
119cdf0e10cSrcweir const OuputPage_Environment &
120cdf0e10cSrcweir i_rEnv,
121cdf0e10cSrcweir const char * i_sPathFromNamespaceDir );
122cdf0e10cSrcweir
123cdf0e10cSrcweir void Create_ChildListLabel(
124cdf0e10cSrcweir csi::xml::Element & o_rParentElement,
125cdf0e10cSrcweir const char * i_sLabel );
126cdf0e10cSrcweir DYN csi::html::Table &
127cdf0e10cSrcweir Create_ChildListTable(
128cdf0e10cSrcweir const char * i_sTitle );
129cdf0e10cSrcweir
130cdf0e10cSrcweir const char * HtmlFileName(
131cdf0e10cSrcweir const char * i_sPrefix,
132cdf0e10cSrcweir const char * i_sEntityName );
133cdf0e10cSrcweir
134cdf0e10cSrcweir inline const char *
ClassFileName(const char * i_sClassLocalName)135cdf0e10cSrcweir ClassFileName( const char * i_sClassLocalName )
136cdf0e10cSrcweir { return HtmlFileName( "c-", i_sClassLocalName); }
137cdf0e10cSrcweir inline const char *
EnumFileName(const char * i_sEnumLocalName)138cdf0e10cSrcweir EnumFileName( const char * i_sEnumLocalName )
139cdf0e10cSrcweir { return HtmlFileName( "e-", i_sEnumLocalName); }
140cdf0e10cSrcweir inline const char *
TypedefFileName(const char * i_sTypedefLocalName)141cdf0e10cSrcweir TypedefFileName( const char * i_sTypedefLocalName )
142cdf0e10cSrcweir { return HtmlFileName( "t-", i_sTypedefLocalName); }
143cdf0e10cSrcweir inline const char *
FileFileName(const char * i_sFileLocalName)144cdf0e10cSrcweir FileFileName( const char * i_sFileLocalName )
145cdf0e10cSrcweir { return HtmlFileName( "f-", i_sFileLocalName); }
146cdf0e10cSrcweir
147cdf0e10cSrcweir const char * Path2Class(
148cdf0e10cSrcweir uintt i_nLevelsUp,
149cdf0e10cSrcweir const char * i_sClassLocalName );
150cdf0e10cSrcweir
151cdf0e10cSrcweir const char * Path2Child(
152cdf0e10cSrcweir const char * i_sFileName,
153cdf0e10cSrcweir const char * i_sSubDir = 0 );
154cdf0e10cSrcweir
155cdf0e10cSrcweir const char * Path2ChildNamespace(
156cdf0e10cSrcweir const char * i_sLocalName );
157cdf0e10cSrcweir
158cdf0e10cSrcweir String OperationLink(
159cdf0e10cSrcweir const ary::cpp::Gate & i_gate,
160cdf0e10cSrcweir const String & i_sOpName,
161cdf0e10cSrcweir ary::cpp::Ce_id i_nOpId,
162cdf0e10cSrcweir const char * i_sPrePath = "" );
163cdf0e10cSrcweir const char * DataLink(
164cdf0e10cSrcweir const String & i_sLocalName,
165cdf0e10cSrcweir const char * i_sPrePath = "" );
166cdf0e10cSrcweir
167cdf0e10cSrcweir inline String
OperationLabel(const String & i_sOpName,ary::cpp::Ce_id i_nOpId,const ary::cpp::Gate & i_gate)168cdf0e10cSrcweir OperationLabel( const String & i_sOpName,
169cdf0e10cSrcweir ary::cpp::Ce_id i_nOpId,
170cdf0e10cSrcweir const ary::cpp::Gate & i_gate )
171cdf0e10cSrcweir { return String(OperationLink(i_gate, i_sOpName, i_nOpId) + 1); } // Skip '#' in front.
172cdf0e10cSrcweir inline const char *
DataLabel(const String & i_sLocalName)173cdf0e10cSrcweir DataLabel( const String & i_sLocalName )
174cdf0e10cSrcweir { return DataLink(i_sLocalName) + 1; } // Skip '#' in front.
175cdf0e10cSrcweir
176cdf0e10cSrcweir
177cdf0e10cSrcweir void Get_LinkedTypeText(
178cdf0e10cSrcweir csi::xml::Element & o_rOut,
179cdf0e10cSrcweir const OuputPage_Environment &
180cdf0e10cSrcweir i_rEnv,
181cdf0e10cSrcweir ary::cpp::Type_id i_nId,
182cdf0e10cSrcweir bool i_bWithAbsolutifier = true );
183cdf0e10cSrcweir
184cdf0e10cSrcweir
185cdf0e10cSrcweir const char * Link2Ce(
186cdf0e10cSrcweir const OuputPage_Environment &
187cdf0e10cSrcweir i_rEnv,
188cdf0e10cSrcweir const ary::cpp::CodeEntity &
189cdf0e10cSrcweir i_rCe );
190cdf0e10cSrcweir
191cdf0e10cSrcweir const char * Link2CppDefinition(
192cdf0e10cSrcweir const OuputPage_Environment &
193cdf0e10cSrcweir i_rEnv,
194cdf0e10cSrcweir const ary::cpp::DefineEntity &
195cdf0e10cSrcweir i_rDef );
196cdf0e10cSrcweir
197cdf0e10cSrcweir const ary::cpp::CodeEntity *
198cdf0e10cSrcweir FindUnambiguousCe(
199cdf0e10cSrcweir const OuputPage_Environment &
200cdf0e10cSrcweir i_rEnv,
201cdf0e10cSrcweir const ary::QualifiedName &
202cdf0e10cSrcweir i_rQuName,
203cdf0e10cSrcweir const ary::cpp::Class * i_pJustDocumentedClass );
204cdf0e10cSrcweir
205cdf0e10cSrcweir void ShowDocu_On(
206cdf0e10cSrcweir csi::xml::Element & o_rOut,
207cdf0e10cSrcweir Docu_Display & io_rDisplay,
208cdf0e10cSrcweir const ary::cpp::CppEntity &
209cdf0e10cSrcweir i_rRE );
210cdf0e10cSrcweir
211cdf0e10cSrcweir void WriteOut_TokenList(
212cdf0e10cSrcweir csi::xml::Element & o_rOut,
213cdf0e10cSrcweir const StringVector & i_rTokens,
214cdf0e10cSrcweir const char * i_sSeparator );
215cdf0e10cSrcweir
216cdf0e10cSrcweir void EraseLeadingSpace(
217cdf0e10cSrcweir String & io_rStr );
218cdf0e10cSrcweir
219cdf0e10cSrcweir /** @param o_bIsConst
220cdf0e10cSrcweir *o_bIsConst will be set to true, if o_bIsConst != 0 and function is const.
221cdf0e10cSrcweir If the function is not const, *o_bIsConst remains unchanged!
222cdf0e10cSrcweir
223cdf0e10cSrcweir @param o_bIsVirtual
224cdf0e10cSrcweir The same as o_bIsConst.
225cdf0e10cSrcweir */
226cdf0e10cSrcweir void WriteOut_LinkedFunctionText(
227cdf0e10cSrcweir csi::xml::Element & o_rTitleOut,
228cdf0e10cSrcweir adcdisp::ParameterTable &
229cdf0e10cSrcweir o_rParameters,
230cdf0e10cSrcweir const ary::cpp::Function &
231cdf0e10cSrcweir i_rFunction,
232cdf0e10cSrcweir const OuputPage_Environment &
233cdf0e10cSrcweir i_rEnv,
234cdf0e10cSrcweir bool * o_bIsConst = 0,
235cdf0e10cSrcweir bool * o_bIsVirtual = 0 );
236cdf0e10cSrcweir
237cdf0e10cSrcweir
238cdf0e10cSrcweir
239cdf0e10cSrcweir } // namespace dshelp
240cdf0e10cSrcweir
241cdf0e10cSrcweir using namespace dshelp;
242cdf0e10cSrcweir
243cdf0e10cSrcweir #endif
244