Rebel Fork Framework
Urho3D::AttributePrefab Class Reference

#include <Urho3D/Scene/NodePrefab.h>

Public Types

enum  IdentifierType : unsigned char { Id, Name, NameHash, Unused }
 

Public Member Functions

 AttributePrefab (AttributeId id)
 
 AttributePrefab (const ea::string &name)
 
 AttributePrefab (const char *name)
 
 AttributePrefab (StringHash nameHash)
 
void SetValue (const Variant &value)
 
void SetValue (Variant &&value)
 
void SerializeInBlock (Archive &archive, bool compactSave=false)
 
IdentifierType GetIdentifierType () const
 
AttributeId GetId () const
 
const ea::string & GetName () const
 
StringHash GetNameHash () const
 
VariantType GetType () const
 
const VariantGetValue () const
 
bool operator== (const AttributePrefab &rhs) const
 
bool operator!= (const AttributePrefab &rhs) const
 

Private Attributes

AttributeId id_ {}
 
ea::string name_
 
StringHash nameHash_
 
Variant value_ {}
 

Detailed Description

Attribute prefab. Contains representation of attribute with value, type information and identifier. At least one of the following identifiers should be present:

  • Zero-based attribute ID optimized for variable-length encoding. Zero is invalid value.
  • Full attribute name. May be empty if loaded from compacted binary archive.
  • Attribute name hash. May be present even if attribute name is empty.

The documentation for this class was generated from the following files: