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 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_stoc.hxx"
26 
27 #include "osl/doublecheckedlocking.h"
28 #include "base.hxx"
29 
30 namespace stoc_rdbtdp
31 {
32 
33 //------------------------------------------------------------------------------
getMutex()34 ::osl::Mutex & getMutex()
35 {
36     static ::osl::Mutex * s_pmutex = 0;
37     if (s_pmutex == 0)
38     {
39         ::osl::MutexGuard guard( ::osl::Mutex::getGlobalMutex() );
40         if (s_pmutex == 0)
41         {
42             static ::osl::Mutex s_mutex;
43             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
44             s_pmutex = &s_mutex;
45         }
46     }
47     else
48     {
49         OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
50     }
51     return *s_pmutex;
52 }
53 
54 
~TypeDescriptionImpl()55 TypeDescriptionImpl::~TypeDescriptionImpl()
56 {
57 	g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
58 }
59 
60 // XTypeDescription
61 //__________________________________________________________________________________________________
getTypeClass()62 TypeClass TypeDescriptionImpl::getTypeClass()
63 	throw(::com::sun::star::uno::RuntimeException)
64 {
65 	return _eTypeClass;
66 }
67 //__________________________________________________________________________________________________
getName()68 OUString TypeDescriptionImpl::getName()
69 	throw(::com::sun::star::uno::RuntimeException)
70 {
71 	return _aName;
72 }
73 
74 }
75 
76 
77