Plasma Engine  2.0
Loading...
Searching...
No Matches
ObjectPropertyPath.h
1#pragma once
2
3#include <EditorFramework/EditorFrameworkDLL.h>
4
5#include <Foundation/Strings/String.h>
6#include <Foundation/Types/Status.h>
7#include <Foundation/Types/Uuid.h>
8#include <Foundation/Types/Variant.h>
9
13class plStringBuilder;
15
16struct PL_EDITORFRAMEWORK_DLL plPropertyReference
17{
18 bool operator==(const plPropertyReference& rhs) const
19 {
20 return m_Object == rhs.m_Object && m_pProperty == rhs.m_pProperty && m_Index == rhs.m_Index;
21 }
22 plUuid m_Object;
23 const plAbstractProperty* m_pProperty;
24 plVariant m_Index;
25};
26
33
34class PL_EDITORFRAMEWORK_DLL plObjectPropertyPath
35{
36public:
37 static plStatus CreatePath(const plObjectPropertyPathContext& context, const plPropertyReference& prop, plStringBuilder& out_sObjectSearchSequence,
38 plStringBuilder& out_sComponentType, plStringBuilder& out_sPropertyPath);
39 static plStatus CreatePropertyPath(const plObjectPropertyPathContext& context, const plPropertyReference& prop, plStringBuilder& out_sPropertyPath);
40
41 static plStatus ResolvePath(const plObjectPropertyPathContext& context, plDynamicArray<plPropertyReference>& out_keys,
42 const char* szObjectSearchSequence, const char* szComponentType, const char* szPropertyPath);
43 static plStatus ResolvePropertyPath(const plObjectPropertyPathContext& context, const char* szPropertyPath, plPropertyReference& out_key);
44
45 static const plDocumentObject* FindParentNodeComponent(const plDocumentObject* pObject);
46
47private:
48 static plStatus PrependProperty(
49 const plDocumentObject* pObject, const plAbstractProperty* pProperty, plVariant index, plStringBuilder& out_sPropertyPath);
50};
This is the base interface for all properties in the reflection system. It provides enough informatio...
Definition AbstractProperty.h:150
Definition DocumentObjectBase.h:11
Definition DynamicArray.h:81
Definition ObjectAccessorBase.h:8
Definition ObjectPropertyPath.h:35
plStringBuilder is a class that is meant for creating and modifying strings.
Definition StringBuilder.h:35
This data type is the abstraction for 128-bit Uuid (also known as GUID) instances.
Definition Uuid.h:11
plVariant is a class that can store different types of variables, which is useful in situations where...
Definition Variant.h:44
Definition ObjectPropertyPath.h:28
plObjectAccessorBase * m_pAccessor
Accessor used to traverse hierarchy and query properties.
Definition ObjectPropertyPath.h:30
plString m_sRootProperty
In case m_pContextObject points to the root object, this is the property to follow.
Definition ObjectPropertyPath.h:31
const plDocumentObject * m_pContextObject
Paths start at this object.
Definition ObjectPropertyPath.h:29
Definition ObjectPropertyPath.h:17
An plResult with an additional message for the reason of failure.
Definition Status.h:12