Rule that defines the labels (alternatively called bins, ticks) of a dimension. More...
Rule that defines the labels (alternatively called bins, ticks) of a dimension.
Each dimension has a rule, which is queried and parsed by the dimension getLabels
and getSize
calls. Three different rule types are supported by openDAQ, with all others having to be set to custom
type, requiring anyone using them to parse them manually.
Dimension rule objects implement the Struct methods internally and are Core type ctStruct
.
The parameters include a delta
, start
, and size
number members. The list of labels of size size
is generated by the equation: index * delta + start, where the index starts with 0 and goes up to size - 1
.
In example: delta = 10, start = 5, size = 5
produces the following list of samples -> [5, 15, 25, 35, 45]
The parameters include a delta
, start
, base
and size
number members. The list of labels of size size
is generated by the equation: base ^ (index * delta + start), where the index starts with 0 and goes up to size - 1
.
In example: delta = 1, start = -2, base = 10 size = 5
produces the following list of samples -> [0.01, 0.1, 1, 10, 20]
The parameters include a list
list-typed member. The list
contains labels, implicitly also defining the dimension size. The labels in the list can be either strings, numbers, or ranges.
String example list: list
= ["banana", "apple", "coconut"] Number example list: = [1.2, 10.5, 20.2, 50.7] Range example list: [1-10, 10-20, 20-30, 30-40, 40-50]
Public Member Functions | |
virtual ErrCode INTERFACE_FUNC | getType (DimensionRuleType *type)=0 |
Gets the type of the dimension rule. More... | |
virtual ErrCode INTERFACE_FUNC | getParameters (IDict **parameters)=0 |
Gets a dictionary of string-object key-value pairs representing the parameters used to evaluate the rule. More... | |
![]() | |
virtual ErrCode INTERFACE_FUNC | borrowInterface (const IntfID &intfID, void **obj) const =0 |
Returns another interface which is supported by the object without incrementing the reference count. More... | |
virtual ErrCode INTERFACE_FUNC | dispose ()=0 |
Disposes all references held by the object. More... | |
virtual ErrCode INTERFACE_FUNC | getHashCode (SizeT *hashCode)=0 |
Returns hash code of the object. More... | |
virtual ErrCode INTERFACE_FUNC | equals (IBaseObject *other, Bool *equal) const =0 |
Compares object to another object for equality. More... | |
virtual ErrCode INTERFACE_FUNC | toString (CharPtr *str)=0 |
Returns a string representation of the object. More... | |
![]() | |
virtual ErrCode INTERFACE_FUNC | queryInterface (const IntfID &intfID, void **obj)=0 |
Returns another interface which is supported by the object and increments the reference count. More... | |
virtual int INTERFACE_FUNC | addRef ()=0 |
Increments the reference count for an interface on an object. More... | |
virtual int INTERFACE_FUNC | releaseRef ()=0 |
Decrements the reference count for an interface on an object. More... | |
Gets a dictionary of string-object key-value pairs representing the parameters used to evaluate the rule.
[out] | parameters | The dictionary containing the rule parameter members. |
|
pure virtual |
Gets the type of the dimension rule.
[out] | type | The type of the dimension rule. |