1*1c78a5d6SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*1c78a5d6SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*1c78a5d6SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*1c78a5d6SAndrew Rist * distributed with this work for additional information 6*1c78a5d6SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*1c78a5d6SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*1c78a5d6SAndrew Rist * "License"); you may not use this file except in compliance 9*1c78a5d6SAndrew Rist * with the License. You may obtain a copy of the License at 10*1c78a5d6SAndrew Rist * 11*1c78a5d6SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*1c78a5d6SAndrew Rist * 13*1c78a5d6SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*1c78a5d6SAndrew Rist * software distributed under the License is distributed on an 15*1c78a5d6SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*1c78a5d6SAndrew Rist * KIND, either express or implied. See the License for the 17*1c78a5d6SAndrew Rist * specific language governing permissions and limitations 18*1c78a5d6SAndrew Rist * under the License. 19*1c78a5d6SAndrew Rist * 20*1c78a5d6SAndrew Rist *************************************************************/ 21*1c78a5d6SAndrew Rist 22*1c78a5d6SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef CSI_DSAPI_D_TOKEN_HXX 25cdf0e10cSrcweir #define CSI_DSAPI_D_TOKEN_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir // BASE CLASSES 28cdf0e10cSrcweir #include <ary_i/ci_text2.hxx> 29cdf0e10cSrcweir #include <ary_i/ci_atag2.hxx> 30cdf0e10cSrcweir 31cdf0e10cSrcweir 32cdf0e10cSrcweir namespace ary 33cdf0e10cSrcweir { 34cdf0e10cSrcweir namespace inf 35cdf0e10cSrcweir { 36cdf0e10cSrcweir class DocumentationDisplay; 37cdf0e10cSrcweir } 38cdf0e10cSrcweir } 39cdf0e10cSrcweir 40cdf0e10cSrcweir 41cdf0e10cSrcweir 42cdf0e10cSrcweir namespace csi 43cdf0e10cSrcweir { 44cdf0e10cSrcweir namespace dsapi 45cdf0e10cSrcweir { 46cdf0e10cSrcweir 47cdf0e10cSrcweir using ary::inf::DocumentationDisplay; 48cdf0e10cSrcweir 49cdf0e10cSrcweir 50cdf0e10cSrcweir class DT_Dsapi : public ary::inf::DocuToken 51cdf0e10cSrcweir { 52cdf0e10cSrcweir public: 53cdf0e10cSrcweir virtual void DisplayAt( 54cdf0e10cSrcweir DocumentationDisplay & 55cdf0e10cSrcweir o_rDisplay ) const = 0; 56cdf0e10cSrcweir virtual bool IsWhiteOnly() const; 57cdf0e10cSrcweir }; 58cdf0e10cSrcweir 59cdf0e10cSrcweir 60cdf0e10cSrcweir 61cdf0e10cSrcweir class DT_TextToken : public DT_Dsapi 62cdf0e10cSrcweir { 63cdf0e10cSrcweir public: DT_TextToken(const char * i_sText)64cdf0e10cSrcweir explicit DT_TextToken( 65cdf0e10cSrcweir const char * i_sText ) 66cdf0e10cSrcweir : sText(i_sText) {} DT_TextToken(const String & i_sText)67cdf0e10cSrcweir explicit DT_TextToken( 68cdf0e10cSrcweir const String & i_sText ) 69cdf0e10cSrcweir : sText(i_sText) {} 70cdf0e10cSrcweir virtual ~DT_TextToken(); 71cdf0e10cSrcweir 72cdf0e10cSrcweir virtual void DisplayAt( 73cdf0e10cSrcweir DocumentationDisplay & 74cdf0e10cSrcweir o_rDisplay ) const; GetText() const75cdf0e10cSrcweir const char * GetText() const { return sText; } GetTextStr() const76cdf0e10cSrcweir const String & GetTextStr() const { return sText; } 77cdf0e10cSrcweir Access_Text()78cdf0e10cSrcweir String & Access_Text() { return sText; } 79cdf0e10cSrcweir 80cdf0e10cSrcweir virtual bool IsWhiteOnly() const; 81cdf0e10cSrcweir 82cdf0e10cSrcweir private: 83cdf0e10cSrcweir String sText; 84cdf0e10cSrcweir }; 85cdf0e10cSrcweir 86cdf0e10cSrcweir class DT_White : public DT_Dsapi 87cdf0e10cSrcweir { 88cdf0e10cSrcweir public: DT_White()89cdf0e10cSrcweir DT_White() {} 90cdf0e10cSrcweir virtual ~DT_White(); 91cdf0e10cSrcweir 92cdf0e10cSrcweir virtual void DisplayAt( 93cdf0e10cSrcweir DocumentationDisplay & 94cdf0e10cSrcweir o_rDisplay ) const; 95cdf0e10cSrcweir virtual bool IsWhiteOnly() const; 96cdf0e10cSrcweir }; 97cdf0e10cSrcweir 98cdf0e10cSrcweir 99cdf0e10cSrcweir class DT_MLTag : public DT_Dsapi 100cdf0e10cSrcweir { 101cdf0e10cSrcweir public: 102cdf0e10cSrcweir enum E_Kind 103cdf0e10cSrcweir { 104cdf0e10cSrcweir k_unknown = 0, 105cdf0e10cSrcweir k_begin, 106cdf0e10cSrcweir k_end, 107cdf0e10cSrcweir k_single 108cdf0e10cSrcweir }; 109cdf0e10cSrcweir }; 110cdf0e10cSrcweir 111cdf0e10cSrcweir class DT_MupType : public DT_MLTag 112cdf0e10cSrcweir { 113cdf0e10cSrcweir public: DT_MupType(bool)114cdf0e10cSrcweir explicit DT_MupType( /// Constructor for End-Tag 115cdf0e10cSrcweir bool ) /// Must be there, but is not evaluated. 116cdf0e10cSrcweir : bIsBegin(false) {} DT_MupType(const String & i_sScope)117cdf0e10cSrcweir explicit DT_MupType( /// Constructor for Begin-Tag 118cdf0e10cSrcweir const String & i_sScope ) 119cdf0e10cSrcweir : sScope(i_sScope), bIsBegin(true) {} 120cdf0e10cSrcweir virtual ~DT_MupType(); 121cdf0e10cSrcweir 122cdf0e10cSrcweir virtual void DisplayAt( 123cdf0e10cSrcweir DocumentationDisplay & 124cdf0e10cSrcweir o_rDisplay ) const; Scope() const125cdf0e10cSrcweir const String & Scope() const { return sScope; } IsBegin() const126cdf0e10cSrcweir bool IsBegin() const { return bIsBegin; } 127cdf0e10cSrcweir 128cdf0e10cSrcweir private: 129cdf0e10cSrcweir String sScope; 130cdf0e10cSrcweir bool bIsBegin; 131cdf0e10cSrcweir }; 132cdf0e10cSrcweir 133cdf0e10cSrcweir class DT_MupMember : public DT_MLTag 134cdf0e10cSrcweir { 135cdf0e10cSrcweir public: DT_MupMember(bool)136cdf0e10cSrcweir explicit DT_MupMember( /// Constructor for End-Tag 137cdf0e10cSrcweir bool ) /// Must be there, but is not evaluated. 138cdf0e10cSrcweir : bIsBegin(false) {} DT_MupMember(const String & i_sScope)139cdf0e10cSrcweir DT_MupMember( /// Constructor for Begin-Tag 140cdf0e10cSrcweir const String & i_sScope ) 141cdf0e10cSrcweir : sScope(i_sScope), bIsBegin(true) {} 142cdf0e10cSrcweir virtual ~DT_MupMember(); 143cdf0e10cSrcweir 144cdf0e10cSrcweir virtual void DisplayAt( 145cdf0e10cSrcweir DocumentationDisplay & 146cdf0e10cSrcweir o_rDisplay ) const; Scope() const147cdf0e10cSrcweir const String & Scope() const { return sScope; } IsBegin() const148cdf0e10cSrcweir bool IsBegin() const { return bIsBegin; } 149cdf0e10cSrcweir 150cdf0e10cSrcweir private: 151cdf0e10cSrcweir String sScope; 152cdf0e10cSrcweir bool bIsBegin; 153cdf0e10cSrcweir }; 154cdf0e10cSrcweir 155cdf0e10cSrcweir class DT_MupConst : public DT_Dsapi 156cdf0e10cSrcweir { 157cdf0e10cSrcweir public: DT_MupConst(const char * i_sConstText)158cdf0e10cSrcweir DT_MupConst( 159cdf0e10cSrcweir const char * i_sConstText ) 160cdf0e10cSrcweir : sConstText(i_sConstText) {} 161cdf0e10cSrcweir virtual ~DT_MupConst(); 162cdf0e10cSrcweir 163cdf0e10cSrcweir virtual void DisplayAt( 164cdf0e10cSrcweir DocumentationDisplay & 165cdf0e10cSrcweir o_rDisplay ) const; GetText() const166cdf0e10cSrcweir const char * GetText() const { return sConstText; } 167cdf0e10cSrcweir 168cdf0e10cSrcweir private: 169cdf0e10cSrcweir String sConstText; /// Without HTML. 170cdf0e10cSrcweir }; 171cdf0e10cSrcweir 172cdf0e10cSrcweir 173cdf0e10cSrcweir class DT_Style : public DT_MLTag 174cdf0e10cSrcweir { 175cdf0e10cSrcweir public: DT_Style(const char * i_sPlainHtmlTag,bool i_bNewLine)176cdf0e10cSrcweir DT_Style( 177cdf0e10cSrcweir const char * i_sPlainHtmlTag, 178cdf0e10cSrcweir bool i_bNewLine ) 179cdf0e10cSrcweir : sText(i_sPlainHtmlTag), bNewLine(i_bNewLine) {} 180cdf0e10cSrcweir virtual ~DT_Style(); 181cdf0e10cSrcweir 182cdf0e10cSrcweir virtual void DisplayAt( 183cdf0e10cSrcweir DocumentationDisplay & 184cdf0e10cSrcweir o_rDisplay ) const; GetText() const185cdf0e10cSrcweir const char * GetText() const { return sText; } IsStartOfNewLine() const186cdf0e10cSrcweir bool IsStartOfNewLine() const 187cdf0e10cSrcweir { return bNewLine; } 188cdf0e10cSrcweir private: 189cdf0e10cSrcweir String sText; /// With HTML. 190cdf0e10cSrcweir E_Kind eKind; 191cdf0e10cSrcweir bool bNewLine; 192cdf0e10cSrcweir }; 193cdf0e10cSrcweir 194cdf0e10cSrcweir class DT_EOL : public DT_Dsapi 195cdf0e10cSrcweir { 196cdf0e10cSrcweir public: DT_EOL()197cdf0e10cSrcweir DT_EOL() {} 198cdf0e10cSrcweir virtual ~DT_EOL(); 199cdf0e10cSrcweir 200cdf0e10cSrcweir virtual void DisplayAt( 201cdf0e10cSrcweir DocumentationDisplay & 202cdf0e10cSrcweir o_rDisplay ) const; 203cdf0e10cSrcweir virtual bool IsWhiteOnly() const; 204cdf0e10cSrcweir }; 205cdf0e10cSrcweir 206cdf0e10cSrcweir 207cdf0e10cSrcweir class DT_AtTag : public ary::inf::AtTag2 208cdf0e10cSrcweir { 209cdf0e10cSrcweir public: AddToken(DYN ary::inf::DocuToken & let_drToken)210cdf0e10cSrcweir void AddToken( 211cdf0e10cSrcweir DYN ary::inf::DocuToken & 212cdf0e10cSrcweir let_drToken ) 213cdf0e10cSrcweir { aText.AddToken(let_drToken); } SetName(const char * i_sName)214cdf0e10cSrcweir void SetName( 215cdf0e10cSrcweir const char * i_sName ) 216cdf0e10cSrcweir { sTitle = i_sName; } 217cdf0e10cSrcweir 218cdf0e10cSrcweir protected: DT_AtTag(const char * i_sTitle)219cdf0e10cSrcweir DT_AtTag( 220cdf0e10cSrcweir const char * i_sTitle ) 221cdf0e10cSrcweir : ary::inf::AtTag2(i_sTitle) {} 222cdf0e10cSrcweir }; 223cdf0e10cSrcweir 224cdf0e10cSrcweir class DT_StdAtTag : public DT_AtTag 225cdf0e10cSrcweir { 226cdf0e10cSrcweir public: DT_StdAtTag(const char * i_sTitle)227cdf0e10cSrcweir explicit DT_StdAtTag( 228cdf0e10cSrcweir const char * i_sTitle ) 229cdf0e10cSrcweir : DT_AtTag(i_sTitle) {} 230cdf0e10cSrcweir virtual ~DT_StdAtTag(); 231cdf0e10cSrcweir 232cdf0e10cSrcweir virtual void DisplayAt( 233cdf0e10cSrcweir DocumentationDisplay & 234cdf0e10cSrcweir o_rDisplay ) const; 235cdf0e10cSrcweir }; 236cdf0e10cSrcweir 237cdf0e10cSrcweir class DT_SeeAlsoAtTag : public DT_AtTag 238cdf0e10cSrcweir { 239cdf0e10cSrcweir public: DT_SeeAlsoAtTag()240cdf0e10cSrcweir DT_SeeAlsoAtTag() : DT_AtTag("") {} 241cdf0e10cSrcweir virtual ~DT_SeeAlsoAtTag(); 242cdf0e10cSrcweir 243cdf0e10cSrcweir virtual void DisplayAt( 244cdf0e10cSrcweir DocumentationDisplay & 245cdf0e10cSrcweir o_rDisplay ) const; LinkText() const246cdf0e10cSrcweir const String & LinkText() const { return sTitle; } // Missbrauch von sTitle 247cdf0e10cSrcweir }; 248cdf0e10cSrcweir 249cdf0e10cSrcweir class DT_ParameterAtTag : public DT_AtTag 250cdf0e10cSrcweir { 251cdf0e10cSrcweir public: DT_ParameterAtTag()252cdf0e10cSrcweir DT_ParameterAtTag() : DT_AtTag("") {} 253cdf0e10cSrcweir virtual ~DT_ParameterAtTag(); 254cdf0e10cSrcweir 255cdf0e10cSrcweir void SetTitle( 256cdf0e10cSrcweir const char * i_sTitle ); 257cdf0e10cSrcweir virtual void DisplayAt( 258cdf0e10cSrcweir DocumentationDisplay & 259cdf0e10cSrcweir o_rDisplay ) const; 260cdf0e10cSrcweir }; 261cdf0e10cSrcweir 262cdf0e10cSrcweir class DT_SinceAtTag : public DT_AtTag 263cdf0e10cSrcweir { 264cdf0e10cSrcweir public: DT_SinceAtTag()265cdf0e10cSrcweir DT_SinceAtTag() : DT_AtTag("Since version") {} 266cdf0e10cSrcweir virtual ~DT_SinceAtTag(); 267cdf0e10cSrcweir 268cdf0e10cSrcweir virtual void DisplayAt( 269cdf0e10cSrcweir DocumentationDisplay & 270cdf0e10cSrcweir o_rDisplay ) const; 271cdf0e10cSrcweir }; 272cdf0e10cSrcweir 273cdf0e10cSrcweir 274cdf0e10cSrcweir } // namespace dsapi 275cdf0e10cSrcweir } // namespace csi 276cdf0e10cSrcweir 277cdf0e10cSrcweir #endif 278cdf0e10cSrcweir 279