List

template<typename T>
class CListUnitParameter : public CBaseUnitParameter

Base class for constant list unit parameters.

Public Functions

inline T GetValue(size_t _index) const

Returns value at the given index of the list.

Returns T{} if no value is defined for the given index.

Parameters

_index – Index of the value.

Returns

Value at the given index.

inline std::vector<T> GetValues() const

Returns all defined values.

Returns

All defined values.

inline T GetMin() const

Returns minimum allowed value.

Returns

Minimum allowed value.

inline T GetMax() const

Returns maximum allowed value.

Returns

Maximum allowed value.

inline SInterval GetLimits() const

Returns allowed interval for the value.

Returns

Allowed interval for the value.

inline size_t Size() const

Returns number of defined values.

Returns

Number of defined values.

inline bool IsEmpty() const

Checks if any value is defined in the list.

Returns

Whether any value is defined.

inline virtual bool IsInBounds() const override

Checks if all values lay in range [min; max].

Returns

Whether all value lay in the allowed interval.