BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
39461e8
Branches
Tags
master
Blinker
src
common
LockMgr.h
implement lock and lock manager
Stefan Schuermans
commited
39461e8
at 2019-08-13 18:30:31
LockMgr.h
Blame
History
Raw
/* Blinker Copyright 2011-2019 Stefan Schuermans <stefan@blinkenarea.org> Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html a blinkenarea.org project */ #ifndef BLINKER_LOCKMGR_H #define BLINKER_LOCKMGR_H #include <map> #include "Lock.h" namespace Blinker { /// lock manager, provides mutual exclusion among modules class LockMgr { protected: /// map of available locks: name -> lock object typedef std::map<std::string, Lock> LockMap; public: /// constructor LockMgr(); /// destructor ~LockMgr(); private: /// copy constructor disabled LockMgr(const LockMgr &that); /// assignment operator disabled const LockMgr & operator=(const LockMgr &that); public: /** * @brief get a lock object * @param[in] name name of lock */ Lock & getLock(std::string const &name); protected: /// map of available locks: name -> lock object LockMap m_lockMap; }; // class LockMgr } // namespace Blinker #endif // #ifndef BLINKER_LOCKMGR_H