-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Instead of using virtual resolve-function overloads for every derived Model class, we can switch to a lookup-table based approach, where each Node column class has a static NodeClass::resolve(Model*, ModelNode const& n, void* stackMemory) function which is registered in a 256-element array (one slot per possible column type). The registration is done using a new Model::register(columnType, derivedNodeSize, resolveSlotCallback) function. A resolve-slot-function will need to initialize a ModelNode-derived class in-place onto stackMemory, which is always as big as the biggest derivedNodeSize.
Now, the Model::resolve function could also be a template, such that the resolve-callback does not need to be virtual anymore.