[Geneticd-devel] Queuing commands II
Status: Alpha
Brought to you by:
jonnymind
|
From: Jonny M. <jon...@ni...> - 2002-01-14 22:41:08
|
I have a solution that could both provide a coherent and expandible API for the engines and symplify the task to queue the requests sent to an engine: message exchange. I regarded the gengine.h file and, boy, its HUGE. Well not so huge, but it seems to me that is inefficient and full of lots of small functions, that make the task of programming genetic engines an hard one. Suppose that we have a method like: engine->command(int command-id, Vector *params); Vector is a relatively small class, and can store convenient amounts of data; but maybe three or fuor void * parameters are enough. If they are enough for all the MS-Window$ API messages, they should be fine for us. The command parser will be simple: just a switch (all the work is done by the daemon's command parser routines). The return value might be a void *, or a significant structure. This would also reduce a lot of virtual methods (we already have at least 20, and we have just begun), that are an heavy burden for our program. I am having a deep immersion in the gengine code right now to see if this thing is feasible, and with what effort. Giancarlo. |