Is there a way to fix cpp package set into map

i have a map of classes in hscript, i can use any of classes from the map in the script. I want to set some classes from cpp package (Pointer for example) but this always results into error like this one:

error: no matching function for call to 'ClassOf'
HXLINE( 100)            this->setVariable(HX_("Pointer",9d,e8,72,1e),::hx::ClassOf< ::cpp::Pointer >());

i set like that:

public function setVariable(name:String, val:Dynamic)
	hscript.variables.set(name, val);

setVariable('Pointer', cpp.Pointer);

where hscript.variables is a map of those classes that can be used in script… maybe some untyped _cpp_() can solve this?

Unfortunately, it might not be possible to store certain classes in the cpp package like cpp.Pointer
because it’s an extern class that resolves to a hand written C++ class defined in hxcpp.

Being able to convert a static “class” object to a Dynamic requires the class to be created in Haxe so that it is generated with the necessary reflection code in C++. Unfortunately ::cpp::Pointer lacks any reflection code and is just a normal C++ class, so it cannot be used like a Haxe class.

Maybe there’s another way to handle things, but not so sure…