Unique instance object. More...
#include <UniqueInstance.h>
Public Member Functions | |
UniqueInstance (String instanceName) | |
UniqueInstance (const UniqueInstance &)=delete | |
UniqueInstance & | operator= (const UniqueInstance &)=delete |
const String & | lockFileName () const |
bool | isUnique () const |
Unique instance object.
Tries to create a mutex object and check if it's unique for the program with the instance name. If one instance per user is desired simply incorporate the user name into the instance.
|
explicit |
Constructor
instanceName | Instance name |
bool sptk::UniqueInstance::isUnique | ( | ) | const |
Reports true if the instance is unique
const String & sptk::UniqueInstance::lockFileName | ( | ) | const |
Return lock file name