xref: /aoo41x/main/sc/source/ui/vba/helperdecl.hxx (revision d16f1dca)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #include <comphelper/servicedecl.hxx>
24 #include <ooo/vba/XHelperInterface.hpp>
25 
26 namespace comphelper {
27 namespace service_decl {
28 template <typename ImplT_, typename WithArgsT = with_args<false> >
29 struct vba_service_class_ : public serviceimpl_base< vba_detail::OwnServiceImpl<ImplT_>, WithArgsT >
30 {
31     typedef serviceimpl_base< detail::OwnServiceImpl<ImplT_>, WithArgsT > baseT;
32     /** Default ctor.  Implementation class without args, expecting
33         component context as single argument.
34     */
vba_service_class_comphelper::service_decl::vba_service_class_35     vba_service_class_() : baseT() {}
36     template <typename PostProcessFuncT>
37     /** Ctor to pass a post processing function/functor.
38 
39         @tpl PostProcessDefaultT let your compiler deduce this
40         @param postProcessFunc function/functor that gets the yet unacquired
41                                ImplT_ pointer returning a
42                                uno::Reference<uno::XInterface>
43     */
vba_service_class_comphelper::service_decl::vba_service_class_44     explicit vba_service_class_( PostProcessFuncT const& postProcessFunc ) : baseT( postProcessFunc ) {}
45 };
46 
47 } // namespace service_decl
48 } // namespace comphelper
49 
50