3#include <CesiumUtility/Library.h>
4#include <CesiumUtility/Log.h>
5#include <CesiumUtility/joinToString.h>
7#include <spdlog/spdlog.h>
57 errors.emplace_back(std::forward<ErrorStr>(error));
66 warnings.emplace_back(std::forward<WarningStr>(warning));
80 template <typename PromptStr>
82 const
std::shared_ptr<spdlog::logger>& pLogger,
83 PromptStr&& prompt) const noexcept {
84 if (!errors.empty()) {
88 std::forward<PromptStr>(prompt),
89 CesiumUtility::joinToString(errors,
"\n- "));
99 template <
typename PromptStr>
101 const std::shared_ptr<spdlog::logger>& pLogger,
102 PromptStr&& prompt)
const noexcept {
103 if (!warnings.empty()) {
107 std::forward<PromptStr>(prompt),
115 explicit operator bool() const noexcept;
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.