mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Allow version and supported devices to be printed at runtime
This commit is contained in:
@@ -7,6 +7,10 @@ std::vector<std::shared_ptr<Device>> icsneo::FindAllDevices() {
|
||||
return DeviceFinder::FindAll();
|
||||
}
|
||||
|
||||
std::vector<DeviceType> icsneo::GetSupportedDevices() {
|
||||
return DeviceFinder::GetSupportedDevices();
|
||||
}
|
||||
|
||||
size_t icsneo::ErrorCount(ErrorFilter filter) {
|
||||
return ErrorManager::GetInstance().count(filter);
|
||||
}
|
||||
|
||||
@@ -12,4 +12,15 @@ neoversion_t icsneo::GetVersion(void) {
|
||||
version.buildBranch = GIT_BRANCH;
|
||||
version.buildTag = GIT_DESCRIBE;
|
||||
return version;
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const neoversion_t& version) {
|
||||
os << 'v' << version.major << '.' << version.minor << '.' << version.patch;
|
||||
if(version.metadata[0] != '\0')
|
||||
os << '+' << version.metadata;
|
||||
if(std::string(version.buildBranch) != "master")
|
||||
os << ' ' << version.buildBranch << " @";
|
||||
if(version.buildTag[0] != 'v')
|
||||
os << ' ' << version.buildTag;
|
||||
return os;
|
||||
}
|
||||
Reference in New Issue
Block a user