diff options
author | Arno <am@disconnect.de> | 2010-06-12 11:22:10 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2010-06-12 11:22:10 +0200 |
commit | ed20c95fff998cb25457e5b9d95bce312816ebd9 (patch) | |
tree | 7f6d56b676b3c41f5acb586f26258b5ab87335f7 /smubermodelsingleton.cpp | |
parent | f84598155ee8a6b20f163b459722e27eb24658ab (diff) | |
download | SheMov-ed20c95fff998cb25457e5b9d95bce312816ebd9.tar.gz SheMov-ed20c95fff998cb25457e5b9d95bce312816ebd9.tar.bz2 SheMov-ed20c95fff998cb25457e5b9d95bce312816ebd9.zip |
Created singleton for SmUberModel
Implemented a singleton for SmUberModel.
Diffstat (limited to 'smubermodelsingleton.cpp')
-rw-r--r-- | smubermodelsingleton.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/smubermodelsingleton.cpp b/smubermodelsingleton.cpp new file mode 100644 index 0000000..ef3d1e3 --- /dev/null +++ b/smubermodelsingleton.cpp @@ -0,0 +1,18 @@ +/* + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version + 2 of the License, or (at your option) any later version. +*/ + +#include "smubermodelsingleton.h" +#include "smubermodel.h" + +SmUberModel *SmUberModelSingleton::mInstance = 0; + +SmUberModel *SmUberModelSingleton::instance(){ + if(!mInstance){ + mInstance = new SmUberModel; + } + return mInstance; +} |