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_TAG_HXX 25 #define ADC_DISPLAY_HFI_TAG_HXX 26 27 // BASE CLASSES 28 #include "hi_factory.hxx" 29 #include <ary_i/disdocum.hxx> 30 // USED SERVICES 31 #include <ary/idl/i_types4idl.hxx> 32 #include <ary_i/ci_atag2.hxx> 33 #include <ary_i/ci_text2.hxx> 34 #include <ary/doc/d_oldidldocu.hxx> 35 36 #include <toolkit/hf_docentry.hxx> 37 38 namespace ary 39 { 40 namespace idl 41 { 42 class Module; 43 } 44 } 45 46 47 48 49 /** This class is an implementation of ary::inf::DocuText_Display 50 and will be used by that interface. 51 */ 52 class HF_IdlDocuTextDisplay : public HtmlFactory_Idl, 53 public ary::inf::DocuText_Display 54 { 55 public: 56 HF_IdlDocuTextDisplay( 57 Environment & io_rEnv, 58 Xml::Element * o_pOut, 59 const ary::idl::CodeEntity & 60 i_rScopeGivingCe ); 61 virtual ~HF_IdlDocuTextDisplay(); 62 63 const ary::idl::CodeEntity & ScopeGivingCe() const64 ScopeGivingCe() const { return *pScopeGivingCe; } 65 private: 66 virtual void Display_TextToken( 67 const csi::dsapi::DT_TextToken & 68 i_rToken ); 69 virtual void Display_White(); 70 71 virtual void Display_MupType( 72 const csi::dsapi::DT_MupType & 73 i_rToken ); 74 virtual void Display_MupMember( 75 const csi::dsapi::DT_MupMember & 76 i_rToken ); 77 virtual void Display_MupConst( 78 const csi::dsapi::DT_MupConst & 79 i_rToken ); 80 virtual void Display_Style( 81 const csi::dsapi::DT_Style & i_rToken ); 82 virtual void Display_EOL(); 83 84 // Local StartLinkGathering(const String & i_sScope)85 void StartLinkGathering( 86 const String & i_sScope ) 87 { sLinkToken = ""; sScope = i_sScope; bGatherLink = true; } StopLinkGathering()88 void StopLinkGathering() { bGatherLink = false; } 89 /** @precond 90 The scope is in sScope, the name is in sLinkToken. 91 */ 92 void CreateTypeLink(); 93 /** @precond 94 The scope is in sScope, the qualified member-name is in sLinkToken. 95 */ 96 void CreateMemberLink(); 97 98 // DATA 99 String sScope; 100 String sLinkToken; 101 bool bGatherLink; 102 const ary::idl::CodeEntity * 103 pScopeGivingCe; 104 }; 105 106 107 108 class HF_IdlShortDocu : public HtmlFactory_Idl 109 { 110 public: 111 HF_IdlShortDocu( 112 Environment & io_rEnv, 113 Xml::Element & o_rOut ); 114 virtual ~HF_IdlShortDocu(); 115 116 void Produce_byData( 117 const ary::idl::CodeEntity & 118 i_rCe ); 119 }; 120 121 122 123 class HF_IdlTag : public HtmlFactory_Idl, 124 public ary::inf::DocuTag_Display 125 { 126 public: 127 HF_IdlTag( 128 Environment & io_rEnv, 129 const ary::idl::CodeEntity & 130 i_rScopeGivingCe ); 131 virtual ~HF_IdlTag(); 132 133 void Produce_byData( 134 Xml::Element & o_rTitle, 135 Xml::Element & o_rText, 136 const ary::inf::AtTag2 & 137 i_rTag ) const; 138 void Produce_byData( 139 Xml::Element & o_rTitle, 140 Xml::Element & o_rText, 141 const std::vector< csi::dsapi::DT_SeeAlsoAtTag* > & 142 i_seeAlsoVector ) const; 143 private: 144 virtual void Display_StdAtTag( 145 const csi::dsapi::DT_StdAtTag & 146 i_rToken ); 147 virtual void Display_SeeAlsoAtTag( 148 const csi::dsapi::DT_SeeAlsoAtTag & 149 i_rToken ); 150 virtual void Display_ParameterAtTag( 151 const csi::dsapi::DT_ParameterAtTag & 152 i_rToken ); 153 virtual void Display_SinceAtTag( 154 const csi::dsapi::DT_SinceAtTag & 155 i_rToken ); 156 157 void Enter_TextOut( 158 Xml::Element & o_rText ) const; 159 void Leave_TextOut() const; 160 void PutText_Out( 161 const ary::inf::DocuTex2 & 162 i_rText ) const; 163 // DATA 164 mutable Xml::Element * 165 pTitleOut; 166 mutable HF_IdlDocuTextDisplay 167 aTextOut; 168 }; 169 170 171 172 173 #endif 174