arm4::QArmMetricGroup Class Reference

Is used to bind objects that implement a subclass of QArmMetric to an QArmTransactionWithMetricsDefinition or QArmTranReportWithMetricsDefinition object. More...

Inheritance diagram for arm4::QArmMetricGroup:
arm4::QArmInterface

List of all members.

Public Member Functions

 QArmMetricGroup (const QArmMetricGroupDefinition &groupDefinition, QVector< QArmMetric * > metrics)
 Constructs an ordered set of QArmMetric subclasses ready for binding to transaction objects.
const QArmMetricGroupDefinitiongetDefinition ()
QArmMetricgetMetric (int32_t index) const
bool isMetricValid (int32_t index) const
int32_t setMetricValid (int32_t index, bool value)
 Indicates whether an QArmMetric subclass at this vector index is valid.

Detailed Description

Is used to bind objects that implement a subclass of QArmMetric to an QArmTransactionWithMetricsDefinition or QArmTranReportWithMetricsDefinition 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 QArmMetric array. It must have a value in the range 0:6. To remain consistent with ARM 2.0, any QArmMetric subclass except QArmMetricString32 can be assigned to elements 0:5 and only QArmMetricString32 can be assigned to element 6.

Author:
ARM Working Group of The Open Group, MyARM GmbH

Constructor & Destructor Documentation

arm4::QArmMetricGroup::QArmMetricGroup ( const QArmMetricGroupDefinition groupDefinition,
QVector< QArmMetric * >  metrics 
)

Constructs an ordered set of QArmMetric subclasses ready for binding to transaction objects.

Parameters:
groupDefinition metadata object describing the metrics provided through the metrics parameter.
metrics an vector of QArmMetric 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 QArmMetric subclass except QArmMetricString32 can be assigned to elements 0:5 and only QArmMetricString32 can be assigned to element 6. The QArmMetricDefinition objects associated with each QArmMetric object must have the exact same values as the QArmMetricDefinition objects associated with the QArmMetricGroupDefinition 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 QArmMetric reference in element 0 and 6, and null pointer references in elements 1:5.

Returns:
a new metric group instance.

Member Function Documentation

const QArmMetricGroupDefinition& arm4::QArmMetricGroup::getDefinition (  ) 
Returns:
the metric group definition used to create this object.
QArmMetric* arm4::QArmMetricGroup::getMetric ( int32_t  index  )  const
Parameters:
index the index into the QArmMetric vector. See comment in the interface description above.
Returns:
the metric at the vector index. This value may be null.
bool arm4::QArmMetricGroup::isMetricValid ( int32_t  index  )  const
Parameters:
index the index into the QArmMetric vector. See comment in the interface description above.
Returns:
whether an QArmMetric subclass at this vector index is valid.
int32_t arm4::QArmMetricGroup::setMetricValid ( int32_t  index,
bool  value 
)

Indicates whether an QArmMetric subclass at this vector index is valid.

This applies when any of the following calls are made:

Parameters:
index index the index into the QArmMetric 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 QArmInterface).

The documentation for this class was generated from the following file: