merge the formfield patch from ooo-build
[ooovba.git] / configmgr / source / api2 / setobjects.hxx
blobb1272b4e6b0a89f5d3aaf77f1f750fc1ef6a04ca
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: setobjects.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_SETOBJECTS_HXX_
32 #define CONFIGMGR_API_SETOBJECTS_HXX_
34 #include "setaccess.hxx"
35 #include "setupdate.hxx"
36 #include "elementaccess.hxx"
38 #include "apiaccessobj.hxx"
40 //........................................................................
41 namespace configmgr
43 //........................................................................
45 //==========================================================================
46 //= Inner Set Instances
47 //==========================================================================
49 /** read-only access class for configuration nodes which are inner nodes and dynamic sets
51 class OInnerSetInfo
52 : public BasicInnerElement
53 , public BasicSetAccess
55 public:
56 // Construction/Destruction
57 OInnerSetInfo(configapi::ApiTreeImpl& rTree, configuration::NodeRef const& aNode)
58 : m_aAccessElement(static_cast<css::container::XChild*>(this),rTree,aNode)
62 // XInterface refcounting
63 void SAL_CALL acquire( ) throw ();
64 void SAL_CALL release( ) throw ();
66 // XInterface joining
67 uno::Any SAL_CALL queryInterface( uno::Type const& rType ) throw (uno::RuntimeException );
69 // XTypeProvider joining
70 uno::Sequence< uno::Type > SAL_CALL getTypes( ) throw (uno::RuntimeException );
71 uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (uno::RuntimeException );
73 // Base class implementation
74 virtual configapi::NodeAccess& getNodeAccess();
75 virtual configapi::NodeSetInfoAccess& getNode();
76 virtual configapi::InnerElement& getElementClass();
77 private:
78 configapi::OInnerElement<configapi::NodeSetInfoAccess> m_aAccessElement;
81 /** updating access class for configuration nodes which are inner nodes and dynamic sets of complex types (trees)
83 class OInnerTreeSetUpdate
84 : public BasicInnerElement
85 , public BasicSet
87 public:
88 // Construction/Destruction
89 OInnerTreeSetUpdate(configapi::ApiTreeImpl& rTree, configuration::NodeRef const& aNode)
90 : m_aAccessElement(static_cast<css::container::XChild*>(this),rTree,aNode)
94 // XInterface refcounting
95 void SAL_CALL acquire( ) throw ();
96 void SAL_CALL release( ) throw ();
98 // XInterface joining
99 uno::Any SAL_CALL queryInterface( uno::Type const& rType ) throw (uno::RuntimeException );
101 // XTypeProvider joining
102 uno::Sequence< uno::Type > SAL_CALL getTypes( ) throw (uno::RuntimeException );
103 uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (uno::RuntimeException );
105 // Base class implementation
106 virtual configapi::NodeAccess& getNodeAccess();
107 virtual configapi::NodeSetInfoAccess& getNode();
108 virtual configapi::NodeTreeSetAccess* maybeGetUpdateAccess();
109 virtual configapi::InnerElement& getElementClass();
110 private:
111 configapi::OInnerElement<configapi::NodeTreeSetAccess> m_aAccessElement;
115 /** update access class for configuration nodes which are inner nodes and dynamic sets of simple types (values)
117 class OInnerValueSetUpdate
118 : public BasicInnerElement
119 , public BasicValueSet
121 public:
122 // Construction/Destruction
123 OInnerValueSetUpdate(configapi::ApiTreeImpl& rTree, configuration::NodeRef const& aNode)
124 : m_aAccessElement(static_cast<css::container::XChild*>(this),rTree,aNode)
128 // XInterface refcounting
129 void SAL_CALL acquire( ) throw ();
130 void SAL_CALL release( ) throw ();
132 // XInterface joining
133 uno::Any SAL_CALL queryInterface( uno::Type const& rType ) throw (uno::RuntimeException );
135 // XTypeProvider joining
136 uno::Sequence< uno::Type > SAL_CALL getTypes( ) throw (uno::RuntimeException );
137 uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (uno::RuntimeException );
139 // Base class implementation
140 virtual configapi::NodeAccess& getNodeAccess();
141 virtual configapi::NodeSetInfoAccess& getNode();
142 virtual configapi::NodeValueSetAccess* maybeGetUpdateAccess();
143 virtual configapi::InnerElement& getElementClass();
144 private:
145 configapi::OInnerElement<configapi::NodeValueSetAccess> m_aAccessElement;
148 //==========================================================================
149 //= Set Element Set Instances
150 //==========================================================================
152 /** read-only access class for configuration nodes which are set elements and dynamic sets
154 class OSetElementSetInfo
155 : public BasicSetElement
156 , public BasicSetAccess
158 public:
159 // Construction/Destruction
160 OSetElementSetInfo(rtl::Reference< configuration::Tree > const& aTree, configapi::ApiProvider& rProvider, configapi::ApiTreeImpl* pParentTree = 0)
161 : m_aAccessElement(static_cast<css::container::XChild*>(this),aTree,rProvider,pParentTree)
165 // XInterface refcounting
166 void SAL_CALL acquire( ) throw ();
167 void SAL_CALL release( ) throw ();
169 // XInterface joining
170 uno::Any SAL_CALL queryInterface( uno::Type const& rType ) throw (uno::RuntimeException );
172 // XTypeProvider joining
173 uno::Sequence< uno::Type > SAL_CALL getTypes( ) throw (uno::RuntimeException );
174 uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (uno::RuntimeException );
176 // Base class implementation
177 virtual configapi::NodeAccess& getNodeAccess();
178 virtual configapi::NodeSetInfoAccess& getNode();
179 virtual configapi::SetElement& getElementClass();
180 private:
181 configapi::OSetElement<configapi::NodeSetInfoAccess> m_aAccessElement;
184 /** updating access class for configuration nodes which are set elements and dynamic sets of complex types (trees)
186 class OSetElementTreeSetUpdate
187 : public BasicSetElement
188 , public BasicSet
190 public:
191 // Construction/Destruction
192 OSetElementTreeSetUpdate(rtl::Reference< configuration::Tree > const& aTree, configapi::ApiProvider& rProvider, configapi::ApiTreeImpl* pParentTree = 0)
193 : m_aAccessElement(static_cast<css::container::XChild*>(this),aTree,rProvider,pParentTree)
197 // XInterface refcounting
198 void SAL_CALL acquire( ) throw ();
199 void SAL_CALL release( ) throw ();
201 // XInterface joining
202 uno::Any SAL_CALL queryInterface( uno::Type const& rType ) throw (uno::RuntimeException );
204 // XTypeProvider joining
205 uno::Sequence< uno::Type > SAL_CALL getTypes( ) throw (uno::RuntimeException );
206 uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (uno::RuntimeException );
208 // Base class implementation
209 virtual configapi::NodeAccess& getNodeAccess();
210 virtual configapi::NodeSetInfoAccess& getNode();
211 virtual configapi::NodeTreeSetAccess* maybeGetUpdateAccess();
212 virtual configapi::SetElement& getElementClass();
213 private:
214 configapi::OSetElement<configapi::NodeTreeSetAccess> m_aAccessElement;
218 /** update access class for configuration nodes which are set elements and dynamic sets of simple types (values)
220 class OSetElementValueSetUpdate
221 : public BasicSetElement
222 , public BasicValueSet
224 public:
225 // Construction/Destruction
226 OSetElementValueSetUpdate(rtl::Reference< configuration::Tree > const& aTree, configapi::ApiProvider& rProvider, configapi::ApiTreeImpl* pParentTree = 0)
227 : m_aAccessElement(static_cast<css::container::XChild*>(this),aTree,rProvider,pParentTree)
231 // XInterface refcounting
232 void SAL_CALL acquire( ) throw ();
233 void SAL_CALL release( ) throw ();
235 // XInterface joining
236 uno::Any SAL_CALL queryInterface( uno::Type const& rType ) throw (uno::RuntimeException );
238 // XTypeProvider joining
239 uno::Sequence< uno::Type > SAL_CALL getTypes( ) throw (uno::RuntimeException );
240 uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (uno::RuntimeException );
242 // Base class implementation
243 virtual configapi::NodeAccess& getNodeAccess();
244 virtual configapi::NodeSetInfoAccess& getNode();
245 virtual configapi::NodeValueSetAccess* maybeGetUpdateAccess();
246 virtual configapi::SetElement& getElementClass();
247 private:
248 configapi::OSetElement<configapi::NodeValueSetAccess> m_aAccessElement;
251 //==========================================================================
252 //= Root Element Set Instances
253 //==========================================================================
255 /** read-only access class for configuration nodes which are root nodes and dynamic sets
257 class ORootElementSetInfo
258 : public BasicRootElement
259 , public BasicSetAccess
261 public:
262 // Construction/Destruction
263 ORootElementSetInfo(configapi::ApiProvider& rProvider, rtl::Reference< configuration::Tree > const& aTree, vos::ORef< OOptions >const& _xOptions)
264 : m_aAccessElement(static_cast<css::lang::XComponent*>(this),rProvider,aTree,_xOptions)
268 // XInterface refcounting
269 void SAL_CALL acquire( ) throw ();
270 void SAL_CALL release( ) throw ();
272 // XInterface joining
273 uno::Any SAL_CALL queryInterface( uno::Type const& rType ) throw (uno::RuntimeException );
275 // XTypeProvider joining
276 uno::Sequence< uno::Type > SAL_CALL getTypes( ) throw (uno::RuntimeException );
277 uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (uno::RuntimeException );
279 // Base class implementation
280 virtual configapi::NodeAccess& getNodeAccess();
281 virtual configapi::NodeSetInfoAccess& getNode();
282 virtual configapi::RootElement& getElementClass();
283 private:
284 configapi::OReadRootElement<configapi::NodeSetInfoAccess> m_aAccessElement;
287 /** updating access class for configuration nodes which are root nodes and dynamic sets of complex types (trees)
289 class ORootElementTreeSetUpdate
290 : public BasicUpdateElement
291 , public BasicSet
293 public:
294 // Construction/Destruction
295 ORootElementTreeSetUpdate(configapi::ApiProvider& rProvider, rtl::Reference< configuration::Tree > const& aTree, vos::ORef< OOptions >const& _xOptions)
296 : m_aAccessElement(static_cast<css::lang::XComponent*>(this),rProvider,aTree, _xOptions)
300 // XInterface refcounting
301 void SAL_CALL acquire( ) throw ();
302 void SAL_CALL release( ) throw ();
304 // XInterface joining
305 uno::Any SAL_CALL queryInterface( uno::Type const& rType ) throw (uno::RuntimeException );
307 // XTypeProvider joining
308 uno::Sequence< uno::Type > SAL_CALL getTypes( ) throw (uno::RuntimeException );
309 uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (uno::RuntimeException );
311 // Base class implementation
312 virtual configapi::NodeAccess& getNodeAccess();
313 virtual configapi::NodeSetInfoAccess& getNode();
314 virtual configapi::NodeTreeSetAccess* maybeGetUpdateAccess();
315 virtual configapi::UpdateRootElement& getElementClass();
316 private:
317 configapi::OUpdateRootElement<configapi::NodeTreeSetAccess> m_aAccessElement;
321 /** update access class for configuration nodes which are root nodes and dynamic sets of simple types (values)
323 class ORootElementValueSetUpdate
324 : public BasicUpdateElement
325 , public BasicValueSet
327 public:
328 // Construction/Destruction
329 ORootElementValueSetUpdate(configapi::ApiProvider& rProvider, rtl::Reference< configuration::Tree > const& aTree, vos::ORef< OOptions >const& _xOptions)
330 : m_aAccessElement(static_cast<css::lang::XComponent*>(this),rProvider,aTree,_xOptions)
334 // XInterface refcounting
335 void SAL_CALL acquire( ) throw ();
336 void SAL_CALL release( ) throw ();
338 // XInterface joining
339 uno::Any SAL_CALL queryInterface( uno::Type const& rType ) throw (uno::RuntimeException );
341 // XTypeProvider joining
342 uno::Sequence< uno::Type > SAL_CALL getTypes( ) throw (uno::RuntimeException );
343 uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (uno::RuntimeException );
345 // Base class implementation
346 virtual configapi::NodeAccess& getNodeAccess();
347 virtual configapi::NodeSetInfoAccess& getNode();
348 virtual configapi::NodeValueSetAccess* maybeGetUpdateAccess();
349 virtual configapi::UpdateRootElement& getElementClass();
350 private:
351 configapi::OUpdateRootElement<configapi::NodeValueSetAccess> m_aAccessElement;
355 //........................................................................
356 } // namespace configmgr
357 //........................................................................
359 #endif // CONFIGMGR_API_SETOBJECTS_HXX_