diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-03-17 17:08:22 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-03-17 17:25:16 +0100 |
commit | 00550fbd193cb6184075dbe050002f567174e7ec (patch) | |
tree | 2a1b6213ab724c9e64ddf7e855f57ead153549ec /include/framework | |
parent | d44abe1724ee5470c88f5fba5c0217fb37e2205c (diff) |
Fold framework::IGuard into framework::IMutexGuard
Change-Id: I14a77fc3fbf225862bc01f677d09d5b5a52bb1aa
Diffstat (limited to 'include/framework')
-rw-r--r-- | include/framework/iguard.hxx | 54 | ||||
-rw-r--r-- | include/framework/undomanagerhelper.hxx | 11 |
2 files changed, 9 insertions, 56 deletions
diff --git a/include/framework/iguard.hxx b/include/framework/iguard.hxx deleted file mode 100644 index 46071b49e00b..000000000000 --- a/include/framework/iguard.hxx +++ /dev/null @@ -1,54 +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_IGUARD_HXX -#define INCLUDED_FRAMEWORK_IGUARD_HXX - -#include <sal/types.h> - -namespace framework{ - -/*-************************************************************************************************************ - @descr interface for guarding a lock -*//*-*************************************************************************************************************/ -class SAL_NO_VTABLE IGuard -{ - - // public methods - - public: - - /** clears the lock. If the guard does not currently hold the lock, nothing happens. - */ - virtual void clear() = 0; - - /** attempts to re-establishes the lock, blocking until the attempt is successful. - */ - virtual void reset() = 0; - - protected: - ~IGuard() {} - -}; // class IGuard - -} // namespace framework - -#endif // INCLUDED_FRAMEWORK_IGUARD_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/framework/undomanagerhelper.hxx b/include/framework/undomanagerhelper.hxx index 8c0c42897bb2..77c098316439 100644 --- a/include/framework/undomanagerhelper.hxx +++ b/include/framework/undomanagerhelper.hxx @@ -21,7 +21,6 @@ #define INCLUDED_FRAMEWORK_UNDOMANAGERHELPER_HXX #include <framework/fwedllapi.h> -#include <framework/iguard.hxx> #include <framework/imutex.hxx> #include <com/sun/star/document/XUndoManager.hpp> @@ -42,9 +41,17 @@ namespace framework //= IMutexGuard - class SAL_NO_VTABLE IMutexGuard : public IGuard + class SAL_NO_VTABLE IMutexGuard { public: + /** clears the lock. If the guard does not currently hold the lock, nothing happens. + */ + virtual void clear() = 0; + + /** attempts to re-establishes the lock, blocking until the attempt is successful. + */ + virtual void reset() = 0; + /** returns the mutex guarded by the instance. Even if the guard currently has not a lock on the mutex, this method must succeed. |