cee::imp::cae::ReaderSettingsDataProvider

class ReaderSettingsDataProvider

Settings applicable to the DataProvider plugin reader.

represented with a: cee::Str providerIdString

and a collection of: [ key , value , DataType , description ]

Public Types

enum DataType

Data value types.

Values:

enumerator DOUBLE

Enum to indicates that value is a double.

enumerator BOOL

Enum to indicates that value is a boolean.

enumerator STRING

Enum to indicates that value is a string.

Public Functions

ReaderSettingsDataProvider(const cee::Str &providerIdString)

Constructs the reader settings object injecting the Data provider plugin id.

ReaderSettingsDataProvider(const ReaderSettingsDataProvider &other)

Constructs a ReaderSettingsDataProvider as a copy of other.

ReaderSettingsDataProvider &operator=(const ReaderSettingsDataProvider &other)

Assigns other to this and returns a reference to this ReaderSettingsDataProvider instance.

const cee::Str &providerIdString() const

Returns the name id of the Data provider plugin associated to these settings.

size_t count() const

Returns number of user settings (options) of the data provider plugin.

const cee::Str &key(size_t index) const

Returns the key at index position.

DataType dataType(size_t index) const

Returns the DataType (DOUBLE,BOOL,STRING) at index position.

const cee::Str &description(size_t index) const

Returns a brief functionality explanation associated to the setting.

double doubleValue(size_t index) const

If DataType = DOUBLE, returns the current setting value, otherwise returns cee::UNDEFINED_DOUBLE.

bool boolValue(size_t index) const

If DataType = BOOL, returns the current setting value (true or false), otherwise returns false.

const cee::Str &stringValue(size_t index) const

If DataType = STRING, returns the current setting value, otherwise returns string “UNDEFINED”.

size_t keyIndex(const cee::Str &key) const

Returns position index whose setting key equals the input. If not found, returns cee::UNDEFINED_SIZE_T.

void setDoubleValue(const cee::Str &key, double value)

If key exist, set its value. Otherwise, insert new key-value of DataType::DOUBLE.

void setBoolValue(const cee::Str &key, bool value)

If key exist, set its value. Otherwise, insert new key-value of DataType::BOOL.

void setStringValue(const cee::Str &key, const cee::Str &value)

If key exist, set its value. Otherwise, insert new key-value of DataType::STRING.

void setDescription(const cee::Str &key, const cee::Str &description)

Sets description associated to the key. Do nothing if key not found.