1 #ifndef VTESTBED_ASSETS_CONVERT_HH 2 #define VTESTBED_ASSETS_CONVERT_HH 6 #include <vtestbed/assets/format.hh> 7 #include <vtestbed/assets/options.hh> 13 template <
class T> T import_asset(
Options options);
14 std::any import_asset(
Options options);
15 template <
class To,
class From> To convert(
const From& from,
Options options);
16 template <
class T> T convert(std::any from,
Options options);
17 std::any convert(std::any from,
Options options);
18 template <
class T>
void export_asset(
const T& asset,
Options options);
19 void export_asset(std::any asset,
Options options);
21 template <
class To,
class From> To
inline convert(std::any from,
Options options) {
22 return convert<To,From>(std::any_cast<From>(from), std::move(options));
24 template <
class T>
inline void export_asset(std::any asset,
Options options) {
25 return export_asset<T>(std::any_cast<T>(asset), std::move(options));
32 #endif // vim:filetype=cpp