19 ga::AttributeType type_;
23 type_ = attribute->getType();
29 if constexpr (std::is_same<int, T>::value)
31 data_=attribute->intStore_;
35 else if constexpr (std::is_same<float, T>::value)
37 data_=attribute->floatStore_;
41 else if constexpr (std::is_same<enzo::bt::Vector3, T>::value)
43 data_=attribute->vector3Store_;
47 throw std::runtime_error(
"Type " + std::to_string(
static_cast<int>(type_)) +
" was not properly accounted for");
51 void addValue(T value)
54 data_->push_back(value);
57 std::vector<T> getAllValues()
const
67 T getValue(
size_t pos)
const
71 return data_->at(pos);
74 void setValue(
size_t pos,
const T& value)
78 (*data_)[pos] = value;
80 std::string getName()
const
99 std::shared_ptr<std::vector<T>> data_;