|
Rebel Fork Framework
|
Description of an automatically serializable variable. More...
#include <Urho3D/Core/Attribute.h>
Public Member Functions | |
| AttributeInfo (const AttributeInfo &other)=default | |
| AttributeInfo (VariantType type, const char *name, const SharedPtr< AttributeAccessor > &accessor, const char **enumNames, const Variant &defaultValue, AttributeModeFlags mode) | |
| Construct attribute. | |
| AttributeInfo (VariantType type, const char *name, const SharedPtr< AttributeAccessor > &accessor, const StringVector &enumNames, const Variant &defaultValue, AttributeModeFlags mode) | |
| Construct attribute. | |
| const Variant & | GetMetadata (const StringHash &key) const |
| Return attribute metadata. | |
| template<class T > | |
| T | GetMetadata (const StringHash &key) const |
| Return attribute metadata of specified type. | |
| bool | ShouldSave () const |
| Return whether the attribute should be saved. | |
| bool | ShouldLoad () const |
| Return whether the attribute should be loaded. | |
| const ea::string & | ConvertEnumToString (unsigned value) const |
| Convert enum value to string. | |
| unsigned | ConvertEnumToUInt (ea::string_view value) const |
| Convert enum value to integer. | |
Public Attributes | |
| VariantType | type_ = VAR_NONE |
| Attribute type. | |
| ea::string | name_ |
| Name. | |
| StringHash | nameHash_ |
| Name hash. | |
| StringVector | enumNames_ |
| Enum names. | |
| SharedPtr< AttributeAccessor > | accessor_ |
| Helper object for accessor mode. | |
| Variant | defaultValue_ |
| Default value for network replication. | |
| AttributeModeFlags | mode_ = AM_DEFAULT |
| Attribute mode: whether to use for serialization, network replication, or both. | |
| VariantMap | metadata_ |
| Attribute metadata. | |
| AttributeScopeHint | scopeHint_ {} |
| Scope hint. | |
Static Private Member Functions | |
| static StringVector | ToVector (const char *const *strings) |
Description of an automatically serializable variable.