datatype reworks. vector and tree.#1733
Open
Azaezel wants to merge 18 commits into
Open
Conversation
variation on vector
todo: see about using the former in the latter
tree->treenode for clarity, foreshorted a few method names, added a few inline utility methods
extended template to use a compiletime nullClears (defaults to true) to clear nodes if they would be set to NULL entries cleanups and refactors yet more utility methods
added new methods inline void nullChild(U32 i) static void safeDetachFromParent(TreeNode<T, nullClears>* node) inline void forEachLeafAs(Func callback)
…andling, more utility methods, mostly focused on extracting vectors, plugging in callback enabled functions, and the ability to add safety checks like circular dependency detection (also tree stitching)
…erently inline, never hurst to spell it out
…t and skip the tracking vars.
refactor treeobject to better leverage vector COUNT limiter
… a member variable typofix in tree. which...somehow compiled on windows anyway... will have to hunt that down..
marauder2k7
approved these changes
May 16, 2026
|
|
||
| #endif | ||
|
|
||
| void test_Vector_dynamic() { |
Contributor
There was a problem hiding this comment.
do ya want this broken out to a unit test ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For the core vector class: Adds the capacity to set a fixed size to a given vector at compile time. Adds the capacity to redirect the standard allocator to a custom one.
New fundamental datatype: TreeNode. structured as a Vector of Vectors of a given type, contains leaf/node logic helpers, as well as a holder example class, TreeObject, which demonstrates serializing to and from the console for any given console-aware data struct.
Intended usage is for a new generalized backbone for scenegraphs, armatures, nodegraphs, FSM states, ect.