Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

native_* examples in cpp documentation #6498

stefansjs started this conversation in General
Discussion options

Hey folks. You may or may not know that I've been attempting to maintain a flatbuffers syntax highlighting plugin for IntelliJ IDEs. https://github.com/stefansjs/flatbuffers-intellij-plugin. I recent had an issue filed (stefansjs/flatbuffers-intellij-plugin#27) that I don't support the native_* directives. I went to look for the documentation and examples, but the examples are hard to follow because they show what the generated code looks like and not how to use them.

Can you add a "how to use" oriented documentation section the native_* documentation?

Here's my best guess

namespace Geometry;
attribute force_align;
struct Vector3D (native_type:"Native::Vector3D", force_align)
{
 // according to the flatbuffers parser implementation, native_inline and native_default are only relevant to a struct
 x:float (native_inline, native_default:10);
 y:float;
 z:float;
}
// Howerver, a custom allocator may be applied to a struct or a table, esp to allocate native struct types
table ApplicationData(native_custom_alloc:"custom_allocator") {
 vectors:[Vector3D];
}
You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /