Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Include Page
OPENMI:4.5 Step 5 - Implementing the MyEngineWrapper class
OPENMI:4.5 Step 5 - Implementing the MyEngineWrapper class

4.

...

The fifth step is to implement the MyEngineWrapper class (Figure 11).

Image Removed

The MyEngineWrapper class must implement the IEngine interface (Oatc.OpenMI.Sdk.Wrapper.IEngine). The easiest way to get started is to make your development environment auto-generate the stub code for this interface.

...

Code Block

using System; using System.Collections; namespace MyOrganisation.OpenMI.MyModel {     public class MyEngineWrapper : Oatc.OpenMI.Sdk.Wrapper.IEngine     {            private MyEngineDotNetAccess \_myEngine;         public void Initialize(Hashtable properties)         {              \_myEngine = new MyEngineDotNetAccess();             \_myEngine.Initialize((string)properties\["FilePath"\]);         }         public void Finish()                 {             \_simpleRiverEngine.Finish();         }     } }

4.6 Step 6: Implementing the MyModelLinkablComponent

...