4 #include "swCommonLib/Common/RTTR.h"
15 static std::vector< rttr::property > GetPropertyPath (
Object*
object,
const std::string& propertyPath,
char separator =
'/' );
16 static std::vector< rttr::property > GetPropertyPath ( rttr::variant
object,
const std::string& propertyPath, Size offset = 0,
char separator =
'/' );
18 static std::pair< rttr::variant, rttr::property > GetProperty (
Object*
object,
const std::string& propertyPath,
char separator =
'/' );
19 static std::pair< rttr::variant, rttr::property > GetProperty ( rttr::variant
object,
const std::string& propertyPath, Size offset = 0,
char separator =
'/' );
20 static std::pair< rttr::variant, rttr::property > GetProperty (
Object*
object,
const std::vector< rttr::property >& propertyPath );
22 template<
typename Type >
23 static Type GetValue (
Object*
object,
const std::vector< rttr::property >& propertyPath );
25 static rttr::property EmptyProperty ();
26 static TypeID
GetRealType (
const rttr::variant&
object );
35 template<
typename Type >
36 inline Type Properties::GetValue (
Object*
object,
const std::vector< rttr::property >& propertyPath )
38 rttr::variant propertyVal = object;
40 for(
auto& property : propertyPath )
42 propertyVal =
property.get_value( propertyVal );
45 return propertyVal.get_value< Type >();
static TypeID GetRealType(const rttr::variant &object)
Gets real type of object. If class inherited EngineObject, we can check it's real type...
Definition: Properties.cpp:127
Base clas for all objects in sleeping wombat libraries.
Definition: Object.h:42
Definition: Properties.h:10