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