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
bd4f62df
Kaydet (Commit)
bd4f62df
authored
May 13, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
framework: remove pointless IGate interface and de-virtualize
Change-Id: I43080ab6a4d9530a5cd4e3b8fa7806df41467e51
üst
cfade6de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
69 deletions
+6
-69
gate.hxx
framework/inc/threadhelp/gate.hxx
+6
-14
igate.h
framework/inc/threadhelp/igate.h
+0
-55
No files found.
framework/inc/threadhelp/gate.hxx
Dosyayı görüntüle @
bd4f62df
...
...
@@ -20,9 +20,8 @@
#ifndef INCLUDED_FRAMEWORK_INC_THREADHELP_GATE_HXX
#define INCLUDED_FRAMEWORK_INC_THREADHELP_GATE_HXX
#include <threadhelp/igate.h>
#include <boost/noncopyable.hpp>
#include <osl/time.h>
#include <osl/mutex.hxx>
#include <osl/conditn.hxx>
...
...
@@ -36,13 +35,9 @@ namespace framework{
@attention To prevent us against wrong using, the default ctor, copy ctor and the =operator are marked private!
@implements IGate
@base IGate
@devstatus ready to use
*//*-*************************************************************************************************************/
class
Gate
:
public
IGate
,
private
boost
::
noncopyable
class
Gate
:
private
boost
::
noncopyable
{
// public methods
...
...
@@ -65,19 +60,18 @@ class Gate : public IGate
blocked threads can running ... but I don't know
if it's right - we are destroyed yet!?
*//*-*****************************************************************************************************/
inline
virtual
~
Gate
()
inline
~
Gate
()
{
open
();
}
/*-****************************************************************************************************
@interface IGate
@short open the gate
@descr A wait() call will not block then.
@seealso method close()
*//*-*****************************************************************************************************/
v
irtual
void
open
()
SAL_OVERRIDE
v
oid
open
()
{
// We must safe access to our internal member!
::
osl
::
MutexGuard
aLock
(
m_aAccessLock
);
...
...
@@ -89,13 +83,12 @@ class Gate : public IGate
}
/*-****************************************************************************************************
@interface IGate
@short close the gate
@descr A wait() call will block then.
@seealso method open()
*//*-*****************************************************************************************************/
v
irtual
void
close
()
SAL_OVERRIDE
v
oid
close
()
{
// We must safe access to our internal member!
::
osl
::
MutexGuard
aLock
(
m_aAccessLock
);
...
...
@@ -107,7 +100,6 @@ class Gate : public IGate
}
/*-****************************************************************************************************
@interface IGate
@short must be called to pass the gate
@descr If gate "open" => wait() will not block.
If gate "closed" => wait() will block till somewhere open it again.
...
...
@@ -121,7 +113,7 @@ class Gate : public IGate
@onerror We return false.
*//*-*****************************************************************************************************/
virtual
bool
wait
(
const
TimeValue
*
pTimeOut
=
NULL
)
SAL_OVERRIDE
bool
wait
(
const
TimeValue
*
pTimeOut
=
nullptr
)
{
// We must safe access to our internal member!
::
osl
::
ClearableMutexGuard
aLock
(
m_aAccessLock
);
...
...
framework/inc/threadhelp/igate.h
deleted
100644 → 0
Dosyayı görüntüle @
cfade6de
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_FRAMEWORK_INC_THREADHELP_IGATE_H
#define INCLUDED_FRAMEWORK_INC_THREADHELP_IGATE_H
#include <osl/time.h>
namespace
framework
{
/*-************************************************************************************************************
@descr We need this interface to support using of different gate implementations in a generic way.
*//*-*************************************************************************************************************/
class
IGate
{
// public methods
public
:
/*-****************************************************************************************************
@descr These functions must be supported by a derived class!
open() -open access for all waiting threads
close() -close access for all further coming threads
wait() -must be called to pass the gate
*//*-*****************************************************************************************************/
virtual
void
open
(
)
=
0
;
virtual
void
close
(
)
=
0
;
virtual
bool
wait
(
const
TimeValue
*
pTimeOut
=
NULL
)
=
0
;
protected
:
~
IGate
()
{}
};
// class IGate
}
// namespace framework
#endif // INCLUDED_FRAMEWORK_INC_THREADHELP_IGATE_H
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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