NAP
Public Member Functions | Public Attributes | List of all members
TargetAttribute Class Reference

#include <instanceproperty.h>

Public Member Functions

bool apply (rtti::Object &target, utility::ErrorState &errorState) const
 

Public Attributes

std::string mPath
 RTTI path to the property. More...
 
rtti::ObjectPtr< InstancePropertyValuemValue
 Value to override. More...
 

Description

Represents both the path to an attribute as well as the value to override. Together with the target object that must be given in apply(), this can be used to override a property.

Collaboration diagram for TargetAttribute:
[legend]

Member Function Documentation

◆ apply()

bool apply ( rtti::Object target,
utility::ErrorState errorState 
) const

Applies the stored override value on the target and attribute path.

Parameters
targetThe object that holds the attribute.
errorStateIf function returns false, contains error information if an error occurs.
Returns
True on success, otherwise false.

Member Data Documentation

◆ mPath

std::string mPath

RTTI path to the property.

◆ mValue

Value to override.