cee::rep::FieldValueSet

class FieldValueSet

Helper class for populating field data from an UnstructGridModel.

When creating a report, the user can specify a set of field values (key/value pairs) to be replaced in the generated report. For convenience, a base collection is provided using this helper class along with the requested UnstructGridModel. The user can freely add his own field values on top of these if required.

The field value are a map of keys and values both represented as strings.

See topic Field Values for more information on the usage of field values.

Public Functions

FieldValueSet()

Constructs an empty set.

FieldValueSet(const FieldValueSet &other)

Constructs a new set that is a copy of other.

FieldValueSet &operator=(const FieldValueSet &rhs)

Assigns rhs to this set and returns a reference to this set.

void setValue(const Str &fieldName, const Str &value)

Set value for the specified field name.

Str value(const Str &fieldName) const

Get value for the specified field name. Returns empty string if the field name was not found.

std::vector<Str> allFieldNames() const

Get array with all the field names in the set.

std::vector<Str> allValues() const

Get array with all the values in the set.

Public Static Functions

static FieldValueSet fromModel(cee::ug::UnstructGridModel *model)

Creates a new FieldValueSet object from the specified UnstructGridModel.