xref: /trunk/main/autodoc/inc/ary/doc/d_oldidldocu.hxx (revision cdf0e10c)
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 ARY_DOC_D_OLDIDLDOCU_HXX
29 #define ARY_DOC_D_OLDIDLDOCU_HXX
30 
31 // BASE CLASSES
32 #include <ary/doc/d_node.hxx>
33 // USED SERVICES
34 #include <ary_i/ci_text2.hxx>
35 
36 
37 
38 
39 namespace ary
40 {
41 namespace inf
42 {
43     class AtTag2;
44     class DocuToken;
45     class DocuTex2;
46 }
47 namespace doc
48 {
49     using ::ary::inf::AtTag2;
50     using ::ary::inf::DocuToken;
51     using ::ary::inf::DocuTex2;
52 
53 
54 
55 /** Wrapper for the old idl documentation format.
56 */
57 class OldIdlDocu : public Node
58 {
59   public:
60                         OldIdlDocu();
61                         ~OldIdlDocu();
62 
63     void                AddToken2Short(
64                             DYN DocuToken &     let_drToken )
65                                                 { aShort.AddToken(let_drToken); }
66     void                AddToken2Description(
67                             DYN DocuToken &     let_drToken )
68                                                 { aDescription.AddToken(let_drToken); }
69     void                AddToken2DeprecatedText(
70                             DYN DocuToken &     let_drToken );
71     void                AddAtTag(
72                             DYN AtTag2 &        let_drAtTag )
73                                                 { aTags.push_back(&let_drAtTag); }
74     void                SetPublished()          { bIsPublished = true; }
75     void                SetDeprecated()         { bIsDeprecated = true; }
76     void                SetOptional()           { bIsOptional = true; }
77     void                SetExternShort(
78                             const DocuTex2 &    i_pExternShort )
79                                                 { pExternShort = &i_pExternShort; }
80 
81     const DocuTex2 &    Short() const           { return pExternShort != 0 ? *pExternShort : aShort; }
82     const DocuTex2 &    Description() const     { return aDescription; }
83     const DocuTex2 &    DeprecatedText() const  { return aDeprecatedText; }
84     const std::vector< AtTag2* > &
85                         Tags() const            { return aTags; }
86     bool                IsPublished() const     { return bIsPublished; }
87     bool                IsDeprecated() const    { return bIsDeprecated; }
88     bool                IsOptional() const      { return bIsOptional; }
89 
90   private:
91     // Interface csv::ConstProcessorClient:
92     virtual void        do_Accept(
93                             csv::ProcessorIfc & io_processor ) const;
94     // DATA
95     DocuTex2            aShort;
96     DocuTex2            aDescription;
97     DocuTex2            aDeprecatedText;
98     std::vector< AtTag2* >
99                         aTags;
100     const DocuTex2 *    pExternShort;
101     bool                bIsPublished;
102     bool                bIsDeprecated;
103     bool                bIsOptional;
104 };
105 
106 
107 
108 
109 }   // namespace doc
110 }   // namespace ary
111 #endif
112