#pragma once #include #include #include #include class TKeyValuePrinter { private: TString Sep; TVector Keys; TVector Values; TVector AlignLefts; public: TKeyValuePrinter(const TString& sep = TString(": ")); ~TKeyValuePrinter(); template void AddRow(const TKey& key, const TValue& value, bool leftAlign = !std::is_integral::value) { return AddRowImpl(ToString(key), ToString(value), leftAlign); } TString PrintToString() const; private: void AddRowImpl(const TString& key, const TString& value, bool leftAlign); };