Browse Source

Add method to retrieve the DataTypeRegister during model binding. (#413)

John 2 years ago
parent
commit
17688059de
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Include/RmlUi/Core/DataModelHandle.h

+ 4 - 0
Include/RmlUi/Core/DataModelHandle.h

@@ -125,6 +125,10 @@ public:
 		type_register->GetTransformFuncRegister()->Register(name, std::move(transform_func));
 	}
 
+	// Returns the type register.
+	// The type register contains VariableDefinitions of all the data types registered to this data model's owning context.
+	DataTypeRegister* GetDataTypeRegister() const { return type_register; }
+
 	explicit operator bool() { return model && type_register; }
 
 private: