Core SDK Version and Metadata Module.
The imtcore module provides version information and core metadata for the ImtCore SDK, enabling version checking, compatibility validation, and SDK identification across applications.
Overview
This lightweight module serves as the identity provider for the ImtCore SDK:
- SDK version identification
- Version compatibility checking
- Build metadata and configuration
- SDK-wide constants and identifiers
Architecture
Version Management
Version Identification:**
enum VersionId {
VI_IMTCORE = 1977
};
The version identifier serves as:
- Compile-time SDK version check
- Runtime compatibility validation
- Plugin API version matching
- Binary compatibility verification
Usage Examples
Version Checking
Check SDK Version:**
#include <imtcore/Version.h>
void CheckSdkVersion()
{
int sdkVersion = imtcore::VI_IMTCORE;
qDebug() << "ImtCore SDK Version:" << sdkVersion;
const int REQUIRED_VERSION = 1977;
if (sdkVersion < REQUIRED_VERSION) {
qFatal("ImtCore SDK version too old. Required: %d, Found: %d",
REQUIRED_VERSION, sdkVersion);
}
}
Plugin Compatibility
Plugin Version Validation:**
class CMyPluginComp : public ACF_COMPONENT(IMyPlugin)
{
public:
int GetRequiredSdkVersion() const override
{
return imtcore::VI_IMTCORE;
}
bool IsCompatibleWithSdk(int sdkVersion) const override
{
return sdkVersion == imtcore::VI_IMTCORE;
}
};
Build Information
Display Build Information:**
void DisplayAboutDialog()
{
QMessageBox aboutBox;
aboutBox.setWindowTitle("About Application");
QString aboutText = QString(
"Application Version: 1.0.0\n"
"ImtCore SDK Version: %1\n"
"Build Date: %2\n"
"Qt Version: %3"
).arg(imtcore::VI_IMTCORE)
.arg(__DATE__)
.arg(QT_VERSION_STR);
aboutBox.setText(aboutText);
aboutBox.exec();
}
Best Practices
Version Management
- Check SDK version at application startup
- Validate plugin compatibility before loading
- Use version identifiers in binary formats
- Document version requirements in README
- Implement graceful degradation for version mismatches
Compatibility Considerations
- Major version changes may break API compatibility
- Check version before calling new SDK features
- Provide fallback implementations for older versions
- Test applications against multiple SDK versions
- Document minimum required SDK version
Integration with Other Modules
SDK-wide Usage:
- All ImtCore modules depend on imtcore
- Version checking in plugin systems
- Binary format compatibility validation
- Build configuration and metadata
References
Related Modules:
- imtbase - Core infrastructure
- All ImtCore modules use imtcore for versioning
External Documentation: