File indexing completed on 2024-04-28 04:21:24
0001 /* SPDX-FileCopyrightText: 2003-2010 Jesper K. Pedersen <blackie@kde.org> 0002 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 #ifndef BOOLEANGUARD_H 0006 #define BOOLEANGUARD_H 0007 0008 namespace Utilities 0009 { 0010 0011 class BooleanGuard 0012 { 0013 public: 0014 explicit BooleanGuard(bool &guard); 0015 ~BooleanGuard(); 0016 bool canContinue(); 0017 0018 private: 0019 bool &m_guard; 0020 bool m_iLockedIt; 0021 }; 0022 0023 } 0024 0025 #endif /* BOOLEANGUARD_H */ 0026 0027 // vi:expandtab:tabstop=4 shiftwidth=4: