From: Elena Mamontova Date: Tue, 12 Jul 2016 07:05:25 +0000 (+0300) Subject: Ticket. ChangePolicyToString() function added. X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/97e189dff6e62bc1f8253467bed5b3f5634daed9?ds=sidebyside;hp=69172e0e3684d849825b90b01e53026852e01a97 Ticket. ChangePolicyToString() function added. --- 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)