Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
3ccb4435
Kaydet (Commit)
3ccb4435
authored
Haz 11, 2001
tarafından
Andreas Schlüns
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#85529# move static function to manager
üst
8d228e06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
44 deletions
+2
-44
transactionbase.hxx
framework/inc/threadhelp/transactionbase.hxx
+2
-44
No files found.
framework/inc/threadhelp/transactionbase.hxx
Dosyayı görüntüle @
3ccb4435
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: transactionbase.hxx,v $
* $RCSfile: transactionbase.hxx,v $
*
*
* $Revision: 1.
1
$
* $Revision: 1.
2
$
*
*
* last change: $Author: as $ $Date: 2001-0
5-02 13:00:41
$
* last change: $Author: as $ $Date: 2001-0
6-11 10:25:22
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -106,48 +106,6 @@ namespace framework{
...
@@ -106,48 +106,6 @@ namespace framework{
*//*-*************************************************************************************************************/
*//*-*************************************************************************************************************/
struct
TransactionBase
struct
TransactionBase
{
{
//-------------------------------------------------------------------------------------------------------------
// public Methods
//-------------------------------------------------------------------------------------------------------------
public
:
/*-****************************************************************************************************//**
@short return a reference to a static manager
@descr Sometimes we need the global member! (e.g. in our own static methods)
We create our own "class global static" member threadsafe.
It will be created at first call only!
All other requests use these created one then directly.
@seealso -
@param -
@return A reference to a static member.
@onerror No error should occure.
*//*-*****************************************************************************************************/
static
TransactionManager
&
getGlobalTransactionManager
()
{
// Initialize static member only for one time!
static
TransactionManager
*
pManager
=
NULL
;
// If these method first called (member not already exist!) ...
if
(
pManager
==
NULL
)
{
// ... we must create a new one. Protect follow code with the global mutex -
// It must be - we create a static variable!
::
osl
::
MutexGuard
aGuard
(
::
osl
::
Mutex
::
getGlobalMutex
()
);
// We must check our pointer again - because ... another instance of ouer class could be faster then these one!
if
(
pManager
==
NULL
)
{
// Create the new manager and set it for return on static variable.
static
TransactionManager
aManager
;
pManager
=
&
aManager
;
}
}
// Return new created or already existing object.
return
*
pManager
;
}
//-------------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------------
// public member
// public member
//-------------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment