From: Andrew F. <af...@ph...> - 2006-06-12 10:49:52
|
Rainer Sounds good I strongly suggest you create a new directory for=20 'internal' headers. External applications can then be built without the internal header directory being on their include path. This would then make it very easy to detect if a dependency on the internal headers has 'drifted' into the API. The internal headers could be called something like odeModelInternal.h or odeModel_Internal.h Note you obviously don't have to declare structures and function prototypes in headers. They can be declared in .c files yours Andrew > -----Original Message----- > From: sbm...@li...=20 > [mailto:sbm...@li...] On=20 > Behalf Of Rainer Machne > Sent: 12 June 2006 11:18 > To: SOSlib Development > Subject: [SOSlib-devel] API reorganization[Scanned] >=20 > Hi All >=20 > the point # 1.4 API reorganization of our online development wiki > (http://www.tbi.univie.ac.at/wiki/index.php/SOSlibDevel) >=20 > might be one thing that should be done soon, before=20 > implementing more functionality. >=20 >=20 >=20 > For some c files we have three header files, e.g. >=20 > odeModel.h > odeModelStruct.h > odemodeldatatype.h >=20 > which confuses me a bit. >=20 >=20 > 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. >=20 > It was initially thought, and I want to keep it that way, that=20 > applications include the odeModel.h file. >=20 > Then we also have the > #ifdef __cplusplus > extern "C" { > #endif > definitions in all header files. >=20 > So what are the requirements for all this? >=20 > The main point is to >=20 > * hide structures and internal functions from calling applications. >=20 > The second point is that we need to >=20 > * map the C code to C++. >=20 > Right? >=20 >=20 >=20 > The following would be my plan: >=20 > in odeModel.h > * SBML_ODESOLVER_API functions=20 > * structure type definitions (only e.g. typedef struct odeModel=20 > odeModel_t) >=20 > in odeModelStruct.h=20 > * the full structure declaration >=20 > Questions: >=20 > What about the third file in the odeModel example. Is this required? >=20 > Where should we move the declarations for internal (non-API)=20 > functions? >=20 > * in odeModel.h but e.g. outside of the > extern "C" { > definitions? >=20 > * in odeModelStruct.h? Should we rename it then? >=20 > happy about any suggestions, > Rainer >=20 >=20 >=20 > _______________________________________________ > sbmlsolver-devel mailing list > sbm...@li... > https://lists.sourceforge.net/lists/listinfo/sbmlsolver-devel >=20 |