mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-28 04:17:43 +00:00
d8b96c598c
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@443 a592a061-630c-0410-9148-cb99ea01b6c8
39 lines
905 B
C
39 lines
905 B
C
#include <config.h>
|
|
|
|
#include "syscontr.h"
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
// Ensure, that only one controller exist inside process
|
|
//----------------------------------------------------------------------
|
|
|
|
// global controller variable
|
|
SystemcallsSingletoncontroller *
|
|
SystemcallsSingletoncontroller::Startcontroller::
|
|
contr = 0;
|
|
|
|
// reference count
|
|
int SystemcallsSingletoncontroller::Startcontroller::
|
|
refcount = 0;
|
|
|
|
SystemcallsSingletoncontroller::Startcontroller::
|
|
Startcontroller() {
|
|
}
|
|
|
|
SystemcallsSingletoncontroller::Startcontroller::
|
|
~Startcontroller() {
|
|
}
|
|
|
|
// Give reference to global controller-instance
|
|
//
|
|
SystemcallsSingletoncontroller *
|
|
SystemcallsSingletoncontroller::Startcontroller::getController()
|
|
{
|
|
if (!contr) {
|
|
// Create the global controller
|
|
contr = new SystemcallsSingletoncontroller;
|
|
}
|
|
++refcount;
|
|
return contr;
|
|
}
|