BBoxInterp Struct Reference
[Compiler]

#include <extfunc.h>


Detailed Description

Each blackbox equation may show up more than once in a simulation if models repeat in the structure. For each occurence of the blackbox, a unique BBoxInterp object is given when the set of corresponding relations is created. It is used for the blackbox to communicate to the rest of the system. If the blackbox retains internal state between evaluation calls, it should store this state in the user_data pointer.


Data Fields

enum Calc_status status
void * user_data
enum Request_type task


Field Documentation

enum Calc_status BBoxInterp::status

status is set by blackbox calls before returning.

void* BBoxInterp::user_data

user_data is set by the blackbox if it has any persistent state during calls to initial and final functions given in CreateUserFunctionBlackBox.

enum Request_type BBoxInterp::task

What the caller wants done on a given call.

As black boxes are represented with 5 function pointers, one might think this is not needed. Providing the 'task' here allows one to implement only one function and have it handle all types of calls. It also facilitates cases where there is checking rather than evaluation.

Note:
Problem? Don't init functions and evaluation functions have different signatures?


The documentation for this struct was generated from the following file:
Generated on Thu Jul 17 04:00:57 2008 for libascend by  doxygen 1.5.1