assets#

Fully qualified name: carb::assets

namespace assets#

Namespace for carb.assets.plugin and related utilities.

Classes#

ScopedSnapshot

A scoped snapshot, this automatically releases the snapshot when it goes out of scope.

Enumerations#

Reason

The reason a Snapshot was taken or not.

Functions#

Type getAssetType()

Defines a template for users to specialize their asset type as unique identifiers.

bool operator!=(const carb::assets::ScopedSnapshot< Type > &a, const carb::assets::ScopedSnapshot< Type > &b)

ScopedSnapshot inequality operator

bool operator==(const carb::assets::ScopedSnapshot< Type > &a, const carb::assets::ScopedSnapshot< Type > &b)

ScopedSnapshot equality operator

Structs#

AssetTypeParams

Parameters that describe an asset type's characteristics.

IAssets

Defines an interface for managing assets that are loaded asynchronously.

IAssetsBlob

Defines an interface for managing assets that are loaded asynchronously.

LoadContext

A load context that exists for the duration of the load phase. A loader may create a subclass of this to maintain context data about a type.

LoadParameters

Parameters that can be passed into IAssets::loadAsset() . Asset types can create a subclass of this to pass asset-type-specific load parameters through the asset system.

LoaderDesc

Defines the loader functions for an asset type.

Type

Wrapper for an asset type that can be passed to various functions, identifies the asset as a hashed string plus the version number, which can impact the LoadParameters structure.

Typedefs#

AssetHash

The hash must be a strong (not necessarily cryptographically secure) 128-bit hash.

CreateContextFn

Loader function (member of LoaderDesc ) that informs the asset type that loading a file has started and creates any load-specific context data necessary.

CreateDependenciesFn

Loader function (member of LoaderDesc ) that returns a string of the asset dependencies, that is, other files to watch for changes.

CreateLoadParametersFn

Loader function (member of LoaderDesc ) that copies a LoadParameters structure.

DestroyContextFn

Loader function (member of LoaderDesc ) that destroys the data created by CreateContextFn .

DestroyDependenciesFn

Loader function (member of LoaderDesc ) that cleans up the previously returned value from CreateDependenciesFn .

DestroyLoadParametersFn

Loader function (member of LoaderDesc ) that destroys a copied LoadParameters structure.

HashAssetFn

Loader function (member of LoaderDesc ) that hashes an asset's data, this is used to combine collisions in the asset system.

HashLoadParametersFn

Loader function (member of LoaderDesc ) that hashes a LoadParameters structure.

HashedType

C++ Type hash used to identify a C++ type. Typically a hash of a type name string.

Id

An Asset ID, used to identify a particular asset.

IsLoadCanceledFn

Determines if a currently processed load has been canceled.

LoadAssetFn

Loader function (member of LoaderDesc ) used to construct an asset from raw data.

LoadParametersEqualsFn

Loader function (member of LoaderDesc ) that determines if two LoadParameters derivatives are equal.

OnChangeEventFn

Function to provide as a callback on asset changes.

OnDependencyChangedFn

Loader function (member of LoaderDesc ) that is called when a dependency changes.

Pool

An Asset Pool, used to group assets together.

Snapshot

A snapshot, representing asset data at a given point in time.

UnloadAssetFn

Loader function (member of LoaderDesc ) used to unload an asset.

Variables#

constexpr Id kInvalidAssetId

Used to identify an invalid asset id.

constexpr Pool kInvalidPool

Used to identify an invalid pool.

constexpr Snapshot kInvalidSnapshot

Used to identify an invalid snapshot.