cesium-native
0.41.0
|
Utility classes for Cesium. More...
Classes | |
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 | 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 | DoublyLinkedListPointers |
Contains the previous and next pointers for an element in a DoublyLinkedList. More... | |
class | DoublyLinkedListAdvanced |
A doubly-linked list. 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 |
struct | JsonValueMissingKey |
struct | JsonValueNotRealValue |
class | JsonValue |
A generic implementation of a value in a JSON structure. More... | |
class | Math |
Mathematical constants and functions. More... | |
class | ThreadIdHolder |
class | ThreadIdHolder< false > |
class | ThreadIdHolder< true > |
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 | Uri |
Typedefs | |
template<typename T , DoublyLinkedListPointers< T >T::* Pointers> | |
using | DoublyLinkedList = DoublyLinkedListAdvanced< T, T, Pointers > |
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. More... | |
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. More... | |
template<typename T > | |
using | ResultPointer = Result< IntrusivePointer< T > > |
A convenient shortcut for CesiumUtility::Result<CesiumUtility::IntrusivePointer<T>> . More... | |
Functions | |
bool | isGzip (const gsl::span< const std::byte > &data) |
Checks whether the data is gzipped. More... | |
bool | gzip (const gsl::span< const std::byte > &data, std::vector< std::byte > &out) |
Gzips data. More... | |
bool | gunzip (const gsl::span< const std::byte > &data, std::vector< std::byte > &out) |
Gunzips data. More... | |
template<typename T , typename U > | |
IntrusivePointer< T > | const_intrusive_cast (const IntrusivePointer< U > &p) noexcept |
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. More... | |
template<class TCollection > | |
std::string | joinToString (TCollection collection, const std::string &separator) |
Joins multiple elements together into a string, separated by a given separator. More... | |
template<typename T , typename U > | |
constexpr std::optional< T > | losslessNarrow (U u) noexcept |
template<typename T , typename U > | |
constexpr T | losslessNarrowOrDefault (U u, T defaultValue) noexcept |
template<typename ExistFunction > | |
ScopeGuard (ExistFunction) -> ScopeGuard< ExistFunction > | |
template<typename To , typename From > | |
gsl::span< To > | reintepretCastSpan (const gsl::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::ReferenceCountedNonThreadSafe = typedef 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 132 of file ReferenceCounted.h.
using CesiumUtility::ReferenceCountedThreadSafe = typedef 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 119 of file ReferenceCounted.h.
using CesiumUtility::ResultPointer = typedef Result<IntrusivePointer<T> > |
A convenient shortcut for CesiumUtility::Result<CesiumUtility::IntrusivePointer<T>>
.
T | The type of object that the IntrusivePointer points to. |
bool CesiumUtility::gunzip | ( | const gsl::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 gsl::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 gsl::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.