Go to the source code of this file.
◆ SG_ATTRIBUTE
#define SG_ATTRIBUTE |
( |
|
attr_name, |
|
|
|
attr_type, |
|
|
|
attr_container |
|
) |
| |
Value: const attr_type& get##attr_name() const { return attr_container; } \
void set##attr_name(const attr_type& v) { \
if (attr_container == v) return; \
attr_container = v; \
this->invalidate(); \
} \
void set##attr_name(attr_type&& v) { \
if (attr_container == v) return; \
attr_container = std::move(v); \
this->invalidate(); \
}
◆ SG_MAPPED_ATTRIBUTE
#define SG_MAPPED_ATTRIBUTE |
( |
|
attr_name, |
|
|
|
attr_type, |
|
|
|
attr_container |
|
) |
| |
Value: attr_type get##attr_name() const { return attr_container.get##attr_name(); } \
void set##attr_name(const attr_type& v) { \
if (attr_container.get##attr_name() == v) return; \
attr_container.set##attr_name(v); \
this->invalidate(); \
} \
void set##attr_name(attr_type&& v) { \
if (attr_container.get##attr_name() == v) return; \
attr_container.set##attr_name(std::move(v)); \
this->invalidate(); \
}