updating code from Flying Laptop
This is the framework of Flying Laptop OBSW version A.13.0.
This commit is contained in:
34
ipc/MutexFactory.h
Normal file
34
ipc/MutexFactory.h
Normal file
@ -0,0 +1,34 @@
|
||||
#ifndef FRAMEWORK_IPC_MUTEXFACTORY_H_
|
||||
#define FRAMEWORK_IPC_MUTEXFACTORY_H_
|
||||
|
||||
#include <framework/ipc/MutexIF.h>
|
||||
/**
|
||||
* Creates Mutex.
|
||||
* This class is a "singleton" interface, i.e. it provides an
|
||||
* interface, but also is the base class for a singleton.
|
||||
*/
|
||||
class MutexFactory {
|
||||
public:
|
||||
virtual ~MutexFactory();
|
||||
/**
|
||||
* Returns the single instance of MutexFactory.
|
||||
* The implementation of #instance is found in its subclasses.
|
||||
* Thus, we choose link-time variability of the instance.
|
||||
*/
|
||||
static MutexFactory* instance();
|
||||
|
||||
MutexIF* createMutex();
|
||||
|
||||
void deleteMutex(MutexIF* mutex);
|
||||
|
||||
private:
|
||||
/**
|
||||
* External instantiation is not allowed.
|
||||
*/
|
||||
MutexFactory();
|
||||
static MutexFactory* factoryInstance;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* FRAMEWORK_IPC_MUTEXFACTORY_H_ */
|
Reference in New Issue
Block a user