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 _DBA_COREDATAACCESS_COMMANDCONTAINER_HXX_
29 #define _DBA_COREDATAACCESS_COMMANDCONTAINER_HXX_
30 
31 #ifndef _DBA_CORE_DEFINITIONCONTAINER_HXX_
32 #include "definitioncontainer.hxx"
33 #endif
34 
35 #ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_
36 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
37 #endif
38 
39 #ifndef _CPPUHELPER_IMPLBASE1_HXX_
40 #include <cppuhelper/implbase1.hxx>
41 #endif
42 
43 //........................................................................
44 namespace dbaccess
45 {
46 //........................................................................
47 //==========================================================================
48 //= OCommandContainer
49 //==========================================================================
50 
51 typedef ::cppu::ImplHelper1 <   ::com::sun::star::lang::XSingleServiceFactory
52                             >   OCommandContainer_BASE;
53 
54 class OCommandContainer	: public ODefinitionContainer
55 						 ,public OCommandContainer_BASE
56 {
57 	sal_Bool m_bTables;
58 
59 public:
60 	/** constructs the container.<BR>
61 	*/
62 	OCommandContainer(
63 		 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB
64 		,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >&	_xParentContainer
65 		,const TContentPtr& _pImpl
66 		,sal_Bool _bTables
67 		);
68 
69 	DECLARE_XINTERFACE( )
70 	DECLARE_TYPEPROVIDER( );
71 
72 	// XSingleServiceFactory
73     virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance( ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
74 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
75 
76 protected:
77 	virtual ~OCommandContainer();
78 
79     // ODefinitionContainer
80 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent > createObject(const ::rtl::OUString& _rName);
81 
82 protected:
83     // OContentHelper overridables
84     virtual ::rtl::OUString determineContentType() const;
85 };
86 
87 //........................................................................
88 }	// namespace dbaccess
89 //........................................................................
90 
91 #endif // _DBA_COREDATAACCESS_COMMANDCONTAINER_HXX_
92 
93 
94