1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: containerapprove.hxx,v $
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 DBACCESS_CONTAINERAPPROVE_HXX
32 #define DBACCESS_CONTAINERAPPROVE_HXX
34 /** === begin UNO includes === **/
35 #ifndef _COM_SUN_STAR_UNO_XINTERFACE_HPP_
36 #include <com/sun/star/uno/XInterface.hpp>
38 /** === end UNO includes === **/
40 #include <boost/shared_ptr.hpp>
42 //........................................................................
45 //........................................................................
47 //====================================================================
49 //====================================================================
50 /** interface for approving elements to be inserted into a container
52 On the long run, one could imagine that this interface completely encapsulates
53 container/element approvals in all our various container classes herein (document
54 containers, definition containers, table containers, query containers,
55 command definition containers, bookmark containers). This would decrease coupling
56 of the respective classes.
58 class SAL_NO_VTABLE IContainerApprove
61 /** approves a given element for insertion into the container
63 specifies the name under which the element is going to be inserted
65 specifies the element which is going to be inserted
67 if the name or the object are invalid, or not eligible for insertion
70 virtual void SAL_CALL
approveElement(
71 const ::rtl::OUString
& _rName
,
72 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
>& _rxElement
76 typedef ::boost::shared_ptr
< IContainerApprove
> PContainerApprove
;
78 //........................................................................
79 } // namespace dbaccess
80 //........................................................................
82 #endif // DBACCESS_CONTAINERAPPROVE_HXX