1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef ADC_DISPLAY_HFI_TYPETEXT_HXX
29 #define ADC_DISPLAY_HFI_TYPETEXT_HXX
30 
31 
32 
33 // USED SERVICES
34     // BASE CLASSES
35 #include "hi_factory.hxx"
36     // COMPONENTS
37     // PARAMETERS
38 
39 
40 class HF_IdlTypeText : public HtmlFactory_Idl
41 {
42   public:
43     enum E_Index { use_for_javacompatible_index };
44 
45                         HF_IdlTypeText(
46                             Environment &       io_rEnv,
47                             Xml::Element &      o_rOut,
48                             bool                i_bWithLink,
49                             const client *      i_pScopeGivingCe = 0 );
50                         HF_IdlTypeText(
51                             Environment &       io_rEnv,
52                             E_Index             e );
53     virtual             ~HF_IdlTypeText();
54 
55     void                Produce_byData(
56                             ary::idl::Type_id   i_idType ) const;
57     void                Produce_byData(
58                             ary::idl::Ce_id     i_idCe ) const;
59     void                Produce_byData(
60                             const String &      i_sFullName ) const;
61 	void                Produce_LinkInDocu(
62 	                        const String &      i_scope,
63 	                        const String &      i_name,
64 	                        const String &      i_member ) const;
65 	void                Produce_LocalLinkInDocu(
66 	                        const String &      i_member ) const;
67 
68     /// Produce the first link for Java-help understood index entries.
69     void                Produce_IndexLink(
70                             Xml::Element &      o_out,
71                             const client &      i_ce ) const;
72     /** Produce the second link for Java-help understood index entries.
73         For members this will be a link to their owner (this function is
74         used), else see @->Produce_IndexSecondEntryLink();
75     */
76     void                Produce_IndexOwnerLink(
77                             Xml::Element &      o_out,
78                             const client &      i_owner ) const;
79     /** Produce the second link for Java-help understood index entries.
80         For non- members this will again be a link to to the entry itself
81         (this function is used), else see @->Produce_IndexOwnerLink();
82     */
83     void                Produce_IndexSecondEntryLink(
84                             Xml::Element &      o_out,
85                             const client &      i_ce ) const;
86   private:
87     // Locals
88     enum E_Existence
89     {
90         exists_dontknow,
91         exists_yes,
92         exists_no
93     };
94 
95     void                produce_FromStd(
96                             const StringVector &
97                                                 i_module,
98                             const String &      i_ce,
99                             const String &      i_member,
100                             int                 i_sequenceCount,
101                             E_Existence         i_ceExists,
102                             const std::vector<ary::idl::Type_id> *
103                                                 i_templateParameters = 0 ) const;
104     void                produce_BuiltIn(
105                             const String &      i_type,
106                             int                 i_sequenceCount ) const;
107     void                produce_IndexLink(
108                             const StringVector &
109                                                 i_module,
110                             const String &      i_ce,
111                             const String &      i_member,
112                             bool                i_bIsOwner ) const;
113     int                 count_Sequences(
114                             const char *        i_sFullType ) const;
115     void                start_Sequence(
116                             int                 i_count ) const;
117     void                finish_Sequence(
118                             int                 i_count ) const;
119     void                errorOut_UnresolvedLink(
120                             const char *        i_name ) const;
121     void                errorOut_UnresolvedLink(
122                             const StringVector &
123                                                 i_module,
124                             const String &      i_ce,
125                             const String &      i_member ) const;
126     bool                is_ExternLink(
127                             const StringVector &
128                                                 i_module ) const;
129     void                produce_ExternLink(
130                             const StringVector &
131                                                 i_module,
132                             const String &      i_ce,
133                             const String &      i_member,
134                             int                 i_sequenceCount,
135                             const std::vector<ary::idl::Type_id> *
136                                                 i_templateParameters ) const;
137     void                write_TemplateParameterList(
138                             const std::vector<ary::idl::Type_id> &
139                                                 i_templateParameters ) const;
140     const ary::idl::Module *
141                         referingModule() const;
142     const client *      referingCe() const;
143 
144     // DATA
145     mutable const client *
146                         pReferingCe;
147     bool                bWithLink;
148 };
149 
150 
151 
152 // IMPLEMENTATION
153 
154 
155 
156 #endif
157 
158 
159