next up previous contents
Next: 2.6 Program Flow Up: 2. The Algorithm Library Previous: 2.4 Definition of Model Classes


2.5 Definition of Model Classes in MDL

Model classes can be defined by providing C++ code as described in Section 2.4 or by using the MDL interpreter integrated into the Algorithm Library. It should be noted that for the intrinsic C++ type identification mechanism all Model classes defined by using the MDL interpreter are represented by the same simple Model base class type. Only the extended runtime type identification system provided by the Algorithm Library. Further members and methods of Model classes defined in C++ can not be reached with standard C++ member access operators but have to be addressed by forwarding their MDL names to the Algorithm Library. Exceptions are the standard methods evaluate and init which are available for any kind of Model class by using their ``virtual'' method pointers provided by the Model class.

Another exception can be made for C++ methods inherited by MDL Model classes from C++ Model parents to optimize for execution speed. It is possible to request a pointer to the native C++ method with the Model method getCxxParentModelPtr.

To avoid the tedious and runtime consuming lookup of Interface Parameter instances the data exchange with Model instances is organized by linking them to Interface classes provided by the application (Section 2.3.4).


next up previous contents
Next: 2.6 Program Flow Up: 2. The Algorithm Library Previous: 2.4 Definition of Model Classes
Robert Mlekus
1999-11-14