]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/xrconfig/xrconfig.cpp
Trailing coma removed
[stg.git] / projects / stargazer / plugins / configuration / xrconfig / xrconfig.cpp
index 856ae88689679c04baef6d2fae7e55b9e942e4dd..1b9237cacea80256c661bdc0c277cf489dc12905 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";