|
MMDevice 70
|
Public Member Functions | |
| template<typename V > | |
| void | AddTag (const char *key, V value) |
| Add a tag. | |
| void | AddTag (const char *key, const char *value) |
| Optimized overload for string values. | |
| template<typename V > | |
| void | AddTag (const std::string &key, V value) |
| Overload for std::string key. | |
| void | Clear () |
| Remove all tags. | |
| const char * | Serialize () const |
| Return this metadata map serialized to string form. | |
|
inline |
Add a tag.
The key must not contain newlines.
At present, standard and custom keys are not formally distinguished. In custom keys, it is recommended to include a prefix identifying the camera adapter. For example, "AcmeCam-SensorTemperature" where AcmeCam is the name of the camera adapter.
The value should be a string, integer, or floating point number. If it is a string, it must not contain newlines. Very long strings are discouraged.
If a tag with the same key is added more than once, the last value wins. However, doing so may consume memory. Call Clear() to reuse an instance; if some of the tags are constant, keep an instance with just the constant tags and copy-assign it to the reused instance.
| key | the key (must not be null) |
| value | the value |
Referenced by AddTag(), and CCameraBase< U >::GetTags().
|
inline |
Return this metadata map serialized to string form.
This is the form used to transmit data from a camera device to MMCore via the InsertImage() function. (The exact format may change with the Device Interface Version.)
The returned string is valid until this metadata map is mutated or destroyed.
Referenced by CCameraBase< U >::GetTags().