1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef ADC_DISPLAY_HTML_NAV_MAIN_HXX
25 #define ADC_DISPLAY_HTML_NAV_MAIN_HXX
26 
27 // USED SERVICES
28 
29 namespace ary
30 {
31 namespace cpp
32 {
33     class CodeEntity;
34 }
35 namespace loc
36 {
37     class File;
38 }
39 }
40 namespace csi
41 {
42 namespace xml
43 {
44     class Element;
45 }
46 }
47 
48 class OuputPage_Environment;
49 class MainItem;
50 
51 
52 
53 
54 class MainRow
55 {
56   public:
57                         MainRow(
58                             const OuputPage_Environment &
59                                                 i_rEnv );
60                         ~MainRow();
61 
62     void                SetupItems_Overview();
63     void                SetupItems_AllDefs();
64     void                SetupItems_Index();
65     void                SetupItems_Help();
66 
67     void                SetupItems_Ce(
68                             const ary::cpp::CodeEntity &
69                                                 i_rCe );
70     void                SetupItems_FunctionGroup(); /// For class member methods.
71     void                SetupItems_DataGroup();     /// For class member data.
72 
73     void                Write2(
74                             csi::xml::Element & o_rOut ) const;
75   private:
76     // Local
77     enum E_Style
78     {
79         eSelf,
80         eNo,
81         eStd
82     };
83 
84     /** @precond
85         Only combinations of 1 eSelf and 2 eStd are allowed
86         as arguments, here.
87     */
88     void                Create_ItemList_Global(
89                             E_Style             i_eOverview,
90                             E_Style             i_eIndex,
91                             E_Style             i_eHelp );
92     void                Create_ItemList_InDirTree_Cpp(
93                             E_Style             i_eNsp,
94                             E_Style             i_eClass,
95                             E_Style             i_eTree,
96                             const char *        i_sTreeLink );
97     void                Add_Item(
98                             E_Style             i_eStyle,
99                             const String  &     i_sText,
100                             const char *        i_sLink,
101                             const char *        i_sTip );
102     // DATA
103     typedef std::vector< DYN MainItem* > ItemList;
104 
105 
106     ItemList            aItems;
107     const OuputPage_Environment *
108                         pEnv;
109 };
110 
111 
112 
113 
114 #endif
115