xref: /aoo4110/main/autodoc/inc/ary/info/ci_attag.hxx (revision b1cdbd2c)
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 ARY_INFO_CI_ATTAG_HXX
25 #define ARY_INFO_CI_ATTAG_HXX
26 
27 
28 
29 // USED SERVICES
30 	// BASE CLASSES
31 	// COMPONENTS
32 	// PARAMETERS
33 
34 
35 
36 namespace ary
37 {
38 namespace info
39 {
40 
41 class DocuText;
42 class DocuDisplay;
43 
44 class AtTag
45 {
46   public:
~AtTag()47 	virtual				~AtTag() {}
48 
49     void                Set_HtmlUseInDocuText(
50                             bool                i_bUseIt );
51 	virtual bool	  	Add_SpecialMeaningToken(    /// @return false, if token was not sp�ecial.
52 							const char *		i_sText,
53 							intt				i_nNr ) = 0;
54 	virtual void		Add_Token(
55 							const char *		i_sText );
56 	virtual void		Add_PotentialLink(
57 							const char *		i_sText,
58                             bool                i_bIsGlobal,
59                             bool                i_bIsFunction );
60 	virtual void		Add_Whitespace(
61 							UINT8               i_nLength );
62 	virtual void		Add_Eol();
63 
64 	virtual UINT8		NrOfSpecialMeaningTokens() const = 0;
65 	virtual AtTag *		GetFollower() = 0;
66 
67     void                StoreAt(
68                             DocuDisplay &       o_rDisplay ) const;
69 	const DocuText &    CText() const;
70 
71   private:
72     virtual void        do_StoreAt(
73                             DocuDisplay &       o_rDisplay ) const;   // later becoming abstract
74 
75 	virtual DocuText *  Text() = 0;
76 };
77 
78 
79 
80 // IMPLEMENTATION
81 
82 inline void
StoreAt(DocuDisplay & o_rDisplay) const83 AtTag::StoreAt( DocuDisplay & o_rDisplay ) const
84     { do_StoreAt(o_rDisplay); }
85 inline const DocuText &
CText() const86 AtTag::CText() const
87     { DocuText * ret = const_cast< AtTag* >(this)->Text();
88       csv_assert( ret != 0 );
89       return *ret;
90     }
91 
92 
93 }
94 }
95 
96 #endif
97 
98