xref: /trunk/main/autodoc/inc/ary/idl/i_ce.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_IDL_I_CE_HXX
29 #define ARY_IDL_I_CE_HXX
30 
31 // BASE CLASSES
32 #include <ary/entity.hxx>
33 // USED SERVICES
34 #include <ary/doc/d_docu.hxx>
35 #include <ary/idl/i_ce2s.hxx>
36 #include <ary/idl/i_types4idl.hxx>
37 
38 
39 
40 
41 
42 
43 namespace ary
44 {
45 namespace idl
46 {
47 
48 
49 /** @resp Base class for all IDL code entities.
50 
51     A @->CodeEntity is a namespace, type, data or function, which occures in
52     the parsed UNO IDL code and is described and/or commented within the
53     Autodoc repository.
54 
55     This is a storage base class, where more special classes are
56     derived from.
57 */
58 class CodeEntity : public ary::Entity
59 {
60   public:
61     // LIFECYCLE
62     virtual             ~CodeEntity();
63 
64     // OPERATION
65 
66     // INQUIRY
67     Ce_id               CeId() const            { return Ce_id(Id()); }
68     const String &      LocalName() const;
69     Ce_id               NameRoom() const;
70     Ce_id               Owner() const;
71     E_SightLevel        SightLevel() const;
72 
73     const ary::doc::Documentation &
74                         Docu() const;
75     const Ce_2s &       Secondaries() const;
76 
77     static const CodeEntity &
78                         Null_();
79     // ACCESS
80     void                Set_Docu(
81                             DYN ary::doc::Node &
82                                                 pass_data );
83     Ce_2s &             Secondaries();
84 
85   protected:
86                         CodeEntity();
87   private:
88     // Locals
89     virtual const String &  inq_LocalName() const = 0;
90     virtual Ce_id           inq_NameRoom() const = 0;
91     virtual Ce_id           inq_Owner() const = 0;
92     virtual E_SightLevel    inq_SightLevel() const = 0;
93 
94     // DATA
95 	ary::doc::Documentation
96 	                    aDocu;
97     Dyn<Ce_2s>          p2s;
98 };
99 
100 
101 
102 
103 // IMPLEMENTATION
104 inline const String &
105 CodeEntity::LocalName() const
106     { return inq_LocalName(); }
107 
108 inline Ce_id
109 CodeEntity::NameRoom() const
110     { return inq_NameRoom(); }
111 
112 inline Ce_id
113 CodeEntity::Owner() const
114     { return inq_Owner(); }
115 
116 inline E_SightLevel
117 CodeEntity::SightLevel() const
118     { return inq_SightLevel(); }
119 
120 inline const ary::doc::Documentation &
121 CodeEntity::Docu() const
122     { return aDocu; }
123 
124 inline void
125 CodeEntity::Set_Docu(DYN ary::doc::Node & pass_data)
126 {
127     aDocu.Set_Data(pass_data);
128 }
129 
130 
131 
132 
133 }   // namespace idl
134 }   // namespace ary
135 #endif
136