Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef ARY_DOC_D_OLDIDLDOCU_HXX
21 : #define ARY_DOC_D_OLDIDLDOCU_HXX
22 :
23 : // BASE CLASSES
24 : #include <ary/doc/d_node.hxx>
25 : // USED SERVICES
26 : #include <ary_i/ci_text2.hxx>
27 :
28 :
29 :
30 :
31 : namespace ary
32 : {
33 : namespace inf
34 : {
35 : class AtTag2;
36 : class DocuToken;
37 : class DocuTex2;
38 : }
39 : namespace doc
40 : {
41 : using ::ary::inf::AtTag2;
42 : using ::ary::inf::DocuToken;
43 : using ::ary::inf::DocuTex2;
44 :
45 :
46 :
47 : /** Wrapper for the old idl documentation format.
48 : */
49 : class OldIdlDocu : public Node
50 : {
51 : public:
52 : OldIdlDocu();
53 : ~OldIdlDocu();
54 :
55 488856 : void AddToken2Short(
56 : DYN DocuToken & let_drToken )
57 488856 : { aShort.AddToken(let_drToken); }
58 458076 : void AddToken2Description(
59 : DYN DocuToken & let_drToken )
60 458076 : { aDescription.AddToken(let_drToken); }
61 : void AddToken2DeprecatedText(
62 : DYN DocuToken & let_drToken );
63 12344 : void AddAtTag(
64 : DYN AtTag2 & let_drAtTag )
65 12344 : { aTags.push_back(&let_drAtTag); }
66 3018 : void SetPublished() { bIsPublished = true; }
67 270 : void SetDeprecated() { bIsDeprecated = true; }
68 1436 : void SetOptional() { bIsOptional = true; }
69 : void SetExternShort(
70 : const DocuTex2 & i_pExternShort )
71 : { pExternShort = &i_pExternShort; }
72 :
73 56126 : const DocuTex2 & Short() const { return pExternShort != 0 ? *pExternShort : aShort; }
74 23689 : const DocuTex2 & Description() const { return aDescription; }
75 110 : const DocuTex2 & DeprecatedText() const { return aDeprecatedText; }
76 : const std::vector< AtTag2* > &
77 47465 : Tags() const { return aTags; }
78 5520 : bool IsPublished() const { return bIsPublished; }
79 42287 : bool IsDeprecated() const { return bIsDeprecated; }
80 37842 : bool IsOptional() const { return bIsOptional; }
81 :
82 : private:
83 : // Interface csv::ConstProcessorClient:
84 : virtual void do_Accept(
85 : csv::ProcessorIfc & io_processor ) const;
86 : // DATA
87 : DocuTex2 aShort;
88 : DocuTex2 aDescription;
89 : DocuTex2 aDeprecatedText;
90 : std::vector< AtTag2* >
91 : aTags;
92 : const DocuTex2 * pExternShort;
93 : bool bIsPublished;
94 : bool bIsDeprecated;
95 : bool bIsOptional;
96 : };
97 :
98 :
99 :
100 :
101 : } // namespace doc
102 : } // namespace ary
103 : #endif
104 :
105 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|