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