Update ooo320-m1
[ooovba.git] / configmgr / source / api2 / groupobjects.hxx
blob321b0a2cff9de284428fce6764c24464d48e698b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: groupobjects.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef CONFIGMGR_API_GROUPOBJECTS_HXX_
32 #define CONFIGMGR_API_GROUPOBJECTS_HXX_
34 #include "groupaccess.hxx"
35 #include "groupupdate.hxx"
36 #include "propertysetaccess.hxx"
37 #include "elementaccess.hxx"
39 #include "apiaccessobj.hxx"
41 //........................................................................
42 namespace configmgr
44 //........................................................................
46 //==========================================================================
47 //= Inner Group Instances
48 //==========================================================================
50 /** read-only access class for configuration nodes which are inner nodes and groups of other nodes
52 class OInnerGroupInfo
53 : public BasicInnerElement
54 , public BasicGroupAccess
55 , public BasicPropertySet
57 public:
58 // Construction/Destruction
59 OInnerGroupInfo(configapi::ApiTreeImpl& rTree, configuration::NodeRef const& aNode)
60 : m_aAccessElement(static_cast<css::container::XChild*>(this),rTree,aNode)
64 // XInterface refcounting
65 void SAL_CALL acquire( ) throw ();
66 void SAL_CALL release( ) throw ();
68 // XInterface joining
69 uno::Any SAL_CALL queryInterface( uno::Type const& rType ) throw (uno::RuntimeException );
71 // XTypeProvider joining
72 uno::Sequence< uno::Type > SAL_CALL getTypes( ) throw (uno::RuntimeException );
73 uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (uno::RuntimeException );
75 // Base class implementation
76 virtual configapi::NodeAccess& getNodeAccess();
77 virtual configapi::NodeGroupInfoAccess& getNode();
78 virtual configapi::NodeGroupAccess* maybeGetUpdateAccess();
79 virtual configapi::InnerElement& getElementClass();
80 private:
81 configapi::OInnerElement<configapi::NodeGroupInfoAccess> m_aAccessElement;
84 /** updating access class for configuration nodes which are inner nodes and groups of other nodes
86 class OInnerGroupUpdate
87 : public BasicInnerElement
88 , public BasicGroup
89 , public BasicPropertySet
91 public:
92 // Construction/Destruction
93 OInnerGroupUpdate(configapi::ApiTreeImpl& rTree, configuration::NodeRef const& aNode)
94 : m_aAccessElement(static_cast<css::container::XChild*>(this),rTree,aNode)
98 // XInterface refcounting
99 void SAL_CALL acquire( ) throw ();
100 void SAL_CALL release( ) throw ();
102 // XInterface joining
103 uno::Any SAL_CALL queryInterface( uno::Type const& rType ) throw (uno::RuntimeException );
105 // XTypeProvider joining
106 uno::Sequence< uno::Type > SAL_CALL getTypes( ) throw (uno::RuntimeException );
107 uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (uno::RuntimeException );
109 // Base class implementation
110 virtual configapi::NodeAccess& getNodeAccess();
111 virtual configapi::NodeGroupInfoAccess& getNode();
112 virtual configapi::NodeGroupAccess* maybeGetUpdateAccess();
113 virtual configapi::InnerElement& getElementClass();
114 private:
115 configapi::OInnerElement<configapi::NodeGroupAccess> m_aAccessElement;
119 //==========================================================================
120 //= Set Element Group Instances
121 //==========================================================================
123 /** read-only access class for configuration nodes which are set elements and groups of other nodes
125 class OSetElementGroupInfo
126 : public BasicSetElement
127 , public BasicGroupAccess
128 , public BasicPropertySet
130 public:
131 // Construction/Destruction
132 OSetElementGroupInfo(rtl::Reference< configuration::Tree > const& aTree, configapi::ApiProvider& rProvider, configapi::ApiTreeImpl* pParentTree = 0)
133 : m_aAccessElement(static_cast<css::container::XChild*>(this),aTree,rProvider,pParentTree)
137 // XInterface refcounting
138 void SAL_CALL acquire( ) throw ();
139 void SAL_CALL release( ) throw ();
141 // XInterface joining
142 uno::Any SAL_CALL queryInterface( uno::Type const& rType ) throw (uno::RuntimeException );
144 // XTypeProvider joining
145 uno::Sequence< uno::Type > SAL_CALL getTypes( ) throw (uno::RuntimeException );
146 uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (uno::RuntimeException );
148 // Base class implementation
149 virtual configapi::NodeAccess& getNodeAccess();
150 virtual configapi::NodeGroupInfoAccess& getNode();
151 virtual configapi::NodeGroupAccess* maybeGetUpdateAccess();
152 virtual configapi::SetElement& getElementClass();
153 private:
154 configapi::OSetElement<configapi::NodeGroupInfoAccess> m_aAccessElement;
157 /** updating access class for configuration nodes which are set elements and groups of other nodes
159 class OSetElementGroupUpdate
160 : public BasicSetElement
161 , public BasicGroup
162 , public BasicPropertySet
164 public:
165 // Construction/Destruction
166 OSetElementGroupUpdate(rtl::Reference< configuration::Tree > const& aTree, configapi::ApiProvider& rProvider, configapi::ApiTreeImpl* pParentTree = 0)
167 : m_aAccessElement(static_cast<css::container::XChild*>(this),aTree,rProvider,pParentTree)
171 // XInterface refcounting
172 void SAL_CALL acquire( ) throw ();
173 void SAL_CALL release( ) throw ();
175 // XInterface joining
176 uno::Any SAL_CALL queryInterface( uno::Type const& rType ) throw (uno::RuntimeException );
178 // XTypeProvider joining
179 uno::Sequence< uno::Type > SAL_CALL getTypes( ) throw (uno::RuntimeException );
180 uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (uno::RuntimeException );
182 // Base class implementation
183 virtual configapi::NodeAccess& getNodeAccess();
184 virtual configapi::NodeGroupInfoAccess& getNode();
185 virtual configapi::NodeGroupAccess* maybeGetUpdateAccess();
186 virtual configapi::SetElement& getElementClass();
187 private:
188 configapi::OSetElement<configapi::NodeGroupAccess> m_aAccessElement;
192 //==========================================================================
193 //= Root Element Set Instances
194 //==========================================================================
196 /** read-only access class for configuration nodes which are root nodes and groups of other nodes
198 class ORootElementGroupInfo
199 : public BasicRootElement
200 , public BasicGroupAccess
201 , public BasicPropertySet
203 public:
204 // Construction/Destruction
205 ORootElementGroupInfo(configapi::ApiProvider& rProvider, rtl::Reference< configuration::Tree > const& aTree, vos::ORef< OOptions >const& _xOptions)
206 : m_aAccessElement(static_cast<css::lang::XComponent*>(this),rProvider,aTree, _xOptions)
210 // XInterface refcounting
211 void SAL_CALL acquire( ) throw ();
212 void SAL_CALL release( ) throw ();
214 // XInterface joining
215 uno::Any SAL_CALL queryInterface( uno::Type const& rType ) throw (uno::RuntimeException );
217 // XTypeProvider joining
218 uno::Sequence< uno::Type > SAL_CALL getTypes( ) throw (uno::RuntimeException );
219 uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (uno::RuntimeException );
221 // Base class implementation
222 virtual configapi::NodeAccess& getNodeAccess();
223 virtual configapi::NodeGroupInfoAccess& getNode();
224 virtual configapi::NodeGroupAccess* maybeGetUpdateAccess();
225 virtual configapi::RootElement& getElementClass();
226 private:
227 configapi::OReadRootElement<configapi::NodeGroupInfoAccess> m_aAccessElement;
230 /** updating access class for configuration nodes which are root nodes and groups of other nodes
232 class ORootElementGroupUpdate
233 : public BasicUpdateElement
234 , public BasicGroup
235 , public BasicPropertySet
237 public:
238 // Construction/Destruction
239 ORootElementGroupUpdate(configapi::ApiProvider& rProvider, rtl::Reference< configuration::Tree > const& aTree, vos::ORef< OOptions >const& _xOptions)
240 : m_aAccessElement(static_cast<css::lang::XComponent*>(this),rProvider,aTree, _xOptions)
244 // XInterface refcounting
245 void SAL_CALL acquire( ) throw ();
246 void SAL_CALL release( ) throw ();
248 // XInterface joining
249 uno::Any SAL_CALL queryInterface( uno::Type const& rType ) throw (uno::RuntimeException );
251 // XTypeProvider joining
252 uno::Sequence< uno::Type > SAL_CALL getTypes( ) throw (uno::RuntimeException );
253 uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (uno::RuntimeException );
255 // Base class implementation
256 virtual configapi::NodeAccess& getNodeAccess();
257 virtual configapi::NodeGroupInfoAccess& getNode();
258 virtual configapi::NodeGroupAccess* maybeGetUpdateAccess();
259 virtual configapi::UpdateRootElement& getElementClass();
260 private:
261 configapi::OUpdateRootElement<configapi::NodeGroupAccess> m_aAccessElement;
265 //........................................................................
266 } // namespace configmgr
267 //........................................................................
269 #endif // CONFIGMGR_API_GROUPOBJECTS_HXX_