I have a large number (current is low hundreds but plan is for several thousand) of different macros/functions which all have the same specified input & output but do different operations on the input depending on the individual macro/function.
(i.e. [a int, b int] → macro### → [c int, d int] and [a int] → function### → [b int],
Ideally:
Early on, a selection on which macros/functions is made for use later on. (i.e. saved somewhere)
Later, that selection is ‘recalled’ and that specific macro/function is used.
(i.e. [a int, b int] → load_from_save_macro → [c int, d int], etc.)
I currently have a wrapper macro which is essentially a large switch-case based on an integer saved value to determine which macro/function to use.
This is slower than I think it could be, and (as I expand into the thousands of case switches) I would want some implementation which is easier to maintain.
1. Should I be worried about case-switch bloat or is this not really a problem?
2. Is there a way to do this with blueprints, or should I start coding it in C++?
If this is a C++ thing, is this the right direction or is there something I am missing?
In a potential C++ implementation, I might want to create a class function for a super, then have each of my current/future macros be a subclass of that and override the same super’s function with their own custom implementation. Then, I would instantiate an object of a desired child’s type at the selection time, save it, and load that object for later use.