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_HFI_XREFPAGE_HXX
25 #define ADC_DISPLAY_HFI_XREFPAGE_HXX
26 
27 
28 
29 // USED SERVICES
30     // BASE CLASSES
31 #include "hi_factory.hxx"
32     // COMPONENTS
33     // PARAMETERS
34 
35 
36 class HF_IdlXrefs : public HtmlFactory_Idl
37 {
38   public:
39     typedef void (*F_GET_SUBLIST)(dyn_ce_list&, const client&);
40 
41                         HF_IdlXrefs(
42                             Environment &       io_rEnv,
43                             Xml::Element &      o_rOut,
44                             const String &      i_prefix,
45                             const client &      i_ce);
46     virtual             ~HF_IdlXrefs();
47 
48     /** @descr
49         Only lists which are tried to be produced by Produce_List() or
50         Produce_Tree(), will occur in the content directory of the page.
51         They will have links, if the list or tree has at least one element,
52         else the list is mentioned in the directory without link.
53 
54         @param i_label [*i_label == '#']
55     */
56     void                Produce_List(
57                             const char *        i_title,
58                             const char *        i_label,
59                             ce_list &           i_iterator ) const;
60     void                Write_ManualLinks(
61                             const client &      i_ce ) const;
62     /** @descr
63         Only lists which are tried to be produced by Produce_List() or
64         Produce_Tree(), will occur in the content directory of the page.
65         They will have links, if the list or tree has at least one element,
66         else the list is mentioned in the directory without link.
67 
68         @param i_label [*i_label == '#']
69     */
70     void                Produce_Tree(
71                             const char *        i_title,
72                             const char *        i_label,
73                             const client &      i_ce,
74                             F_GET_SUBLIST       i_sublistcreator ) const;
75 
76   private:
77     // Locals
78     void                produce_Main(
79                             const String &      i_prefix,
80                             const client &      i_ce ) const;
81     void                make_Navibar(
82                             const client &      i_ce ) const;
83     /// @return true if there are any elements in sub lists.
84     void                recursive_make_ListInTree(
85                             Xml::Element &      o_rDisplay,
86                             uintt               i_level,    /// 0 is highest
87                             const client &      i_ce,
88                             ce_list &           i_iterator,
89                             F_GET_SUBLIST       i_sublistcreator ) const;
90 
91     // DATA
92     Xml::Element &      rContentDirectory;
93     const client *      pClient;
94 };
95 
96 
97 
98 // IMPLEMENTATION
99 
100 #endif
101