X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/ce4df22d851ab9ba93374415363809aba1f43b59..bc4721533e4041a19b42cb247064f9f42c3f9d5f:/projects/stargazer/plugins/authorization/stress/stress.cpp?ds=inline diff --git a/projects/stargazer/plugins/authorization/stress/stress.cpp b/projects/stargazer/plugins/authorization/stress/stress.cpp index 756e6e1a..5d41a91d 100644 --- a/projects/stargazer/plugins/authorization/stress/stress.cpp +++ b/projects/stargazer/plugins/authorization/stress/stress.cpp @@ -33,35 +33,14 @@ #include "stg/user.h" #include "stg/common.h" #include "stg/user_property.h" +#include "stg/plugin_creator.h" #include "stress.h" -class STRESS_CREATOR -{ -private: - AUTH_STRESS * dc; - -public: - STRESS_CREATOR() - { - printfd(__FILE__, "constructor STRESS_CREATOR\n"); - dc = new AUTH_STRESS(); - }; - ~STRESS_CREATOR() - { - printfd(__FILE__, "destructor STRESS_CREATOR\n"); - delete dc; - }; - - PLUGIN * GetPlugin() - { - return dc; - }; -}; //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -STRESS_CREATOR stressc; +PLUGIN_CREATOR stressc; //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- @@ -91,21 +70,6 @@ AUTH_STRESS_SETTINGS::AUTH_STRESS_SETTINGS() { } //----------------------------------------------------------------------------- -int AUTH_STRESS_SETTINGS::ParseIntInRange(const string & str, int min, int max, int * val) -{ -if (str2x(str.c_str(), *val)) - { - errorStr = "Incorrect value \'" + str + "\'."; - return -1; - } -if (*val < min || *val > max) - { - errorStr = "Value \'" + str + "\' out of range."; - return -1; - } -return 0; -} -//----------------------------------------------------------------------------- int AUTH_STRESS_SETTINGS::ParseSettings(const MODULE_SETTINGS & s) { PARAM_VALUE pv;