Hi i was wondering what would be some of possible ways to get my program working like this:
1) Server sends command (that is function name/ object creator + arguments) 2) Client decodes what command is this - using some hash table of function id's etc
Problem is - if i know that the command is to create objectX and objectX constructor takes two arguments - for example int Z and float Y.
Now i know i must create objectX, but how do know what arguments i must read in to construct it? Im looking for fast ways to do this, also so that garbage generation is kept very low.
One way would be to just have one big case for each function or ctor, but im not big fan of "uber switch" approaches.
Any ideas?