merge the formfield patch from ooo-build
[ooovba.git] / autodoc / inc / ary / doc / d_oldidldocu.hxx
blob11de57a1029a5bfd076b61ceb29853271703a4a4
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: d_oldidldocu.hxx,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef ARY_DOC_D_OLDIDLDOCU_HXX
32 #define ARY_DOC_D_OLDIDLDOCU_HXX
34 // BASE CLASSES
35 #include <ary/doc/d_node.hxx>
36 // USED SERVICES
37 #include <ary_i/ci_text2.hxx>
42 namespace ary
44 namespace inf
46 class AtTag2;
47 class DocuToken;
48 class DocuTex2;
50 namespace doc
52 using ::ary::inf::AtTag2;
53 using ::ary::inf::DocuToken;
54 using ::ary::inf::DocuTex2;
58 /** Wrapper for the old idl documentation format.
60 class OldIdlDocu : public Node
62 public:
63 OldIdlDocu();
64 ~OldIdlDocu();
66 void AddToken2Short(
67 DYN DocuToken & let_drToken )
68 { aShort.AddToken(let_drToken); }
69 void AddToken2Description(
70 DYN DocuToken & let_drToken )
71 { aDescription.AddToken(let_drToken); }
72 void AddToken2DeprecatedText(
73 DYN DocuToken & let_drToken );
74 void AddAtTag(
75 DYN AtTag2 & let_drAtTag )
76 { aTags.push_back(&let_drAtTag); }
77 void SetPublished() { bIsPublished = true; }
78 void SetDeprecated() { bIsDeprecated = true; }
79 void SetOptional() { bIsOptional = true; }
80 void SetExternShort(
81 const DocuTex2 & i_pExternShort )
82 { pExternShort = &i_pExternShort; }
84 const DocuTex2 & Short() const { return pExternShort != 0 ? *pExternShort : aShort; }
85 const DocuTex2 & Description() const { return aDescription; }
86 const DocuTex2 & DeprecatedText() const { return aDeprecatedText; }
87 const std::vector< AtTag2* > &
88 Tags() const { return aTags; }
89 bool IsPublished() const { return bIsPublished; }
90 bool IsDeprecated() const { return bIsDeprecated; }
91 bool IsOptional() const { return bIsOptional; }
93 private:
94 // Interface csv::ConstProcessorClient:
95 virtual void do_Accept(
96 csv::ProcessorIfc & io_processor ) const;
97 // DATA
98 DocuTex2 aShort;
99 DocuTex2 aDescription;
100 DocuTex2 aDeprecatedText;
101 std::vector< AtTag2* >
102 aTags;
103 const DocuTex2 * pExternShort;
104 bool bIsPublished;
105 bool bIsDeprecated;
106 bool bIsOptional;
112 } // namespace doc
113 } // namespace ary
114 #endif