xref: /aoo42x/main/autodoc/inc/ary/doc/d_docu.hxx (revision 1c78a5d6)
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_DOCU_HXX
25 #define ARY_DOC_D_DOCU_HXX
26 
27 // BASE CLASSES
28 #include <cosv/tpl/processor.hxx>
29 
30 // USED SERVICES
31 #include <ary/doc/d_node.hxx>
32 
33 
34 
35 
36 namespace ary
37 {
38 namespace doc
39 {
40 
41 
42 /** Represents a documentation which is assigned to an Autodoc
43     repository entity.
44 */
45 class Documentation : public csv::ConstProcessorClient
46 {
47   public:
48                         Documentation();
49 	                    ~Documentation();
50     // OPERATIONS
51     void                Clear();
52 
53     // INQUIRY
54     const Node *        Data() const;
55 
56     // ACCESS
57     Node *              Data();
58     void                Set_Data(
59                             ary::doc::Node &    i_data );
60 
61   private:
62     // Interface csv::ConstProcessorClient:
63     virtual void        do_Accept(
64                             csv::ProcessorIfc & io_processor ) const;
65     // DATA
66     Dyn<Node>           pData;
67 };
68 
69 
70 
71 
72 // IMPLEMENTATION
73 inline void
Clear()74 Documentation::Clear()
75 {
76     pData = 0;
77 }
78 
79 inline const Node *
Data() const80 Documentation::Data() const
81 {
82     return pData.Ptr();
83 }
84 
85 inline Node *
Data()86 Documentation::Data()
87 {
88     return pData.Ptr();
89 }
90 
91 inline void
Set_Data(ary::doc::Node & i_data)92 Documentation::Set_Data(ary::doc::Node & i_data)
93 {
94     pData = &i_data;
95 }
96 
97 
98 
99 
100 }   // namespace doc
101 }   // namespace ary
102 #endif
103