sptk2 logo
SPTK Home Page
Public Member Functions | List of all members
sptk::UniqueInstance Class Reference

Unique instance object. More...

#include <UniqueInstance.h>

Public Member Functions

 UniqueInstance (String instanceName)
 
 UniqueInstance (const UniqueInstance &)=delete
 
UniqueInstanceoperator= (const UniqueInstance &)=delete
 
const StringlockFileName () const
 
bool isUnique () const
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ UniqueInstance()

sptk::UniqueInstance::UniqueInstance ( String  instanceName)
explicit

Constructor

Parameters
instanceNameInstance name

Member Function Documentation

◆ isUnique()

bool sptk::UniqueInstance::isUnique ( ) const

Reports true if the instance is unique

◆ lockFileName()

const String & sptk::UniqueInstance::lockFileName ( ) const

Return lock file name

Returns
lock file name

The documentation for this class was generated from the following file:

Fri Oct 14 2022 09:58:47: SPTK 5.4.1