cesium-native  0.41.0
CesiumUtility::ErrorList Struct Reference

The container to store the error and warning list when loading a tile or glTF content. More...

#include <CesiumUtility/ErrorList.h>

Public Member Functions

void merge (const ErrorList &errorList)
 Merge the errors and warnings from other ErrorList together. More...
 
void merge (ErrorList &&errorList)
 Merge the errors and warnings from other ErrorList together. More...
 
template<typename ErrorStr >
void emplaceError (ErrorStr &&error)
 Add an error message. More...
 
template<typename WarningStr >
void emplaceWarning (WarningStr &&warning)
 Add a warning message. More...
 
bool hasErrors () const noexcept
 Check if there are any error messages.
 
template<typename PromptStr >
void logError (const std::shared_ptr< spdlog::logger > &pLogger, PromptStr &&prompt) const noexcept
 Log all the error messages. More...
 
template<typename PromptStr >
void logWarning (const std::shared_ptr< spdlog::logger > &pLogger, PromptStr &&prompt) const noexcept
 Log all the warning messages. More...
 
 operator bool () const noexcept
 Check if there are any error messages.
 

Static Public Member Functions

static ErrorList error (std::string errorMessage)
 Creates an ErrorList containing a single error. More...
 
static ErrorList warning (std::string warningMessage)
 Creates an ErrorList containing a single warning. More...
 

Public Attributes

std::vector< std::string > errors
 The error messages of this container.
 
std::vector< std::string > warnings
 The warning messages of this container.
 

Detailed Description

The container to store the error and warning list when loading a tile or glTF content.

Definition at line 17 of file ErrorList.h.

Member Function Documentation

◆ emplaceError()

template<typename ErrorStr >
void CesiumUtility::ErrorList::emplaceError ( ErrorStr &&  error)
inline

Add an error message.

Parameters
errorThe error message to be added.

Definition at line 55 of file ErrorList.h.

◆ emplaceWarning()

template<typename WarningStr >
void CesiumUtility::ErrorList::emplaceWarning ( WarningStr &&  warning)
inline

Add a warning message.

Parameters
errorThe warning message to be added.

Definition at line 64 of file ErrorList.h.

◆ error()

static ErrorList CesiumUtility::ErrorList::error ( std::string  errorMessage)
static

Creates an ErrorList containing a single error.

Parameters
errorMessageThe error message.
Returns
The new list containing the single error.

◆ logError()

template<typename PromptStr >
void CesiumUtility::ErrorList::logError ( const std::shared_ptr< spdlog::logger > &  pLogger,
PromptStr &&  prompt 
) const
inlinenoexcept

Log all the error messages.

Parameters
pLoggerThe logger to log the messages
promptThe message prompt for the error messages.

Definition at line 80 of file ErrorList.h.

◆ logWarning()

template<typename PromptStr >
void CesiumUtility::ErrorList::logWarning ( const std::shared_ptr< spdlog::logger > &  pLogger,
PromptStr &&  prompt 
) const
inlinenoexcept

Log all the warning messages.

Parameters
pLoggerThe logger to log the messages
promptThe message prompt for the warning messages.

Definition at line 99 of file ErrorList.h.

◆ merge() [1/2]

void CesiumUtility::ErrorList::merge ( const ErrorList errorList)

Merge the errors and warnings from other ErrorList together.

Parameters
errorListThe other instance of ErrorList that will be merged with the current instance.

◆ merge() [2/2]

void CesiumUtility::ErrorList::merge ( ErrorList &&  errorList)

Merge the errors and warnings from other ErrorList together.

Parameters
errorListThe other instance of ErrorList that will be merged with the current instance.

◆ warning()

static ErrorList CesiumUtility::ErrorList::warning ( std::string  warningMessage)
static

Creates an ErrorList containing a single warning.

Parameters
warningMessageThe warning message.
Returns
The new list containing the single warning.

The documentation for this struct was generated from the following file: