Enzo
Loading...
Searching...
No Matches
Attribute.h
1#pragma once
2#include <string>
3#include <optional>
4#include <string_view>
5#include <vector>
6#include "Engine/Types.h"
7#include <memory>
8
9
10namespace enzo{
11 namespace ga{
12
13 template <typename T>
14 class AttributeHandle;
15
17 {
18 public:
19 Attribute(std::string name, ga::AttributeType type);
20 AttributeType getType();
21 std::string getName();
22
23
24
25 template <typename T>
26 friend class AttributeHandle;
27
28 private:
29 // private attributes are attributes that are hidden from the user
30 // for internal use
31 bool private_=false;
32 // hidden attributes are user accessible attributes that the user may
33 // or may want to use
34 bool hidden_=false;
35 // allows the user to read the attribute but not modify it
36 bool readOnly_=false;
37
38 ga::AttributeType type_;
39
40 std::string name_;
41
42 void* data_;
43
44
45 // data stores
46 std::shared_ptr<std::vector<int>> intStore_;
47 std::shared_ptr<std::vector<float>> floatStore_;
48 std::shared_ptr<std::vector<enzo::bt::Vector3>> vector3Store_;
49 };
50
51
52 }
53}
Definition AttributeHandle.h:17
Definition Attribute.h:17