]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/xrconfig/xrconfig.cpp
Merge branch 'naffanya-dev'
[stg.git] / projects / stargazer / plugins / configuration / xrconfig / xrconfig.cpp
index 856ae88689679c04baef6d2fae7e55b9e942e4dd..e23df01da3aad5c558bb60bcaed1ece1a3df1db1 100644 (file)
@@ -2,35 +2,23 @@
 #include <unistd.h>
 #include <signal.h>
 
+#include "stg/plugin_creator.h"
 #include "xrconfig.h"
 #include "../../../tariff2.h"
 #include "../../../admins.h"
 #include "../../../users.h"
 
-class XR_CONFIG_CREATOR
-{
-private:
-    XR_CONFIG * xrconfig;
-
-public:
-    XR_CONFIG_CREATOR()
-        : xrconfig(new XR_CONFIG())
-        {
-        };
-    ~XR_CONFIG_CREATOR()
-        {
-        delete xrconfig;
-        };
-
-    XR_CONFIG * GetPlugin()
-        {
-        return xrconfig;
-        };
-};
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-XRCONFIG_CREATOR xrc;
+PLUGIN_CREATOR<XR_CONFIG> xrc;
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+BASE_PLUGIN * GetPlugin()
+{
+return xrc.GetPlugin();
+}
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
@@ -57,13 +45,6 @@ return port;
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-BASE_PLUGIN * GetPlugin()
-{
-return xrc.GetPlugin();
-}
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
 const string XR_CONFIG::GetVersion() const
 {
 return "XR_configurator v.0.01";
@@ -199,12 +180,12 @@ return NULL;
 //-----------------------------------------------------------------------------
 uint16_t XR_CONFIG::GetStartPosition() const
 {
-return 221;
+return 20;
 }
 //-----------------------------------------------------------------------------
 uint16_t XR_CONFIG::GetStopPosition() const
 {
-return 221;
+return 20;
 }
 //-----------------------------------------------------------------------------
 int XR_CONFIG::SetUserCash(const string & admLogin, const string & usrLogin, double cash) const