xref: /AOO41X/main/cppuhelper/inc/cppuhelper/basemutex.hxx (revision 6da5f31158a7dd09f46f041b4f15bb7ae3eb92a4)
1*6da5f311SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*6da5f311SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*6da5f311SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*6da5f311SAndrew Rist  * distributed with this work for additional information
6*6da5f311SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*6da5f311SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*6da5f311SAndrew Rist  * "License"); you may not use this file except in compliance
9*6da5f311SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*6da5f311SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*6da5f311SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*6da5f311SAndrew Rist  * software distributed under the License is distributed on an
15*6da5f311SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*6da5f311SAndrew Rist  * KIND, either express or implied.  See the License for the
17*6da5f311SAndrew Rist  * specific language governing permissions and limitations
18*6da5f311SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*6da5f311SAndrew Rist  *************************************************************/
21*6da5f311SAndrew Rist 
22*6da5f311SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _CPPUHELPER_BASEMUTEX_HXX_
25cdf0e10cSrcweir #define _CPPUHELPER_BASEMUTEX_HXX_
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <osl/mutex.hxx>
28cdf0e10cSrcweir 
29cdf0e10cSrcweir namespace cppu
30cdf0e10cSrcweir {
31cdf0e10cSrcweir     /** base class for all classes who want derive from
32cdf0e10cSrcweir 	 ::cppu::WeakComponentImplHelperXX.
33cdf0e10cSrcweir 
34cdf0e10cSrcweir 	 Implmentation classes have first to derive from BaseMutex and then from
35cdf0e10cSrcweir 	 ::cppu::WeakComponentImplHelperXX to ensure that the BaseMutex is completely
36cdf0e10cSrcweir 	 initialized when the mutex is used to intialize the
37cdf0e10cSrcweir 	 ::cppu::WeakComponentImplHelperXX
38cdf0e10cSrcweir     */
39cdf0e10cSrcweir 	class BaseMutex
40cdf0e10cSrcweir 	{
41cdf0e10cSrcweir 	protected:
42cdf0e10cSrcweir 		mutable ::osl::Mutex m_aMutex;
43cdf0e10cSrcweir 	};
44cdf0e10cSrcweir }
45cdf0e10cSrcweir #endif // _CPPUHELPER_BASEMUTEX_HXX_
46