Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #ifndef ADC_DISPLAY_HI_FACTORY_HXX
21 : #define ADC_DISPLAY_HI_FACTORY_HXX
22 :
23 :
24 : // USED SERVICES
25 : // BASE CLASSES
26 : #include <toolkit/htmlfactory.hxx>
27 : // COMPONENTS
28 : // PARAMETERS
29 : #include <ary/stdconstiter.hxx>
30 : #include <ary/idl/i_types4idl.hxx>
31 : #include <toolkit/out_position.hxx>
32 :
33 :
34 : namespace ary
35 : {
36 : namespace doc
37 : {
38 : class OldIdlDocu;
39 : }
40 : }
41 :
42 :
43 : class HtmlEnvironment_Idl;
44 : class HF_TitleTable;
45 : class HF_SubTitleTable;
46 :
47 :
48 : class HtmlFactory_Idl : public HtmlFactory<HtmlEnvironment_Idl>
49 : {
50 : public:
51 : enum E_MemberViewType
52 : {
53 : viewtype_summary, // the summary of the members
54 : viewtype_details, // the details of the members
55 : viewtype_complete // everything
56 : };
57 :
58 : enum E_DocType
59 : {
60 : doctype_summaryOnly, // only the summary
61 : doctype_complete // the complete documentation
62 : };
63 :
64 : public:
65 : typedef ary::idl::CodeEntity client;
66 : typedef ary::idl::Ce_id ce_id;
67 : typedef ary::idl::Type_id type_id;
68 : typedef ary::doc::OldIdlDocu ce_info;
69 :
70 : typedef ary::Dyn_StdConstIterator<ce_id> dyn_ce_list;
71 : typedef ary::Dyn_StdConstIterator<type_id> dyn_type_list;
72 : typedef ary::StdConstIterator<ce_id> ce_list;
73 : typedef ary::StdConstIterator<type_id> type_list;
74 :
75 : typedef HtmlEnvironment_Idl Environment;
76 : typedef output::Position OutPosition;
77 :
78 : protected:
79 170566 : HtmlFactory_Idl(
80 : Environment & io_rEnv,
81 : Xml::Element * o_pOut = 0 )
82 170566 : : HtmlFactory<Environment>(io_rEnv, o_pOut)
83 170566 : { }
84 170566 : virtual ~HtmlFactory_Idl() {}
85 :
86 : /** The default version only calls ->produce_InternalLink().
87 : This may be overwritten by derived classes.
88 : */
89 : virtual void produce_SummaryDeclaration(
90 : Xml::Element & o_row,
91 : const client & i_ce ) const;
92 : void produce_InternalLink(
93 : Xml::Element & o_row,
94 : const client & i_ce ) const;
95 : void produce_ShortDoc(
96 : Xml::Element & o_row,
97 : const client & i_ce ) const;
98 :
99 : // KORR_FUTURE: Does not belong here (implementation inheritance)!
100 : void produce_Bases(
101 : Xml::Element & o_screen,
102 : const client & i_ce,
103 : const String & i_sLabel ) const;
104 : void produce_Members(
105 : ce_list & it_list,
106 : const String & i_summaryTitle,
107 : const String & i_summaryLabel,
108 : const String & i_detailsTitle,
109 : const String & i_detailsLabel,
110 : const E_MemberViewType i_viewType = viewtype_complete ) const;
111 :
112 : void produce_Title(
113 : HF_TitleTable & o_title,
114 : const String & i_label,
115 : const client & i_ce ) const;
116 : void get_Annotations(
117 : StreamStr & o_out,
118 : const client & i_ce ) const;
119 :
120 : /// Writes complete docu in standard format.
121 : void write_Docu(
122 : Xml::Element & o_screen,
123 : const client & i_ce ) const;
124 :
125 : void write_ManualLinks(
126 : Xml::Element & o_screen,
127 : const client & i_ce ) const;
128 : private:
129 : // Dummy does nothing
130 : virtual void produce_MemberDetails(
131 : HF_SubTitleTable & o_table,
132 : const client & i_ce ) const;
133 : void recursive_ShowBases(
134 : Xml::Element & o_screen,
135 : type_id i_baseType,
136 : int & io_nDepth ) const;
137 1150 : type_id baseOf(
138 : const client & i_ce ) const
139 1150 : { return inq_BaseOf(i_ce); }
140 : virtual type_id inq_BaseOf(
141 : const client & i_ce ) const;
142 : };
143 :
144 :
145 : extern const String
146 : C_sCellStyle_SummaryLeft;
147 : extern const String
148 : C_sCellStyle_SummaryRight;
149 : extern const String
150 : C_sCellStyle_MDetail;
151 : extern const String
152 : C_sMemberTitle;
153 :
154 :
155 : #endif
156 :
157 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|