HaxeFoundation / HaxeFoundation/hxcpp

Access to cpp.Struct fields when wrapped as Dynamic (and in cppia?)

Open
#1,176 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
330
Forks
227
Avg merge
2d 16h
Merged PRs (30d)
18

Description

Let's say `Native` is a c++ struct with a `float foo` field.

```haxe
final n:Native = allocNativeSomehow();
final s:cpp.Struct = n;
trace(n.foo); // works
final d:Dynamic = s;
trace(d.foo): // null
```

It would be nice to generate a Dynamic wrapper for each `cpp.Struct` with proper reflection support. And I assume it is possible (?) because the type information of `Native` is known by Haxe at compile time.

I also assume that would enable access to cpp.Struct from cppia as well?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.