Documentation Index
Fetch the complete documentation index at: https://mintlify.com/usnistgov/NFIQ2/llms.txt
Use this file to discover all available pages before exploring further.
The NFIQ2::Version namespace provides access to version information, build metadata, and third-party component versions.
Version constants and metadata for NFIQ2.
Version Numbers
Semantic version components.
| Constant | Type | Description |
|---|
Major | unsigned int | Major version number |
Minor | unsigned int | Minor version number |
Patch | unsigned int | Patch version number |
Example:
unsigned int major = NFIQ2::Version::Major;
unsigned int minor = NFIQ2::Version::Minor;
unsigned int patch = NFIQ2::Version::Patch;
std::cout << "NFIQ2 Version: " << major << "." << minor << "." << patch << std::endl;
Version Strings
Formatted version information strings.
| Constant | Type | Description |
|---|
Full | std::string | Full version information, including build date and git SHA |
Pretty | std::string | Version information formatted in a way suitable for printing |
Status | std::string | Build version status (e.g., pre-release, beta, etc.) |
Example:
std::cout << "NFIQ2 Full Version: " << NFIQ2::Version::Full << std::endl;
std::cout << "NFIQ2 Status: " << NFIQ2::Version::Status << std::endl;
std::cout << NFIQ2::Version::Pretty << std::endl;
Metadata about the current build.
| Constant | Type | Description |
|---|
BuildDate | std::string | Current build date (format: %Y%m%d%H%M) |
Commit | std::string | Current build commit (git short SHA) |
Example:
std::cout << "Build Date: " << NFIQ2::Version::BuildDate << std::endl;
std::cout << "Git Commit: " << NFIQ2::Version::Commit << std::endl;
Third-Party Components
Version information for integrated third-party libraries.
OpenCV
OpenCV version used in this build.
extern const std::string OpenCV
Example:
std::cout << "OpenCV Version: " << NFIQ2::Version::OpenCV << std::endl;
FingerJet
FingerJet FX OSE version.
Returns: FingerJet version string
Example:
std::string fjVersion = NFIQ2::Version::FingerJet();
std::cout << "FingerJet Version: " << fjVersion << std::endl;
Usage Examples
#include <nfiq2_version.hpp>
#include <iostream>
void printVersionInfo() {
std::cout << "=== NFIQ2 Version Information ===" << std::endl;
std::cout << NFIQ2::Version::Pretty << std::endl;
std::cout << "Full: " << NFIQ2::Version::Full << std::endl;
std::cout << "Status: " << NFIQ2::Version::Status << std::endl;
std::cout << std::endl;
std::cout << "=== Build Information ===" << std::endl;
std::cout << "Build Date: " << NFIQ2::Version::BuildDate << std::endl;
std::cout << "Commit: " << NFIQ2::Version::Commit << std::endl;
std::cout << std::endl;
std::cout << "=== Dependencies ===" << std::endl;
std::cout << "OpenCV: " << NFIQ2::Version::OpenCV << std::endl;
std::cout << "FingerJet: " << NFIQ2::Version::FingerJet() << std::endl;
}
Version Comparison
#include <nfiq2_version.hpp>
bool isVersionSupported(unsigned int requiredMajor, unsigned int requiredMinor) {
if (NFIQ2::Version::Major > requiredMajor) {
return true;
}
if (NFIQ2::Version::Major == requiredMajor &&
NFIQ2::Version::Minor >= requiredMinor) {
return true;
}
return false;
}
int main() {
if (!isVersionSupported(2, 3)) {
std::cerr << "NFIQ2 version 2.3 or higher required" << std::endl;
return EXIT_FAILURE;
}
// Continue with operations
}
Command-Line Version Display
#include <nfiq2_version.hpp>
#include <iostream>
int main(int argc, char *argv[]) {
if (argc > 1 && std::string(argv[1]) == "--version") {
std::cout << NFIQ2::Version::Pretty << std::endl;
return EXIT_SUCCESS;
}
if (argc > 1 && std::string(argv[1]) == "--version-full") {
std::cout << "Version: " << NFIQ2::Version::Full << std::endl;
std::cout << "Build: " << NFIQ2::Version::BuildDate << std::endl;
std::cout << "Commit: " << NFIQ2::Version::Commit << std::endl;
std::cout << "OpenCV: " << NFIQ2::Version::OpenCV << std::endl;
std::cout << "FingerJet: " << NFIQ2::Version::FingerJet() << std::endl;
return EXIT_SUCCESS;
}
// Continue with normal program flow
}
Logging Version at Startup
#include <nfiq2_algorithm.hpp>
#include <nfiq2_version.hpp>
#include <iostream>
class NFIQProcessor {
public:
NFIQProcessor() {
logVersionInfo();
}
private:
void logVersionInfo() {
std::cout << "[INFO] Starting NFIQ2 Processor" << std::endl;
std::cout << "[INFO] " << NFIQ2::Version::Pretty << std::endl;
std::cout << "[INFO] Build " << NFIQ2::Version::Commit
<< " (" << NFIQ2::Version::BuildDate << ")" << std::endl;
}
};
Conditional Feature Support
#include <nfiq2_version.hpp>
class FeatureManager {
public:
bool supportsActionableFeedback() const {
// Actionable feedback introduced in 2.1
return (NFIQ2::Version::Major > 2) ||
(NFIQ2::Version::Major == 2 && NFIQ2::Version::Minor >= 1);
}
bool supportsExtendedQualityMeasures() const {
// Extended measures introduced in 2.2
return (NFIQ2::Version::Major > 2) ||
(NFIQ2::Version::Major == 2 && NFIQ2::Version::Minor >= 2);
}
};
Source Reference
Defined in: NFIQ2/NFIQ2Algorithm/include/nfiq2_version.hpp