|
FastLED 3.9.15
|
Opaque handle to a sketch-local asset.
Value type: cheap to copy (a single pointer + size). Created via the FL_ASSET() macro or fl::asset(const char*) below. The FL_ASSET() macro performs an FL_STATIC_ASSERT that the path contains no .. segments.
#include <asset.h>
Public Member Functions | |
| constexpr | asset_ref () FL_NOEXCEPT |
| Default-constructed handle refers to no asset. | |
| asset_ref (const asset_ref &) FL_NOEXCEPT=default | |
| Copy/move: trivial — pointer + length. | |
| constexpr | asset_ref (const char *path, fl::size length) FL_NOEXCEPT |
| Construct from a pointer to a null-terminated string with known length. | |
| constexpr const char * | c_str () const FL_NOEXCEPT |
| Pointer accessor — useful for JSON serialization. | |
| constexpr | operator bool () const FL_NOEXCEPT |
| True if this handle refers to an asset path. | |
| asset_ref & | operator= (const asset_ref &) FL_NOEXCEPT=default |
| fl::string_view | path () const FL_NOEXCEPT |
| The relative asset path as a string view (e.g. "data/track.mp3"). | |
| constexpr fl::size | size () const FL_NOEXCEPT |
Private Attributes | |
| fl::size | mLength |
| const char * | mPath |