#include <algorithm>
#include <vector>
+#include "stg/locker.h"
+#include "stg/logger.h"
+#include "stg/store.h"
+#include "stg/admin.h"
#include "tariffs_impl.h"
-#include "stg_locker.h"
-#include "stg_logger.h"
-#include "store.h"
-#include "admin.h"
using namespace std;
//-----------------------------------------------------------------------------
TARIFFS_IMPL::TARIFFS_IMPL(STORE * st)
- : tariffs(),
+ : TARIFFS(),
+ tariffs(),
store(st),
WriteServLog(GetStgLogger()),
strError(),
return 0;
}
//-----------------------------------------------------------------------------
-int TARIFFS_IMPL::GetTariffsNum() const
+size_t TARIFFS_IMPL::Count() const
{
STG_LOCKER lock(&mutex, __FILE__, __LINE__);
return tariffs.size();
if (ti != tariffs.end())
{
- strError = "Tariff \'" + name + "\' cannot be added. Tariff alredy exist.";
+ strError = "Tariff \'" + name + "\' cannot be added. Tariff already exist.";
WriteServLog("%s %s", admin->GetLogStr().c_str(), strError.c_str());
return -1;
}