4 #include "joinToString.h"
6 #include <spdlog/spdlog.h>
56 errors.emplace_back(std::forward<ErrorStr>(error));
65 warnings.emplace_back(std::forward<WarningStr>(warning));
79 template <typename PromptStr>
81 const std::shared_ptr<spdlog::logger>& pLogger,
82 PromptStr&& prompt) const noexcept {
83 if (!errors.empty()) {
87 std::forward<PromptStr>(prompt),
98 template <
typename PromptStr>
100 const std::shared_ptr<spdlog::logger>& pLogger,
101 PromptStr&& prompt)
const noexcept {
102 if (!warnings.empty()) {
106 std::forward<PromptStr>(prompt),
114 explicit operator bool() const noexcept;
119 std::vector<std::
string> errors;
124 std::vector<std::
string> warnings;
Utility classes for Cesium.
std::string joinToString(TIterator begin, TIterator end, const std::string &separator)
Joins multiple elements together into a string, separated by a given separator.
The container to store the error and warning list when loading a tile or glTF content.
bool hasErrors() const noexcept
Check if there are any error messages.
static ErrorList error(std::string errorMessage)
Creates an ErrorList containing a single error.
void emplaceWarning(WarningStr &&warning)
Add a warning message.
static ErrorList warning(std::string warningMessage)
Creates an ErrorList containing a single warning.
void logWarning(const std::shared_ptr< spdlog::logger > &pLogger, PromptStr &&prompt) const noexcept
Log all the warning messages.
void merge(ErrorList &&errorList)
Merge the errors and warnings from other ErrorList together.
void emplaceError(ErrorStr &&error)
Add an error message.
void merge(const ErrorList &errorList)
Merge the errors and warnings from other ErrorList together.