MeVisLab Toolbox Reference
ml::MultiFileVolumeAdditionalOptions Class Reference

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>

Public Member Functions

 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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ MultiFileVolumeAdditionalOptions()

ml::MultiFileVolumeAdditionalOptions::MultiFileVolumeAdditionalOptions ( )

Creates an empty container.

◆ ~MultiFileVolumeAdditionalOptions()

virtual ml::MultiFileVolumeAdditionalOptions::~MultiFileVolumeAdditionalOptions ( )
virtual

Member Function Documentation

◆ 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
optionNameA user defined name of the option usually describing what the option means, such as "MicrographFileFormatImagePropertyExtension".
optionTypeThe 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.
optionValueThe 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
optionNameMust match in the searched entry if optionNameMustMatch is true.
optionNameMustMatchIf true then the name of the option must match optionName, otherwise it always matches.
optionTypeMust match in the searched entry if optionTypeMustMatch is true.
optionTypeMustMatchIf true then the name of the option must match optionType, otherwise it always matches.
optionValueMust match in the searched entry if optionValueMustMatch is true.
optionValueMustMatchIf 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()

MLErrorCode ml::MultiFileVolumeAdditionalOptions::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.

Parameters
stateThe string in which a persistent string version of this class is expected at readPos.
readPosThe 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
indexThe index of the option, must be from [0, getNumberOfOptions()-1].
optionNameReturns the user defined name of the option usually describing what the option means, such as "MicrographFileFormatImagePropertyExtension".
optionTypeReturns 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.
optionValueReturns 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!=()

bool ml::MultiFileVolumeAdditionalOptions::operator!= ( const MultiFileVolumeAdditionalOptions & other) const

Compares *this and other, returns true on inequality, false otherwise.

◆ operator==()

bool ml::MultiFileVolumeAdditionalOptions::operator== ( const MultiFileVolumeAdditionalOptions & other) const

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: