Petri Ovaska | fefde50 | 2021-09-17 12:33:24 +0300 | [diff] [blame] | 1 | #ifndef SHAREDDATALAYER_CLI_COMMON_HPP |
| 2 | #define SHAREDDATALAYER_CLI_COMMON_HPP |
| 3 | |
| 4 | #include <functional> |
| 5 | #include <iostream> |
| 6 | #include <sdl/syncstorage.hpp> |
| 7 | |
| 8 | namespace shareddatalayer |
| 9 | { |
| 10 | namespace cli |
| 11 | { |
| 12 | inline std::ostream& operator<<(std::ostream &out, const SyncStorage::Data &data) |
| 13 | { |
| 14 | for (const auto& d : data) |
| 15 | out << d; |
| 16 | return out; |
| 17 | } |
| 18 | |
| 19 | inline std::ostream& operator<<(std::ostream& out, const SyncStorage::DataMap& dataMap) |
| 20 | { |
| 21 | for (const auto& d : dataMap) |
| 22 | out << d.first << " " << d.second; |
| 23 | return out; |
| 24 | } |
| 25 | } |
| 26 | } |
| 27 | #endif |