TFunction_Driver

Hi,

w.r.t to the OCAF way !

Once we load MyFunction_Driver (inherited from TFunciton_Driver) into the TFunction_DriverTable, does the driver-table persist even after it goes out of scope. If the routine is called again does it re-create the driver table. If a different routine is called which also instantiates a driver table in it's scope does that create problems. Do we always have to check if a driver table is already in existence and if so, if the driver we require has already been loaded into it.

Thanks,
Suds

Serge's picture

Hi,

The driver table is implemented using a static map,
that map will exists even if the DriverTable is out of scope. There is no need to check whether the driver
table is created as on attempt to add a driver to not
existent table it'll be instantiated in the method AddDriver. The drivers in added to the table will be available till the end of application (process).

Regards,
Serge

Serge's picture

Opps, i mistook method AddDriver and Get, it's
method Get where the table is instantiated.