cesium-native 0.43.0
|
Utility classes for Cesium. More...
Classes | |
class | AttributeCompression |
Functions to handle compressed attributes in different formats. More... | |
struct | Credit |
Represents an HTML string that should be shown on screen to attribute third parties for used data, imagery, etc. Acts as a handle into a CreditSystem object that actually holds the credit string. More... | |
class | CreditSystem |
Creates and manages Credit objects. Avoids repetitions and tracks which credits should be shown and which credits should be removed this frame. More... | |
class | DoublyLinkedListAdvanced |
A doubly-linked list. More... | |
class | DoublyLinkedListPointers |
Contains the previous and next pointers for an element in a DoublyLinkedList . More... | |
struct | ErrorList |
The container to store the error and warning list when loading a tile or glTF content. More... | |
struct | ExtensibleObject |
The base class for objects that have extensions and extras. More... | |
struct | Hash |
Contains functions for working with hashes. More... | |
class | IDepotOwningAsset |
An interface representing the depot that owns a SharedAsset . This interface is an implementation detail of the shared asset system and should not be used directly. More... | |
class | IntrusivePointer |
A smart pointer that calls addReference and releaseReference on the controlled object. More... | |
class | JsonHelpers |
A collection of helper functions to make reading JSON simpler. More... | |
class | JsonValue |
A generic implementation of a value in a JSON structure. More... | |
class | Math |
Mathematical constants and functions. More... | |
class | ReferenceCounted |
A reference-counted base class, meant to be used with IntrusivePointer . More... | |
struct | Result |
Holds the result of an operation. If the operation succeeds, it will provide a value. It may also provide errors and warnings. More... | |
struct | Result< CesiumUtility::IntrusivePointer< T > > |
Holds the result of an operation. If the operation succeeds, it will provide a value. It may also provide errors and warnings. More... | |
class | ScopeGuard |
A utility that will automatically call the lambda function when exiting a scope. More... | |
class | SharedAsset |
An asset that is potentially shared between multiple objects, such as an image shared between multiple glTF models. This is intended to be the base class for such assets. More... | |
class | StringHelpers |
Helper functions for working with strings. More... | |
class | Uri |
A class for building and manipulating Uniform Resource Identifiers (URIs). More... | |
Typedefs | |
template<typename T , DoublyLinkedListPointers< T >T::* Pointers> | |
using | DoublyLinkedList = DoublyLinkedListAdvanced<T, T, Pointers> |
An intrusive doubly-linked list. | |
template<typename T > | |
using | ReferenceCountedThreadSafe = ReferenceCounted<T, true> |
A reference-counted base class, meant to be used with IntrusivePointer . The reference count is thread-safe, so references may be added and removed from any thread at any time. The object will be destroyed in the thread that releases the last reference. | |
template<typename T > | |
using | ReferenceCountedNonThreadSafe = ReferenceCounted<T, false> |
A reference-counted base class, meant to be used with IntrusivePointer . The reference count is not thread-safe, so references must be added and removed (including automatically via IntrusivePointer ) from only one thread at a time. | |
template<typename T > | |
using | ResultPointer = Result<IntrusivePointer<T>> |
A convenient shortcut for CesiumUtility::Result<CesiumUtility::IntrusivePointer<T>> . | |
Functions | |
bool | isGzip (const std::span< const std::byte > &data) |
Checks whether the data is gzipped. | |
bool | gzip (const std::span< const std::byte > &data, std::vector< std::byte > &out) |
Gzips data. | |
bool | gunzip (const std::span< const std::byte > &data, std::vector< std::byte > &out) |
Gunzips data. | |
template<typename T , typename U > | |
IntrusivePointer< T > | const_intrusive_cast (const IntrusivePointer< U > &p) noexcept |
Casts a const IntrusivePointer to its non-const equivalent. | |
template<class TIterator > | |
std::string | joinToString (TIterator begin, TIterator end, const std::string &separator) |
Joins multiple elements together into a string, separated by a given separator. | |
template<class TCollection > | |
std::string | joinToString (TCollection collection, const std::string &separator) |
Joins multiple elements together into a string, separated by a given separator. | |
template<typename T , typename U > | |
constexpr std::optional< T > | losslessNarrow (U u) noexcept |
Attempts a narrowing conversion of U into T without losing information. If a lossless conversion can't be performed, std::nullopt is returned. | |
template<typename T , typename U > | |
constexpr T | losslessNarrowOrDefault (U u, T defaultValue) noexcept |
Attempts a narrowing conversion of U into T without losing information. If a lossless conversion can't be performed, defaultValue is returned. | |
template<typename ExitFunction > | |
ScopeGuard (ExitFunction) -> ScopeGuard< ExitFunction > | |
Template deduction guide for ScopeGuard to help the compiler figure out that the type of ExitFunction should be the type of the function passed to the constructor. | |
template<typename To , typename From > | |
std::span< To > | reintepretCastSpan (const std::span< From > &from) noexcept |
This function converts between span types. This function has the same rules with C++ reintepret_cast https://en.cppreference.com/w/cpp/language/reinterpret_cast. So please use it carefully. | |
Utility classes for Cesium.
using CesiumUtility::DoublyLinkedList = DoublyLinkedListAdvanced<T, T, Pointers> |
An intrusive doubly-linked list.
Definition at line 272 of file DoublyLinkedList.h.
using CesiumUtility::ReferenceCountedNonThreadSafe = ReferenceCounted<T, false> |
A reference-counted base class, meant to be used with IntrusivePointer
. The reference count is not thread-safe, so references must be added and removed (including automatically via IntrusivePointer
) from only one thread at a time.
T | The type that is deriving from this class. For example, you should declare your class as class MyClass : public ReferenceCountedNonThreadSafe<MyClass> { ... }; |
Definition at line 134 of file ReferenceCounted.h.
using CesiumUtility::ReferenceCountedThreadSafe = ReferenceCounted<T, true> |
A reference-counted base class, meant to be used with IntrusivePointer
. The reference count is thread-safe, so references may be added and removed from any thread at any time. The object will be destroyed in the thread that releases the last reference.
T | The type that is deriving from this class. For example, you should declare your class as class MyClass : public ReferenceCountedThreadSafe<MyClass> { ... }; |
Definition at line 121 of file ReferenceCounted.h.
using CesiumUtility::ResultPointer = Result<IntrusivePointer<T>> |
A convenient shortcut for CesiumUtility::Result<CesiumUtility::IntrusivePointer<T>>
.
T | The type of object that the IntrusivePointer points to. |
|
noexcept |
Casts a const
IntrusivePointer to its non-const equivalent.
p | The const IntrusivePointer. |
Definition at line 237 of file IntrusivePointer.h.
bool CesiumUtility::gunzip | ( | const std::span< const std::byte > & | data, |
std::vector< std::byte > & | out ) |
Gunzips data.
If successful, it will return true and the result will be in the provided vector.
data | The data to gunzip. |
out | The gunzipped data. |
bool CesiumUtility::gzip | ( | const std::span< const std::byte > & | data, |
std::vector< std::byte > & | out ) |
Gzips data.
If successful, it will return true and the result will be in the provided vector.
data | The data to gzip. |
out | The gzipped data. |
bool CesiumUtility::isGzip | ( | const std::span< const std::byte > & | data | ) |
Checks whether the data is gzipped.
data | The data. |
std::string CesiumUtility::joinToString | ( | TCollection | collection, |
const std::string & | separator ) |
Joins multiple elements together into a string, separated by a given separator.
TIterator | The type of the collection iterator. |
collection | The collection of elements to be joined. |
separator | The string to use to separate successive elements. |
Definition at line 44 of file joinToString.h.
std::string CesiumUtility::joinToString | ( | TIterator | begin, |
TIterator | end, | ||
const std::string & | separator ) |
Joins multiple elements together into a string, separated by a given separator.
TIterator | The type of the collection iterator. |
begin | An iterator referring to the first element to join. |
end | An iterator referring to one past the last element to join. |
separator | The string to use to separate successive elements. |
Definition at line 19 of file joinToString.h.
|
constexprnoexcept |
Attempts a narrowing conversion of U
into T
without losing information. If a lossless conversion can't be performed, std::nullopt
is returned.
U | The type to convert from. |
T | The type to convert to. |
u | The value to perform the conversion on. |
Definition at line 29 of file JsonValue.h.
|
constexprnoexcept |
Attempts a narrowing conversion of U
into T
without losing information. If a lossless conversion can't be performed, defaultValue
is returned.
U | The type to convert from. |
T | The type to convert to. |
u | The value to perform the conversion on. |
defaultValue | The value that will be returned if a lossless conversion can't be performed. |
Definition at line 55 of file JsonValue.h.
|
noexcept |
This function converts between span types. This function has the same rules with C++ reintepret_cast https://en.cppreference.com/w/cpp/language/reinterpret_cast. So please use it carefully.
Definition at line 13 of file SpanHelper.h.