Hello!
I am trying to figure out how to best document the interface structures we use
in our project. The general deal is as follows: C-language, but C++-class-like
interfaces are passed on between the modules. It'd be most intuitive to describe
the function pointers in these interfaces instead of the actual implementations
of the functions. The function members area actually filled in a constructor
method that is called upon loading of the module, which makes the process
logically opaque to all the other modules.
Example:
typedef struct
{
void (*functionOne) (void);
void (*functionTwo) (const char* two_parameter);
int (*functionThree) (int three_parameter);
} myInterface;
Addendum: These functions exist, with similar but not always identical names,
however, as several interfaces in one module may have an 'open' member, for
example...
In this example, the actual implementations of the functions would thus probably
be called "myintfunctionOne", etc.
--
Regards,
Moritz Voss
|