|
Bifrost SDK
Bifrost SDK documentation
|
This class is a RAII guard for a Bifrost::Object property. More...
#include <GeoPropertyGuard.h>
Public Member Functions | |
| PropertyGuard ()=default | |
| Creates an invalid guard. More... | |
| ~PropertyGuard () | |
| Destroyes the guard and sets the property value back into the Object. More... | |
| PropertyGuard (const PropertyGuard &)=delete | |
| Copy constructor is deleted. More... | |
| PropertyGuard & | operator= (const PropertyGuard &)=delete |
| PropertyGuard (PropertyGuard &&io) noexcept | |
| Moving a guard is allowed. More... | |
| PropertyGuard & | operator= (PropertyGuard &&io) noexcept |
| Moving a guard is allowed. More... | |
| operator bool () const noexcept | |
| Check if this PropertyGuard has acquired a property. More... | |
| const T & | operator* () const noexcept |
| Returns the value of the property. More... | |
| T & | operator* () noexcept |
| Returns the value of the property. noexcept More... | |
| const T * | operator-> () const noexcept |
| Returns a pointer to the property. More... | |
| T * | operator-> () noexcept |
| Returns a pointer to the property. noexcept More... | |
Friends | |
| PropertyGuard< T > | createPropGuard (Bifrost::Object &, Amino::StringView) |
| Create a PropertyGuard for the given object and property name. More... | |
This class is a RAII guard for a Bifrost::Object property.
| T | The data type of the property. |
This class is used to extract, modify and then set back a property value within a Bifrost::object. This is the preferred method to modify a property of an Object since extracting the property does not increase its reference count, and thus if there are no other references to the value, it will be modified in-place and no copy-on-write will occur. See Amino::Ptr for more details on reference counting.
Do not construct a PropertyGuard directly. Use Bifrost::createPropGuard instead.
Definition at line 147 of file GeoPropertyGuard.h.
|
default |
Creates an invalid guard.
|
inline |
Destroyes the guard and sets the property value back into the Object.
Definition at line 153 of file GeoPropertyGuard.h.
References Bifrost::Object::setProperty().
|
delete |
Copy constructor is deleted.
|
inlinenoexcept |
Moving a guard is allowed.
Definition at line 164 of file GeoPropertyGuard.h.
|
inlineexplicitnoexcept |
Check if this PropertyGuard has acquired a property.
Definition at line 183 of file GeoPropertyGuard.h.
|
inlinenoexcept |
Returns the value of the property.
Definition at line 186 of file GeoPropertyGuard.h.
|
inlinenoexcept |
Returns the value of the property. noexcept
noexcept
Definition at line 192 of file GeoPropertyGuard.h.
|
inlinenoexcept |
Returns a pointer to the property.
Definition at line 198 of file GeoPropertyGuard.h.
|
inlinenoexcept |
Returns a pointer to the property. noexcept
noexcept
Definition at line 204 of file GeoPropertyGuard.h.
|
delete |
|
inlinenoexcept |
Moving a guard is allowed.
Definition at line 172 of file GeoPropertyGuard.h.
|
friend |
Create a PropertyGuard for the given object and property name.
| [in,out] | object | The input object. |
| [in] | propertyName | The name of the property to extract. |
PropertyGuard RAII class that extracts the property with type T and name propertyName from object and sets the property back when the guard is destructed. Definition at line 122 of file GeoPropertyGuard.h.