Drop framework::INonCopyable duplication of boost::noncopyable
Change-Id: Ie4135353c7917fddf3efd15d0f3022b3aada8025
This commit is contained in:
@@ -20,9 +20,9 @@
|
|||||||
#ifndef INCLUDED_FRAMEWORK_INC_THREADHELP_GATE_HXX
|
#ifndef INCLUDED_FRAMEWORK_INC_THREADHELP_GATE_HXX
|
||||||
#define INCLUDED_FRAMEWORK_INC_THREADHELP_GATE_HXX
|
#define INCLUDED_FRAMEWORK_INC_THREADHELP_GATE_HXX
|
||||||
|
|
||||||
#include <threadhelp/inoncopyable.h>
|
|
||||||
#include <threadhelp/igate.h>
|
#include <threadhelp/igate.h>
|
||||||
|
|
||||||
|
#include <boost/noncopyable.hpp>
|
||||||
#include <osl/mutex.hxx>
|
#include <osl/mutex.hxx>
|
||||||
#include <osl/conditn.hxx>
|
#include <osl/conditn.hxx>
|
||||||
|
|
||||||
@@ -39,12 +39,11 @@ namespace framework{
|
|||||||
|
|
||||||
@implements IGate
|
@implements IGate
|
||||||
@base IGate
|
@base IGate
|
||||||
INonCopyable
|
|
||||||
|
|
||||||
@devstatus ready to use
|
@devstatus ready to use
|
||||||
*//*-*************************************************************************************************************/
|
*//*-*************************************************************************************************************/
|
||||||
class Gate : public IGate
|
class Gate : public IGate
|
||||||
, private INonCopyable
|
, private boost::noncopyable
|
||||||
{
|
{
|
||||||
|
|
||||||
// public methods
|
// public methods
|
||||||
|
@@ -1,47 +0,0 @@
|
|||||||
/* -*- 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_INONCOPYABLE_H
|
|
||||||
#define INCLUDED_FRAMEWORK_INC_THREADHELP_INONCOPYABLE_H
|
|
||||||
|
|
||||||
namespace framework{
|
|
||||||
|
|
||||||
/*-************************************************************************************************************
|
|
||||||
@descr Use this as one of your base classes to disable
|
|
||||||
all possiblities to copy or assign one object to another one!
|
|
||||||
We declare necessary functions private to do so.
|
|
||||||
*//*-*************************************************************************************************************/
|
|
||||||
class INonCopyable
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
INonCopyable() {}
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
INonCopyable ( const INonCopyable& rCopy );
|
|
||||||
INonCopyable& operator= ( const INonCopyable& rCopy );
|
|
||||||
|
|
||||||
}; // class INonCopyable
|
|
||||||
|
|
||||||
} // namespace framework
|
|
||||||
|
|
||||||
#endif // INCLUDED_FRAMEWORK_INC_THREADHELP_INONCOPYABLE_H
|
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
|
@@ -20,7 +20,7 @@
|
|||||||
#ifndef INCLUDED_FRAMEWORK_INC_THREADHELP_LOCKHELPER_HXX
|
#ifndef INCLUDED_FRAMEWORK_INC_THREADHELP_LOCKHELPER_HXX
|
||||||
#define INCLUDED_FRAMEWORK_INC_THREADHELP_LOCKHELPER_HXX
|
#define INCLUDED_FRAMEWORK_INC_THREADHELP_LOCKHELPER_HXX
|
||||||
|
|
||||||
#include <threadhelp/inoncopyable.h>
|
#include <boost/noncopyable.hpp>
|
||||||
#include <framework/imutex.hxx>
|
#include <framework/imutex.hxx>
|
||||||
#include <threadhelp/irwlock.h>
|
#include <threadhelp/irwlock.h>
|
||||||
|
|
||||||
@@ -51,15 +51,14 @@ namespace framework{
|
|||||||
@implements IMutex
|
@implements IMutex
|
||||||
@implements IRWLock
|
@implements IRWLock
|
||||||
|
|
||||||
@base INonCopyable
|
@base IMutex
|
||||||
IMutex
|
|
||||||
IRWLock
|
IRWLock
|
||||||
|
|
||||||
@devstatus draft
|
@devstatus draft
|
||||||
*//*-*************************************************************************************************************/
|
*//*-*************************************************************************************************************/
|
||||||
class FWI_DLLPUBLIC LockHelper : public IMutex
|
class FWI_DLLPUBLIC LockHelper : public IMutex
|
||||||
, public IRWLock
|
, public IRWLock
|
||||||
, private INonCopyable
|
, private boost::noncopyable
|
||||||
{
|
{
|
||||||
|
|
||||||
// public methods
|
// public methods
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#ifndef INCLUDED_FRAMEWORK_INC_THREADHELP_READGUARD_HXX
|
#ifndef INCLUDED_FRAMEWORK_INC_THREADHELP_READGUARD_HXX
|
||||||
#define INCLUDED_FRAMEWORK_INC_THREADHELP_READGUARD_HXX
|
#define INCLUDED_FRAMEWORK_INC_THREADHELP_READGUARD_HXX
|
||||||
|
|
||||||
#include <threadhelp/inoncopyable.h>
|
#include <boost/noncopyable.hpp>
|
||||||
#include <threadhelp/irwlock.h>
|
#include <threadhelp/irwlock.h>
|
||||||
|
|
||||||
#include <sal/types.h>
|
#include <sal/types.h>
|
||||||
@@ -40,11 +40,10 @@ namespace framework{
|
|||||||
Interface "IMutex" should be used by easier guard implementations ... like "ResetableGuard"!
|
Interface "IMutex" should be used by easier guard implementations ... like "ResetableGuard"!
|
||||||
|
|
||||||
@implements -
|
@implements -
|
||||||
@base INonCopyable
|
|
||||||
|
|
||||||
@devstatus ready to use
|
@devstatus ready to use
|
||||||
*//*-*************************************************************************************************************/
|
*//*-*************************************************************************************************************/
|
||||||
class ReadGuard : private INonCopyable
|
class ReadGuard : private boost::noncopyable
|
||||||
{
|
{
|
||||||
|
|
||||||
// public methods
|
// public methods
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#ifndef INCLUDED_FRAMEWORK_INC_THREADHELP_RESETABLEGUARD_HXX
|
#ifndef INCLUDED_FRAMEWORK_INC_THREADHELP_RESETABLEGUARD_HXX
|
||||||
#define INCLUDED_FRAMEWORK_INC_THREADHELP_RESETABLEGUARD_HXX
|
#define INCLUDED_FRAMEWORK_INC_THREADHELP_RESETABLEGUARD_HXX
|
||||||
|
|
||||||
#include <threadhelp/inoncopyable.h>
|
#include <boost/noncopyable.hpp>
|
||||||
#include <framework/imutex.hxx>
|
#include <framework/imutex.hxx>
|
||||||
|
|
||||||
#include <sal/types.h>
|
#include <sal/types.h>
|
||||||
@@ -40,11 +40,10 @@ namespace framework{
|
|||||||
Interface "IRWLock" should be used by special guard implementations ... like "ReadGuard" or "WriteGuard"!
|
Interface "IRWLock" should be used by special guard implementations ... like "ReadGuard" or "WriteGuard"!
|
||||||
|
|
||||||
@implements -
|
@implements -
|
||||||
@base INonCopyable
|
|
||||||
|
|
||||||
@devstatus ready to use
|
@devstatus ready to use
|
||||||
*//*-*************************************************************************************************************/
|
*//*-*************************************************************************************************************/
|
||||||
class ResetableGuard : private INonCopyable
|
class ResetableGuard : private boost::noncopyable
|
||||||
{
|
{
|
||||||
|
|
||||||
// public methods
|
// public methods
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#ifndef INCLUDED_FRAMEWORK_INC_THREADHELP_TRANSACTIONGUARD_HXX
|
#ifndef INCLUDED_FRAMEWORK_INC_THREADHELP_TRANSACTIONGUARD_HXX
|
||||||
#define INCLUDED_FRAMEWORK_INC_THREADHELP_TRANSACTIONGUARD_HXX
|
#define INCLUDED_FRAMEWORK_INC_THREADHELP_TRANSACTIONGUARD_HXX
|
||||||
|
|
||||||
#include <threadhelp/inoncopyable.h>
|
#include <boost/noncopyable.hpp>
|
||||||
#include <threadhelp/itransactionmanager.h>
|
#include <threadhelp/itransactionmanager.h>
|
||||||
|
|
||||||
namespace framework{
|
namespace framework{
|
||||||
@@ -38,11 +38,10 @@ namespace framework{
|
|||||||
@attention To prevent us against wrong using, the default ctor, copy ctor and the =operator are maked private!
|
@attention To prevent us against wrong using, the default ctor, copy ctor and the =operator are maked private!
|
||||||
|
|
||||||
@implements -
|
@implements -
|
||||||
@base INonCopyable
|
|
||||||
|
|
||||||
@devstatus draft
|
@devstatus draft
|
||||||
*//*-*************************************************************************************************************/
|
*//*-*************************************************************************************************************/
|
||||||
class TransactionGuard : private INonCopyable
|
class TransactionGuard : private boost::noncopyable
|
||||||
{
|
{
|
||||||
|
|
||||||
// public methods
|
// public methods
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#ifndef INCLUDED_FRAMEWORK_INC_THREADHELP_TRANSACTIONMANAGER_HXX
|
#ifndef INCLUDED_FRAMEWORK_INC_THREADHELP_TRANSACTIONMANAGER_HXX
|
||||||
#define INCLUDED_FRAMEWORK_INC_THREADHELP_TRANSACTIONMANAGER_HXX
|
#define INCLUDED_FRAMEWORK_INC_THREADHELP_TRANSACTIONMANAGER_HXX
|
||||||
|
|
||||||
#include <threadhelp/inoncopyable.h>
|
#include <boost/noncopyable.hpp>
|
||||||
#include <threadhelp/itransactionmanager.h>
|
#include <threadhelp/itransactionmanager.h>
|
||||||
#include <threadhelp/gate.hxx>
|
#include <threadhelp/gate.hxx>
|
||||||
|
|
||||||
@@ -43,13 +43,12 @@ namespace framework{
|
|||||||
and react for it. You can enable automaticly throwing of exceptions too.
|
and react for it. You can enable automaticly throwing of exceptions too.
|
||||||
|
|
||||||
@implements ITransactionManager
|
@implements ITransactionManager
|
||||||
@base INonCopyable
|
@base ITransactionManager
|
||||||
ITransactionManager
|
|
||||||
|
|
||||||
@devstatus draft
|
@devstatus draft
|
||||||
*//*-*************************************************************************************************************/
|
*//*-*************************************************************************************************************/
|
||||||
class FWI_DLLPUBLIC TransactionManager : public ITransactionManager
|
class FWI_DLLPUBLIC TransactionManager : public ITransactionManager
|
||||||
, private INonCopyable
|
, private boost::noncopyable
|
||||||
{
|
{
|
||||||
|
|
||||||
// public methods
|
// public methods
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#ifndef INCLUDED_FRAMEWORK_INC_THREADHELP_WRITEGUARD_HXX
|
#ifndef INCLUDED_FRAMEWORK_INC_THREADHELP_WRITEGUARD_HXX
|
||||||
#define INCLUDED_FRAMEWORK_INC_THREADHELP_WRITEGUARD_HXX
|
#define INCLUDED_FRAMEWORK_INC_THREADHELP_WRITEGUARD_HXX
|
||||||
|
|
||||||
#include <threadhelp/inoncopyable.h>
|
#include <boost/noncopyable.hpp>
|
||||||
#include <threadhelp/irwlock.h>
|
#include <threadhelp/irwlock.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -37,11 +37,10 @@ namespace framework{
|
|||||||
Interface "IMutex" should be used by easier guard implementations ... like "ResetableGuard"!
|
Interface "IMutex" should be used by easier guard implementations ... like "ResetableGuard"!
|
||||||
|
|
||||||
@implements -
|
@implements -
|
||||||
@base INonCopyable
|
|
||||||
|
|
||||||
@devstatus ready to use
|
@devstatus ready to use
|
||||||
*//*-*************************************************************************************************************/
|
*//*-*************************************************************************************************************/
|
||||||
class WriteGuard : private INonCopyable
|
class WriteGuard : private boost::noncopyable
|
||||||
{
|
{
|
||||||
|
|
||||||
// public methods
|
// public methods
|
||||||
|
Reference in New Issue
Block a user