12template <
typename T>
using StoreContainer = std::vector<T>;
14template <
typename T>
class AttributeHandle;
48 attr::AttributeType type,
49 bool intrinsic =
false,
62 Vector3 getVector3(Offset offset)
const;
63 Matrix4 getMatrix4(Offset offset)
const;
64 size_t getSize()
const;
95 void compact(
const std::vector<bool>& keep);
103 bool private_ =
false;
109 bool intrinsic_ =
false;
112 unsigned int typeSize_ = 1;
116 using StoreVariant = std::variant<
117 std::shared_ptr<StoreContainer<intT>>,
118 std::shared_ptr<StoreContainer<floatT>>,
119 std::shared_ptr<StoreContainer<enzo::Vector3>>,
120 std::shared_ptr<StoreContainer<enzo::boolT>>,
121 std::shared_ptr<StoreContainer<enzo::Matrix4>>>;
125using attribVector = std::vector<std::shared_ptr<attr::Attribute>>;
Basic attribute, parameter, and node types for Enzo.
AttributeType
Data types available to store attribute values in.
Definition Types.h:32
Read only accessor for enzo::attr::Attribute.
Definition AttributeHandle.h:197
Read write accessor for enzo::attr::Attribute.
AttributeType getType() const
Returns the attribute type this attribute stores.
Definition Attribute.cpp:116
bool isIntrinsic() const
Returns whether the attribute is intrinsic.
Definition Attribute.cpp:77
std::string getName() const
Returns the name of this attribute.
Definition Attribute.cpp:118
Attribute(std::string name, attr::AttributeType type, bool intrinsic=false, bool isPrivate=false)
Construct a new attribute and initialize its typed storage.
Definition Attribute.cpp:9
bool isPrivate() const
Returns whether the attribute is private.
Definition Attribute.cpp:79
void resize(size_t size)
Changes the number of elements stored.
Definition Attribute.cpp:49
unsigned int getTypeSize() const
Returns the number of components in the type (eg. StringT is 1, vectorT is 3).
void compact(const std::vector< bool > &keep)
Removes entries marked as deleted, defragmenting the storage so offsets are contiguous again.
Definition Attribute.cpp:54