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_TYPETEXT_HXX
25 #define ADC_DISPLAY_HFI_TYPETEXT_HXX
26 
27 
28 
29 // USED SERVICES
30     // BASE CLASSES
31 #include "hi_factory.hxx"
32     // COMPONENTS
33     // PARAMETERS
34 
35 
36 class HF_IdlTypeText : public HtmlFactory_Idl
37 {
38   public:
39     enum E_Index { use_for_javacompatible_index };
40 
41                         HF_IdlTypeText(
42                             Environment &       io_rEnv,
43                             Xml::Element &      o_rOut,
44                             bool                i_bWithLink,
45                             const client *      i_pScopeGivingCe = 0 );
46                         HF_IdlTypeText(
47                             Environment &       io_rEnv,
48                             E_Index             e );
49     virtual             ~HF_IdlTypeText();
50 
51     void                Produce_byData(
52                             ary::idl::Type_id   i_idType ) const;
53     void                Produce_byData(
54                             ary::idl::Ce_id     i_idCe ) const;
55     void                Produce_byData(
56                             const String &      i_sFullName ) const;
57 	void                Produce_LinkInDocu(
58 	                        const String &      i_scope,
59 	                        const String &      i_name,
60 	                        const String &      i_member ) const;
61 	void                Produce_LocalLinkInDocu(
62 	                        const String &      i_member ) const;
63 
64     /// Produce the first link for Java-help understood index entries.
65     void                Produce_IndexLink(
66                             Xml::Element &      o_out,
67                             const client &      i_ce ) const;
68     /** Produce the second link for Java-help understood index entries.
69         For members this will be a link to their owner (this function is
70         used), else see @->Produce_IndexSecondEntryLink();
71     */
72     void                Produce_IndexOwnerLink(
73                             Xml::Element &      o_out,
74                             const client &      i_owner ) const;
75     /** Produce the second link for Java-help understood index entries.
76         For non- members this will again be a link to to the entry itself
77         (this function is used), else see @->Produce_IndexOwnerLink();
78     */
79     void                Produce_IndexSecondEntryLink(
80                             Xml::Element &      o_out,
81                             const client &      i_ce ) const;
82   private:
83     // Locals
84     enum E_Existence
85     {
86         exists_dontknow,
87         exists_yes,
88         exists_no
89     };
90 
91     void                produce_FromStd(
92                             const StringVector &
93                                                 i_module,
94                             const String &      i_ce,
95                             const String &      i_member,
96                             int                 i_sequenceCount,
97                             E_Existence         i_ceExists,
98                             const std::vector<ary::idl::Type_id> *
99                                                 i_templateParameters = 0 ) const;
100     void                produce_BuiltIn(
101                             const String &      i_type,
102                             int                 i_sequenceCount ) const;
103     void                produce_IndexLink(
104                             const StringVector &
105                                                 i_module,
106                             const String &      i_ce,
107                             const String &      i_member,
108                             bool                i_bIsOwner ) const;
109     int                 count_Sequences(
110                             const char *        i_sFullType ) const;
111     void                start_Sequence(
112                             int                 i_count ) const;
113     void                finish_Sequence(
114                             int                 i_count ) const;
115     void                errorOut_UnresolvedLink(
116                             const char *        i_name ) const;
117     void                errorOut_UnresolvedLink(
118                             const StringVector &
119                                                 i_module,
120                             const String &      i_ce,
121                             const String &      i_member ) const;
122     bool                is_ExternLink(
123                             const StringVector &
124                                                 i_module ) const;
125     void                produce_ExternLink(
126                             const StringVector &
127                                                 i_module,
128                             const String &      i_ce,
129                             const String &      i_member,
130                             int                 i_sequenceCount,
131                             const std::vector<ary::idl::Type_id> *
132                                                 i_templateParameters ) const;
133     void                write_TemplateParameterList(
134                             const std::vector<ary::idl::Type_id> &
135                                                 i_templateParameters ) const;
136     const ary::idl::Module *
137                         referingModule() const;
138     const client *      referingCe() const;
139 
140     // DATA
141     mutable const client *
142                         pReferingCe;
143     bool                bWithLink;
144 };
145 
146 
147 
148 // IMPLEMENTATION
149 
150 
151 
152 #endif
153 
154 
155