-
Type:
Improvement
-
Resolution: Won't Fix
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
I saw in a lot of places in the code base, we switch based on the page type or table type and perform specific operations. I think enum pattern can help us remove most of these switch statements.
What we need to do is to create enum for page and table and define function pointers in the enum.
In this way, we can decide what enum we need to pass at the top level and the downstream code only need to call the functions defined in the enum, limiting the switch only at the top level.