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