30 void PackValue(Variable* a_dst, T&& a_src)
41 BSTSmartPointer<Array> array;
42 TypeInfo typeInfo(GetRawType<typename U::value_type>());
43 if (!vm->CreateArray(typeInfo,
static_cast<std::uint32_t
>(a_src.size()), array) || !array) {
48 auto it = a_src.begin();
49 auto end = a_src.end();
52 if constexpr (std::is_same_v<U, std::vector<bool>>) {
53 (*array)[i++].Pack(
static_cast<bool>(*it));
55 (*array)[i++].Pack(*it);
60 a_dst->SetArray(std::move(array));
77 std::remove_const_t<T> container;
78 if (a_src->IsNoneObject()) {
82 auto array = a_src->GetArray();
88 for (
auto& elem : *array) {
89 container.push_back(elem.Unpack<
typename T::value_type>());
static VirtualMachine * GetSingleton()
T UnpackValue(const Variable *a_src)
Definition: PackUnpack.h:184
void PackValue(Variable *a_dst, T &&a_src)
Definition: PackUnpack.h:86
Definition: AbsorbEffect.h:6