jsoysouvanh/Refureku

`info.isObject` is never `true` in `GeneratedClassCodeTemplate::generateGetArchetypeMacro`

Closed this issue · 2 comments

(info.isObject) ? " " + returnedType + " const& getArchetype() const noexcept override { return " + info.name + "::staticGetArchetype(); }" : ""

Hi! Great library! I have been trying to integrate this library to my engine and but sadly it looks like I can't get the above code to ever be evaluated to true with the following snippet:

// File: Component.hpp
#pragma once
#include <generated/Component.rfk.h>

class RFKClass() IComponentBase : public rfk::Object
{
	public:
		virtual ~IComponentBase() = default;

	IComponentBase_GENERATED
}

File_GENERATED

Removing the conditional to force the generation of getArchetype() solves my problem. But obviously is not the right way. 😅

Thanks!

Hi oyagci!
Thank you for the kind words :)

This usually happens when the parser can't rewind the hierarchy because it has unknown symbols.
Are you sure your parsing settings (inside the toml if you use it, or in the FileParsingSettings directly) are correct ?
Especially the "projectIncludeDirectories" part. It must match exactly the project include directories in your project (so you should at least have the path to the Refureku include directory there).

Let me know if that solves your problem :)

It did solve my issue. Thanks!