| 292 | } |
| 293 | |
| 294 | struct CALC_IFactory* CALC_IFactoryImpl_create() |
| 295 | { |
| 296 | static struct CALC_IFactoryVTable vtable = { |
| 297 | {NULL}, |
| 298 | CALC_IFactory_VERSION, |
| 299 | CALC_IFactoryImpl_dispose, |
| 300 | CALC_IFactoryImpl_createStatus, |
| 301 | CALC_IFactoryImpl_createCalculator, |
| 302 | CALC_IFactoryImpl_createCalculator2, |
| 303 | CALC_IFactoryImpl_createBrokenCalculator |
| 304 | }; |
| 305 | |
| 306 | struct CALC_IFactory* impl = malloc(sizeof(struct CALC_IFactory)); |
| 307 | impl->vtable = &vtable; |
| 308 | |
| 309 | return impl; |
| 310 | } |
| 311 | |
| 312 | |
| 313 | //-------------------------------------- |