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_HTML_HD_DOCU_HXX 29 #define ADC_DISPLAY_HTML_HD_DOCU_HXX 30 31 // BASE CLASSES 32 #include <ary/ary_disp.hxx> 33 #include <ary/info/infodisp.hxx> 34 #include <cosv/tpl/processor.hxx> 35 #include "hdimpl.hxx" 36 37 namespace ary 38 { 39 namespace cpp 40 { 41 class Namespace; 42 class Class; 43 class Enum; 44 class Typedef; 45 class Function; 46 class Variable; 47 } 48 49 namespace doc 50 { 51 class Documentation; 52 } 53 namespace info 54 { 55 class DocuText; 56 } 57 58 class QualifiedName; 59 } 60 61 class OuputPage_Environment; 62 63 64 class Docu_Display : public ary::Display, 65 public csv::ConstProcessor<ary::cpp::Namespace>, 66 public csv::ConstProcessor<ary::cpp::Class>, 67 public csv::ConstProcessor<ary::cpp::Enum>, 68 public csv::ConstProcessor<ary::cpp::Typedef>, 69 public csv::ConstProcessor<ary::cpp::Function>, 70 public csv::ConstProcessor<ary::cpp::Variable>, 71 public csv::ConstProcessor<ary::doc::Documentation>, 72 public ary::info::DocuDisplay, 73 private HtmlDisplay_Impl 74 { 75 public: 76 Docu_Display( 77 OuputPage_Environment & 78 io_rEnv ); 79 virtual ~Docu_Display(); 80 81 void Assign_Out( 82 csi::xml::Element & o_rOut ); 83 void Unassign_Out(); 84 85 virtual void Display_StdTag( 86 const ary::info::StdTag & 87 i_rData ); 88 virtual void Display_BaseTag( 89 const ary::info::BaseTag & 90 i_rData ); 91 virtual void Display_ExceptionTag( 92 const ary::info::ExceptionTag & 93 i_rData ); 94 virtual void Display_ImplementsTag( 95 const ary::info::ImplementsTag & 96 i_rData ); 97 virtual void Display_KeywordTag( 98 const ary::info::KeywordTag & 99 i_rData ); 100 virtual void Display_ParameterTag( 101 const ary::info::ParameterTag & 102 i_rData ); 103 virtual void Display_SeeTag( 104 const ary::info::SeeTag & 105 i_rData ); 106 virtual void Display_TemplateTag( 107 const ary::info::TemplateTag & 108 i_rData ); 109 virtual void Display_LabelTag( 110 const ary::info::LabelTag & 111 i_rData ); 112 virtual void Display_SinceTag( 113 const ary::info::SinceTag & 114 i_rData ); 115 116 virtual void Display_DT_Text( 117 const ary::info::DT_Text & 118 i_rData ); 119 virtual void Display_DT_MaybeLink( 120 const ary::info::DT_MaybeLink & 121 i_rData ); 122 virtual void Display_DT_Whitespace( 123 const ary::info::DT_Whitespace & 124 i_rData ); 125 virtual void Display_DT_Eol( 126 const ary::info::DT_Eol & 127 i_rData ); 128 virtual void Display_DT_Xml( 129 const ary::info::DT_Xml & 130 i_rData ); 131 132 using csv::ConstProcessor<ary::doc::Documentation>::Process; 133 134 private: 135 // Interface csv::ConstProcessor<>: 136 virtual void do_Process( 137 const ary::cpp::Namespace & 138 i_rData ); 139 virtual void do_Process( 140 const ary::cpp::Class & 141 i_rData ); 142 virtual void do_Process( 143 const ary::cpp::Enum & 144 i_rData ); 145 virtual void do_Process( 146 const ary::cpp::Typedef & 147 i_rData ); 148 virtual void do_Process( 149 const ary::cpp::Function & 150 i_rData ); 151 virtual void do_Process( 152 const ary::cpp::Variable & 153 i_rData ); 154 virtual void do_Process( 155 const ary::doc::Documentation & 156 i_rData ); 157 // Interface ary::Display: 158 virtual const ary::cpp::Gate * 159 inq_Get_ReFinder() const; 160 // Locals 161 void Start_DocuBlock(); 162 void Finish_DocuBlock(); 163 164 void Write_TagTitle( 165 const char * i_sText, 166 const char * i_nFontSize = "+0" ); 167 void Write_TagContents( 168 const ary::info::DocuText & 169 i_rDocuText ); 170 void Write_Text( 171 const ary::info::DocuText & 172 i_rDocuText ); 173 void Write_TextToken( 174 const String & i_sText ); 175 void Write_LinkableText( 176 const ary::QualifiedName & 177 i_sQuName ); 178 void Write_QualifiedName( 179 const ary::QualifiedName & 180 i_sQuName ); 181 182 // DATA 183 bool bUseHtmlInDocuTokens; 184 185 /** This is used, if a class documentation is displayed, 186 because for links to members then the "current class" 187 is not the parent, but this class itself. 188 */ 189 const ary::cpp::Class * 190 pCurClassOverwrite; 191 }; 192 193 194 195 196 #endif 197