From: Rainer M. <ra...@tb...> - 2006-06-12 10:18:12
|
Hi All the point # 1.4 API reorganization of our online development wiki (http://www.tbi.univie.ac.at/wiki/index.php/SOSlibDevel) might be one thing that should be done soon, before implementing more functionality. For some c files we have three header files, e.g. odeModel.h odeModelStruct.h odemodeldatatype.h which confuses me a bit. In odeModel.h we have all the API function definitions, in odemodeldatatype.h there is only typedef struct odeModel odeModel_t; and in odeModelStruct.h the odeModel structure is defined. It was initially thought, and I want to keep it that way, that applications include the odeModel.h file. Then we also have the #ifdef __cplusplus extern "C" { #endif definitions in all header files. So what are the requirements for all this? The main point is to * hide structures and internal functions from calling applications. The second point is that we need to * map the C code to C++. Right? The following would be my plan: in odeModel.h * SBML_ODESOLVER_API functions * structure type definitions (only e.g. typedef struct odeModel odeModel_t) in odeModelStruct.h * the full structure declaration Questions: What about the third file in the odeModel example. Is this required? Where should we move the declarations for internal (non-API) functions? * in odeModel.h but e.g. outside of the extern "C" { definitions? * in odeModelStruct.h? Should we rename it then? happy about any suggestions, Rainer |