arm4::ArmMetricGroup Class Reference
Is used to bind objects that implement a subclass of ArmMetric
to an ArmTransactionWithMetricsDefinition
or ArmTranReportWithMetricsDefinition
object.
More...
Public Member Functions | |
ArmMetricGroup (const ArmMetricGroupDefinition &groupDefinition, std::vector< ArmMetric * > metrics) | |
Constructs an ordered set of ArmMetric subclasses ready for binding to transaction objects. | |
const ArmMetricGroupDefinition & | getDefinition () |
ArmMetric * | getMetric (int32_t index) const |
bool | isMetricValid (int32_t index) const |
int32_t | setMetricValid (int32_t index, bool value) |
Indicates whether an ArmMetric subclass at this vector index is valid. |
Detailed Description
Is used to bind objects that implement a subclass of ArmMetric
to an ArmTransactionWithMetricsDefinition
or ArmTranReportWithMetricsDefinition
object.
The binding occurs when the transaction object is created and is immutable afterwards.
For all methods taking an index
parameter, this is the index into the ArmMetric
array. It must have a value in the range 0:6. To remain consistent with ARM 2.0, any ArmMetric
subclass except ArmMetricString32
can be assigned to elements 0:5 and only ArmMetricString32
can be assigned to element 6.
Constructor & Destructor Documentation
arm4::ArmMetricGroup::ArmMetricGroup | ( | const ArmMetricGroupDefinition & | groupDefinition, | |
std::vector< ArmMetric * > | metrics | |||
) |
Constructs an ordered set of ArmMetric
subclasses ready for binding to transaction objects.
- Parameters:
-
groupDefinition metadata object describing the metrics provided through the metrics
parameter.metrics an vector of ArmMetric objects.
The ordering in the vector is important. The vector can have up to seven elements and is position-sensitive. To remain consistent with ARM 2.0, any ArmMetric
subclass except ArmMetricString32
can be assigned to elements 0:5
and only ArmMetricString32
can be assigned to element 6
. The ArmMetricDefinition
objects associated with each ArmMetric
object must have the exact same values as the ArmMetricDefinition
objects associated with the ArmMetricGroupDefinition
object (they will often be the same objects, though this is not mandatory).
Any element can be null pointer. If the input vector has fewer than seven elements, the rest of the elements are assigned a value of null pointer. The vector can be sparsely populated. For example, there can be a non-null pointer ArmMetric
reference in element 0
and 6
, and null pointer references in elements 1:5
.
- Returns:
- a new metric group instance.
Member Function Documentation
const ArmMetricGroupDefinition& arm4::ArmMetricGroup::getDefinition | ( | ) |
- Returns:
- the metric group definition used to create this object.
ArmMetric* arm4::ArmMetricGroup::getMetric | ( | int32_t | index | ) | const |
- Parameters:
-
index the index into the ArmMetric
vector. See comment in the interface description above.
- Returns:
- the metric at the vector index. This value may be null.
bool arm4::ArmMetricGroup::isMetricValid | ( | int32_t | index | ) | const |
int32_t arm4::ArmMetricGroup::setMetricValid | ( | int32_t | index, | |
bool | value | |||
) |
Indicates whether an ArmMetric
subclass at this vector index is valid.
This applies when any of the following calls are made:
-
ArmTranReportWithMetrics::report()
-
ArmTransactionWithMetrics::start()
,ArmTransactionWithMetrics::update()
,ArmTransactionWithMetrics::stop()
- Parameters:
-
index index the index into the ArmMetric
vector. See comment in the interface description above.value If the valid flag is set then the metric value is processed.
- Returns:
- 0 on sucess; otherwise, a non-zero error code is returned (as specified in ArmInterface).
The documentation for this class was generated from the following file:
- Arm4/ArmMetricGroup