1 #ifndef SINGLETON_APPLICATION_CLASS
2 #define SINGLETON_APPLICATION_CLASS
bool allow_this_instance()
the application must check this before starting up.
DEFINE_CLASS_NAME("singleton_application")
void release_lock()
let's go of the application lock, if we had previously gotten it.
bool already_running()
returns false if this program is not already running.
bool already_tried() const
returns true if the singleton has already tried to lock.
singleton_application(const basis::astring &application_name, const basis::astring &user_name=basis::astring::empty_string())
constructs a singleton guardian for the "application_name".
virtual ~singleton_application()
Provides a dynamically resizable ASCII character string.
static const astring & empty_string()
useful wherever empty strings are needed, e.g., function defaults.
An inter-process synchronization primitive.
Implements an application lock to ensure only one is running at once.