Container which stores additional options for MultiFileVolumes which can have an arbitrary number of entries such that future or user defined parameters can be added to MultiFileVolumes without changing the version of the persistent data.
More...
#include <mlMultiFileVolumeAdditionalOptions.h>
|
| MultiFileVolumeAdditionalOptions () |
| Creates an empty container.
|
|
virtual | ~MultiFileVolumeAdditionalOptions () |
|
void | reset () |
| Clears all options and resets the instance to the construction state.
|
|
bool | operator== (const MultiFileVolumeAdditionalOptions &other) const |
| Compares *this and other, returns true on equality, false otherwise.
|
|
bool | operator!= (const MultiFileVolumeAdditionalOptions &other) const |
| Compares *this and other, returns true on inequality, false otherwise.
|
|
size_t | getNumberOfOptions () const |
| Returns number of options currently stored in the container.
|
|
size_t | findOption (const std::string &optionName, bool optionNameMustMatch, const std::string &optionType, bool optionTypeMustMatch, const std::string &optionValue, bool optionValueMustMatch) const |
| Returns the index of the first option matching the method arguments.
|
|
void | appendOption (const std::string &optionName, const std::string &optionType, const std::string &optionValue) |
| Appends a new option to the container.
|
|
MLErrorCode | getOption (size_t index, std::string &optionName, std::string &optionType, std::string &optionValue) const |
| Return contents of the option at position index from the container.
|
|
std::string | toString () const |
| Converts *this to a std::string and returns it.
|
|
MLErrorCode | fromString (const std::string &state, size_t &readPos) |
| Reads a complete instance of this from state at position readPos; readPos is incremented to position after read for subsequent calls.
|
|
Container which stores additional options for MultiFileVolumes which can have an arbitrary number of entries such that future or user defined parameters can be added to MultiFileVolumes without changing the version of the persistent data.
Definition at line 24 of file mlMultiFileVolumeAdditionalOptions.h.
◆ MultiFileVolumeAdditionalOptions()
ml::MultiFileVolumeAdditionalOptions::MultiFileVolumeAdditionalOptions |
( |
| ) |
|
Creates an empty container.
◆ ~MultiFileVolumeAdditionalOptions()
virtual ml::MultiFileVolumeAdditionalOptions::~MultiFileVolumeAdditionalOptions |
( |
| ) |
|
|
virtual |
◆ appendOption()
void ml::MultiFileVolumeAdditionalOptions::appendOption |
( |
const std::string & | optionName, |
|
|
const std::string & | optionType, |
|
|
const std::string & | optionValue ) |
Appends a new option to the container.
- Parameters
-
optionName | A user defined name of the option usually describing what the option means, such as "MicrographFileFormatImagePropertyExtension". |
optionType | The type of the option which identifies the data structure, usually the runtime type such as "StringImagePropertyExtension" which is normally the class name of initClass calls in ProjectInit.cpp files. |
optionValue | The value of the option. |
◆ findOption()
size_t ml::MultiFileVolumeAdditionalOptions::findOption |
( |
const std::string & | optionName, |
|
|
bool | optionNameMustMatch, |
|
|
const std::string & | optionType, |
|
|
bool | optionTypeMustMatch, |
|
|
const std::string & | optionValue, |
|
|
bool | optionValueMustMatch ) const |
Returns the index of the first option matching the method arguments.
- Parameters
-
optionName | Must match in the searched entry if optionNameMustMatch is true. |
optionNameMustMatch | If true then the name of the option must match optionName, otherwise it always matches. |
optionType | Must match in the searched entry if optionTypeMustMatch is true. |
optionTypeMustMatch | If true then the name of the option must match optionType, otherwise it always matches. |
optionValue | Must match in the searched entry if optionValueMustMatch is true. |
optionValueMustMatch | If true then the name of the option must match optionValue, otherwise it always matches. |
- Returns
- std::string::npos if no entry was found, otherwise the index of the found entry matching the method arguments.
◆ fromString()
Reads a complete instance of this from state at position readPos; readPos is incremented to position after read for subsequent calls.
- Parameters
-
state | The string in which a persistent string version of this class is expected at readPos. |
readPos | The position in state where a persistent string of a this class is expected and which is incremented to the next position after this string for subsequent calls. |
- Returns
- On failures a code != ML_RESULT_OK, on success ML_RESULT_OK.
◆ getNumberOfOptions()
size_t ml::MultiFileVolumeAdditionalOptions::getNumberOfOptions |
( |
| ) |
const |
Returns number of options currently stored in the container.
◆ getOption()
MLErrorCode ml::MultiFileVolumeAdditionalOptions::getOption |
( |
size_t | index, |
|
|
std::string & | optionName, |
|
|
std::string & | optionType, |
|
|
std::string & | optionValue ) const |
Return contents of the option at position index
from the container.
- Parameters
-
index | The index of the option, must be from [0, getNumberOfOptions()-1]. |
optionName | Returns the user defined name of the option usually describing what the option means, such as "MicrographFileFormatImagePropertyExtension". |
optionType | Returns the type of the option which identifies the data structure, usually the runtime type such as "StringImagePropertyExtension" which is normally the class name of initClass calls in ProjectInit.cpp files. |
optionValue | Returns the value of the option. |
- Returns
- ML_RESULT_OK if the option could be accessed successfully, otherwise an error code describing the error. In error cases the three returned parameters are left in an undefined state.
◆ operator!=()
Compares *this and other, returns true on inequality, false otherwise.
◆ operator==()
Compares *this and other, returns true on equality, false otherwise.
◆ reset()
void ml::MultiFileVolumeAdditionalOptions::reset |
( |
| ) |
|
Clears all options and resets the instance to the construction state.
◆ toString()
std::string ml::MultiFileVolumeAdditionalOptions::toString |
( |
| ) |
const |
Converts *this to a std::string and returns it.
The documentation for this class was generated from the following file: