cesium-native 0.52.0
Loading...
Searching...
No Matches
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.
 
void merge (ErrorList &&errorList)
 Merge the errors and warnings from other ErrorList together.
 
template<typename ErrorStr>
void emplaceError (ErrorStr &&error)
 Add an error message.
 
template<typename WarningStr>
void emplaceWarning (WarningStr &&warning)
 Add a warning message.
 
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.
 
template<typename PromptStr>
void logWarning (const std::shared_ptr< spdlog::logger > &pLogger, PromptStr &&prompt) const noexcept
 Log all the warning messages.
 
template<typename PromptStr>
void log (const std::shared_ptr< spdlog::logger > &pLogger, PromptStr &&prompt) const noexcept
 Log all the error and warning messages.
 
template<typename PromptStr>
std::string format (PromptStr &&prompt) const noexcept
 Format all of the errors and warnings into a single string.
 
 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.
 
static ErrorList warning (std::string warningMessage)
 Creates an ErrorList containing a single warning.
 

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 18 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 56 of file ErrorList.h.

◆ emplaceWarning()

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

Add a warning message.

Parameters
warningThe warning message to be added.

Definition at line 65 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.

◆ format()

template<typename PromptStr>
std::string CesiumUtility::ErrorList::format ( PromptStr && prompt) const
inlinenoexcept

Format all of the errors and warnings into a single string.

Parameters
promptThe message prompt for the messages.
Returns
The formatted message, or an empty string if there are no errors or warnings.

Definition at line 141 of file ErrorList.h.

◆ log()

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

Log all the error and warning messages.

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

Definition at line 120 of file ErrorList.h.

◆ 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 81 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 100 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.

Member Data Documentation

◆ errors

std::vector<std::string> CesiumUtility::ErrorList::errors

The error messages of this container.

Definition at line 169 of file ErrorList.h.

◆ warnings

std::vector<std::string> CesiumUtility::ErrorList::warnings

The warning messages of this container.

Definition at line 174 of file ErrorList.h.


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