/////////////////////////////////////////////////////////////////////////////
// Name: snglinst.h
-// Purpose: documentation for wxSingleInstanceChecker class
+// Purpose: interface of wxSingleInstanceChecker
// Author: wxWidgets team
// RCS-ID: $Id$
// Licence: wxWindows license
}
@endcode
- Note using wxGetUserId to construct the name: this
+ Note using wxGetUserId() to construct the name: this
allows different user to run the application concurrently which is usually the
intended goal. If you don't use the user name in the wxSingleInstanceChecker
name, only one user would be able to run the application at a time.
/**
Destructor frees the associated resources.
-
Note that it is not virtual, this class is not meant to be used polymorphically
*/
~wxSingleInstanceChecker();
Note that you can't call Create() more than once, so calling it if the
@ref wxsingleinstancechecker() "non default ctor"
had been used is an error.
-
+
@param name
- must be given and be as unique as possible. It is used as the
- mutex name under Win32 and the lock file name under Unix.
- GetAppName() and wxGetUserId()
- are commonly used to construct this parameter.
-
+ must be given and be as unique as possible. It is used as the
+ mutex name under Win32 and the lock file name under Unix.
+ GetAppName() and wxGetUserId()
+ are commonly used to construct this parameter.
@param path
- is optional and is ignored under Win32 and used as the directory to
- create the lock file in under Unix (default is
- wxGetHomeDir())
-
+ is optional and is ignored under Win32 and used as the directory to
+ create the lock file in under Unix (default is
+ wxGetHomeDir())
+
@returns Returns @false if initialization failed, it doesn't mean that
- another instance is running - use IsAnotherRunning()
- to check for it.
+ another instance is running - use IsAnotherRunning()
+ to check for it.
*/
bool Create(const wxString& name,
const wxString& path = wxEmptyString);
Returns @true if another copy of this program is already running, @false
otherwise.
*/
- bool IsAnotherRunning();
+ bool IsAnotherRunning() const;
};
+