mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-21 09:48:12 +01:00
Setting pattern from memory (#218)
* ToString accepts c-style arrays * added patternParameters to python * fixed patwait time bug in validation * moved load from file function to patterParameters * server using patternparamters structure to get pattern Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com>
This commit is contained in:
@@ -181,6 +181,23 @@ std::string ToString(const std::map<KeyType, ValueType> &m) {
|
||||
return os.str();
|
||||
}
|
||||
|
||||
/**
|
||||
* Print a c style array
|
||||
*/
|
||||
template<typename T, size_t size>
|
||||
std::string ToString(const T(&arr)[size]){
|
||||
std::ostringstream os;
|
||||
os << '[';
|
||||
if (size){
|
||||
size_t i = 0;
|
||||
os << ToString(arr[i++]);
|
||||
for (; i<size; ++i)
|
||||
os << ", " << ToString(arr[i]);
|
||||
}
|
||||
os << ']';
|
||||
return os.str();
|
||||
}
|
||||
|
||||
/**
|
||||
* For a container loop over all elements and call ToString on the element
|
||||
* Container<std::string> is excluded
|
||||
|
||||
Reference in New Issue
Block a user