#include <ComponentLayout.h>
|
| | ComponentField ()=default |
| |
| | ComponentField (const std::string &name, ComponentDataType type, size_t offset, const std::string &displayName="") |
| |
| | ComponentField (const std::string &name, ComponentDataType type, size_t offset, const std::string &displayName, const std::vector< ComponentField > &childrenFields) |
| |
| | ComponentField (const std::string &name, ComponentDataType type, const void *dataPtr) |
| |
| | ComponentField (const ComponentField &original, const void *dataPtr) |
| |
| void | CopyValue (Component *src, Component *clone) const |
| |
| const std::string & | GetDisplayName () const |
| |
| bool | HasChildrens () |
| |
Definition at line 14 of file ComponentLayout.h.
◆ ComponentField() [1/5]
| Elevate::ComponentField::ComponentField |
( |
| ) |
|
|
default |
◆ ComponentField() [2/5]
| Elevate::ComponentField::ComponentField |
( |
const std::string & |
name, |
|
|
ComponentDataType |
type, |
|
|
size_t |
offset, |
|
|
const std::string & |
displayName = "" |
|
) |
| |
|
inline |
Definition at line 30 of file ComponentLayout.h.
37 {
39 {
41 }
42 else
43 {
45 }
46 }
uint32_t GetDataTypeSize(EngineDataType type)
◆ ComponentField() [3/5]
| Elevate::ComponentField::ComponentField |
( |
const std::string & |
name, |
|
|
ComponentDataType |
type, |
|
|
size_t |
offset, |
|
|
const std::string & |
displayName, |
|
|
const std::vector< ComponentField > & |
childrenFields |
|
) |
| |
|
inline |
Definition at line 48 of file ComponentLayout.h.
56 {
58 {
60 }
61 else
62 {
64 }
65 }
std::vector< ComponentField > children
◆ ComponentField() [4/5]
| Elevate::ComponentField::ComponentField |
( |
const std::string & |
name, |
|
|
ComponentDataType |
type, |
|
|
const void * |
dataPtr |
|
) |
| |
|
inline |
◆ ComponentField() [5/5]
| Elevate::ComponentField::ComponentField |
( |
const ComponentField & |
original, |
|
|
const void * |
dataPtr |
|
) |
| |
|
inline |
Definition at line 70 of file ComponentLayout.h.
71 :
name(original.name),
type(original.type),
offset(original.offset),
size(original.size),
74 {
75 for (
const auto& child : original.
children)
76 {
77 const void* childDataPtr = reinterpret_cast<const char*>(dataPtr) + child.offset;
78 children.emplace_back(child, childDataPtr);
79 }
80 }
◆ CopyValue()
Definition at line 82 of file ComponentLayout.h.
83 {
84 const void* srcData =
reinterpret_cast<const char*
>(src) +
offset;
85 void* destData =
reinterpret_cast<char*
>(clone) +
offset;
86
88 {
89 std::memcpy(destData, srcData,
size);
90 }
92 {
94 {
95 child.CopyValue(src, clone);
96 }
97 }
98 }
◆ GetDisplayName()
| const std::string & Elevate::ComponentField::GetDisplayName |
( |
| ) |
const |
|
inline |
◆ HasChildrens()
| bool Elevate::ComponentField::HasChildrens |
( |
| ) |
|
|
inline |
◆ children
◆ data
| const void* Elevate::ComponentField::data = nullptr |
◆ displayName
| std::string Elevate::ComponentField::displayName |
◆ flatten
| bool Elevate::ComponentField::flatten = false |
◆ isColor
| bool Elevate::ComponentField::isColor = false |
◆ name
| std::string Elevate::ComponentField::name |
◆ offset
| size_t Elevate::ComponentField::offset = 0 |
◆ readOnly
| bool Elevate::ComponentField::readOnly = false |
◆ size
| uint32_t Elevate::ComponentField::size = 0 |
◆ tooltip
| std::string Elevate::ComponentField::tooltip |
◆ type
The documentation for this struct was generated from the following file: