From 97e189dff6e62bc1f8253467bed5b3f5634daed9 Mon Sep 17 00:00:00 2001 From: Elena Mamontova Date: Tue, 12 Jul 2016 10:05:25 +0300 Subject: [PATCH] Ticket. ChangePolicyToString() function added. --- projects/sgconf/tariffs.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/projects/sgconf/tariffs.cpp b/projects/sgconf/tariffs.cpp index 3d63d2a8..df778f38 100644 --- a/projects/sgconf/tariffs.cpp +++ b/projects/sgconf/tariffs.cpp @@ -28,6 +28,18 @@ if (level == 0) return dash ? std::string(level * 4 - 2, ' ') + "- " : std::string(level * 4, ' '); } +std::string ChangePolicyToString(TARIFF::CHANGE_POLICY changePolicy) +{ +switch (changePolicy) + { + case ALLOW: return "allow"; + case TO_CHEAP: return "to_cheap"; + case TO_EXPENSIVE: return "to_expensive"; + case DENY: return "deny"; + } +return "unknown"; +} + std::string PeriodToString(TARIFF::PERIOD period) { switch (period) -- 2.44.2