| PathEngine home | previous: | next: |
Use
Use
Note that these 'interface version numbers' are distinct from the major and minor
release numbers for the SDK as a whole.
Interface version numbers are purely for managing binary compatibility across the API interface.
A release that just includes stuff like bug fixes and optimisation can be made without any change to interface version numbers.
When a public release adds methods to the end of any interface the minor version number relating to that interface is incremented.
This kind of change can be made without breaking binary compatibility between PathEngine and code compiled with old
versions of the headers.
In this situation executables can continue to run against the new dll, without recompilation.
If any methods are removed from the interface,
or if the linkage is changed for any existing method,
then the major version number is incremented
and the minor version reset to 0.
After this kind of change any code calling the interface must be recompiled.
The PathEngine interface numbers apply to all the interfaces provided by
i_pathengine.h.
The TestBed interface numbers apply just to iTestBed.
The following code should be used to check for interface incompatibility before calling any other functions through the interface:
// for an interface to iPathEngine
// check if interfaces are compatible with the headers used for compilation
// pathengine is a pointer to iPathEngine
if(pathengine->getInterfaceMajorVersion() != PATHENGINE_INTERFACE_MAJOR_VERSION
|| pathengine->getInterfaceMinorVersion() < PATHENGINE_INTERFACE_MINOR_VERSION
)
{
//.. report an error - code must be recompiled with new headers
}
//.. the interface is compatible with the headers used for compilation
// for an interface to iTestBed
// check if interfaces are compatible with the headers used for compilation
// testbed is a pointer to iTestBed
if(testbed->getInterfaceMajorVersion() != TESTBED_INTERFACE_MAJOR_VERSION
|| testbed->getInterfaceMinorVersion() < TESTBED_INTERFACE_MINOR_VERSION
)
{
//.. report an error - code must be recompiled with new headers
}
//.. the interface is compatible with the headers used for compilation
|
PATHENGINE_INTERFACE_MAJOR_VERSION and
PATHENGINE_INTERFACE_MINOR_VERSION
are defined in i_pathengine.h.
TESTBED_INTERFACE_MAJOR_VERSION and
TESTBED_INTERFACE_MINOR_VERSION
are defined in i_testbed.h.
| Documentation for PathEngine release 5.16 - Copyright © 2002-2008 PathEngine | next: |