jacekpoz
c5491dbc9f
this allows for creating only input and output streams and allows me to finally print out the generated config struct
25 lines
627 B
C++
25 lines
627 B
C++
#pragma once
|
|
|
|
#include <concepts>
|
|
#include <sstream>
|
|
#include <vector>
|
|
|
|
#include <SFML/Graphics/Color.hpp>
|
|
|
|
inline std::ostream &operator<<(std::ostream &stream, const sf::Color &color) {
|
|
stream << "Color(" << color.r << ", " << color.g << ", " << color.b << ", " << color.a << ")";
|
|
return stream;
|
|
}
|
|
|
|
template <typename T>
|
|
inline std::ostream &operator<<(std::ostream &stream, const std::vector<T> &vec) {
|
|
stream << "[";
|
|
for (size_t i = 0; i < vec.size(); ++i) {
|
|
stream << vec.at(i);
|
|
if (i != vec.size() - 1) {
|
|
stream << ", ";
|
|
}
|
|
}
|
|
stream << "]";
|
|
return stream;
|
|
}
|