#include <VersionedProperty.h>
|
| AZ_RTTI (VersionedProperty, "{828CA9C0-32F1-40B3-8018-EE7C3C38192A}") |
|
| AZ_CLASS_ALLOCATOR (VersionedProperty, AZ::SystemAllocator) |
|
| VersionedProperty (AZStd::string label) |
|
| VersionedProperty (const VersionedProperty &rhs) |
|
| VersionedProperty (VersionedProperty &&rhs) |
|
VersionedProperty & | operator= (const VersionedProperty &rhs) |
|
| VersionedProperty (AZ::ScriptDataContext &) |
|
AZ::Uuid | GetType () const |
|
void | SetLabel (const char *label) |
|
AZStd::string | GetLabel () const |
|
bool | operator== (const VersionedProperty &rhs) const |
|
AZStd::string | ToString () const |
|
bool | operator!= (const VersionedProperty &rhs) const |
|
void | IncreaseVersion () |
|
void | Get (AZ::ScriptDataContext &dc) |
|
void | Set (AZ::ScriptDataContext &dc) |
|
bool | IsEmpty () const |
|
template<typename T > |
void | Set (T &&data) |
| Data can only be set into a property through this function.
|
|
template<typename T > |
const T * | Get () const |
| Returns the latest version of the property.
|
|
template<typename T > |
bool | Get (T &out) const |
|
template<typename T > |
T * | Get () |
|
void | Set (const char *str) |
|
VersionedProperty & | NewVersion () |
| Creates a new version of the desired property.
|
|
void | OnPropertyChange () |
|
void | Flatten () |
|
void | ApplyLatestVersions () |
|
AZ::Uuid | GetId () const |
|
AZ::u32 | GetVersion () const |
|
const AZStd::vector< VersionedProperty > & | GetVersions () const |
|
const AZStd::any & | GetRaw () const |
|
template<typename T > |
void | SetDefaultFromType () |
|
void | PreSave () |
|
A VersionedProperty holds a default or starting value and a list of versions. The list of versions is immutable until the moment the property is flattened. Flattening a property discards all versioning information but the latest and can be used when it is desired to reduce the data size footprint. Keeping the versioning data around is incredibly handly for backwards compatibility.
◆ ApplyLatestVersions()
void ScriptEventData::VersionedProperty::ApplyLatestVersions |
( |
| ) |
|
|
inline |
Applies the latest version as the default, it can be used to make it easy to get access to the latest version.
◆ Flatten()
void ScriptEventData::VersionedProperty::Flatten |
( |
| ) |
|
|
inline |
Applies the latest version as the default and clears the versioned information. Warning: This operation is intentionally destructive, if the asset is saved after flattening The versioning information will be lost, however, the asset size will be reduced.
The documentation for this class was generated from the following file:
- Gems/ScriptEvents/Code/Include/ScriptEvents/Internal/VersionedProperty.h