FastLED 3.9.15
Loading...
Searching...
No Matches
asset.cpp.hpp File Reference

Detailed Description

Runtime implementation of fl::resolve_asset.

Part of the v1 asset pipeline (FastLED issue #2284). v1 platforms are WASM and host/stub only. Other platforms (e.g. ESP32) are handled by the fallback branch below, which currently returns an empty fl::url. TODO(#2284): ESP32 LittleFS / SD-card resolution is future work.

Definition in file asset.cpp.hpp.

#include "fl/asset/asset.h"
#include "fl/stl/fstream.h"
#include "fl/stl/noexcept.h"
#include "fl/stl/string.h"
#include "fl/stl/string_view.h"
#include "fl/stl/url.h"
#include "fl/stl/vector.h"
#include "platforms/is_platform.h"
+ Include dependency graph for asset.cpp.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fl::asset_detail::AssetEntry
 Process-local registry of (asset_path → resolved URL) pairs. More...
 

Namespaces

namespace  fl
 Base definition for an LED controller.
 
namespace  fl::asset_detail
 

Functions

fl::url fl::asset_detail::lookup_registry (fl::string_view path) FL_NOEXCEPT
 Look up an asset path in the registry. Returns invalid url() on miss.
 
void fl::register_asset (fl::string_view path, const fl::url &u) FL_NOEXCEPT
 Public helper: plug an asset mapping at runtime.
 
fl::vector< AssetEntry > & fl::asset_detail::registry () FL_NOEXCEPT
 
fl::url fl::resolve_asset (const asset_ref &a) FL_NOEXCEPT
 Resolve an asset handle to a URL (or local file path) at runtime.
 

Class Documentation

◆ fl::asset_detail::AssetEntry

struct fl::asset_detail::AssetEntry
+ Collaboration diagram for fl::asset_detail::AssetEntry:
Class Members
string path Relative asset path (e.g. "data/track.mp3").
url url Resolved URL (or file:// for host).