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: helperdecl.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 ************************************************************************/
30 #include <comphelper/servicedecl.hxx>
31 #include <ooo/vba/XHelperInterface.hpp>
33 namespace comphelper
{
34 namespace service_decl
{
35 template <typename ImplT_
, typename WithArgsT
= with_args
<false> >
36 struct vba_service_class_
: public serviceimpl_base
< detail::OwnServiceImpl
<ImplT_
>, WithArgsT
>
38 typedef serviceimpl_base
< detail::OwnServiceImpl
<ImplT_
>, WithArgsT
> baseT
;
39 /** Default ctor. Implementation class without args, expecting
40 component context as single argument.
42 vba_service_class_() : baseT() {}
43 template <typename PostProcessFuncT
>
44 /** Ctor to pass a post processing function/functor.
46 @tpl PostProcessDefaultT let your compiler deduce this
47 @param postProcessFunc function/functor that gets the yet unacquired
48 ImplT_ pointer returning a
49 uno::Reference<uno::XInterface>
51 explicit vba_service_class_( PostProcessFuncT
const& postProcessFunc
) : baseT( postProcessFunc
) {}
54 } // namespace service_decl
55 } // namespace comphelper