From d3e7abc1d26a8a37b7f227c9738dea93d84bef29 Mon Sep 17 00:00:00 2001 From: "matthias@arch" Date: Tue, 1 Nov 2022 18:18:49 +0100 Subject: [PATCH] updated for changes with string conversion --- src/file_io.cpp | 1 - src/file_io.hpp | 3 +-- src/log.hpp | 39 +++++++----------------------- src/settings_manager.hpp | 52 +++++++++++++++++++--------------------- 4 files changed, 34 insertions(+), 61 deletions(-) diff --git a/src/file_io.cpp b/src/file_io.cpp index 2c17ed7..7d93f63 100644 --- a/src/file_io.cpp +++ b/src/file_io.cpp @@ -1,7 +1,6 @@ #include "file_io.hpp" #include "exceptions.hpp" -#include "util/string.hpp" #include #include diff --git a/src/file_io.hpp b/src/file_io.hpp index 361dc01..4f73ede 100644 --- a/src/file_io.hpp +++ b/src/file_io.hpp @@ -1,7 +1,6 @@ #pragma once -/* #include "util/string_conversion.hpp" */ -#include "util/string.hpp" +#include "string/utility.hpp" #include #include diff --git a/src/log.hpp b/src/log.hpp index b18f188..438f3ff 100755 --- a/src/log.hpp +++ b/src/log.hpp @@ -2,7 +2,7 @@ #include -#include "util/string_conversion.hpp" +#include "string/to_string.hpp" #include #include @@ -53,24 +53,8 @@ namespace gz { /** * @brief Define types that can be logged with Log * @details - * As of now you can log type T with instance t: - * -# Any @ref util::Stringy "string-like type": eg. std::string, std::string_view - * -# Any @ref util::WorksWithStdToString "type that works with std::toString()" - * -# Any @ref util::HasToStringMember "type that has a toString() const member that returns a string" - * -# Any @ref util::ContainerConvertibleToString "type that has a forward_iterator" which references any one of 1-3 - * -# Any @ref util::PairConvertibleToString "type with t.first, t.second" provided t.first satisfies one of 1-4 and t.second satisfies 1-4 - * -# Any @ref util::MapConvertibleToString "type that has a forward_iterator" which references 5 - * -# Any @ref util::Vector2ConvertibleToString "type with t.x and t.y", provided t.x and t.y satisfy one of 1-6 - * -# Any @ref util::Vector3ConvertibleToString "type with t.x, t.y, t.z", provided t.x, t.y, t.z satisfy one of 1-6 - * -# Any @ref util::Vector4ConvertibleToString "type with t.x, t.y, t.z and t.w", provided t.x, t.y, t.z, t.w satisfy one of 1-6 - * -# Any @ref ConvertibleToString "type for which an overload of" util::Stringy toString(const T&) exists in global or gz namespace - * - * The higher number takes precedence in overload resolution for the log function. - * - * 1-6 include for example: - * - int, float, bool... - * - std::vector, std::list - * - std::map> if A.toString() returns a string - ... + * Log can log everything where `gz::toString(const T&)` exists. + * See @ref sc_toStringImplemented "this for more details". */ template concept Logable = ConvertibleToString; @@ -105,12 +89,7 @@ namespace gz { * @subsection log_concepts Logable types * Log uses concepts to determine if a type is logable and how it should be logged. See the documentation for concept Logable for more details. * - * If you want your custom data type to be logable, it easiest to provide a member function with this signature: - * @code - * public: - * std::string toString() const; - * @endcode - * Alternatively, or if the type is not a class overload std::string toString(const T& t) in global or gz namespace. + * If you want your custom data type to be logable, @ref sc_ov_toString "write an overload for gz::toString()" * * @subsection log_threads Thread safety * Log can use a static mutex for thread safety. To use this feature, you have to `#define LOG_MULTITHREAD` @b before including `log.hpp`. @@ -176,7 +155,7 @@ class Log { * @details Depending on the settings of the log instance, the message will be printed to stdout and/or written to the logfile. * The current date and time is placed before the message. * The message will look like this: - *