-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Added some missing field info to the EngineApi interface #2241
Conversation
@@ -63,11 +63,12 @@ extern bool VectorResize(U32 *aSize, U32 *aCount, void **arrayPtr, U32 newCount, | |||
template<class T> | |||
class Vector | |||
{ | |||
protected: | |||
public: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quite dangerous, completely breaks encapsulation...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I forgot I made that change in there, wanted to bring it up and ask if there were another way to do it.. Maybe moving the Implement Struct to somewhere associated with Vector?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An alternative solution is hard-coding the offsets:
IMPLEMENT_STRUCT( Vector< bool >,
BoolVector,,
"" )
{"elementCount", "", 1, TYPE<U32>(), 0},
{"arraySize", "", 1, TYPE<U32>(), 4},
{"array", "", 1, TYPE<bool*>(), 8},
//FIELD(mElementCount, elementCount, 1, "")
//FIELD(mArraySize, arraySize, 1, "")
//FIELD(mArray, elements, 1, "")
END_IMPLEMENT_STRUCT;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or the offsets could be computed and defined in tVector.h, but that sort of breaks encapsulation as well.
Added WIP tag, until we can figure out how to handle Vector stuff. |
Structs that have access permission issues:
|
Closed in favor of #2366 |
This probably doesn't have any effect on how the engine works, but it is nice for documentation and engine API export purposes.