company logo

PropertyHandle :: Statistic - Calculate statistic for an attribute in a collection

The function returns the statistic object containing count, sum and square sum for value. In case of an error, the function returns an invalid property handle.

Return value:  Pointer to roperty handle ( PropertyHandle * )

Implementation details

PropertyHandle PropertyHandle  :: Statistic ( NString &expression )

The aggregation function calculates statistic values for an attribute for all instances in a collection. When a filter condition has been set, only instanced fulfilling the filter condition are considered.

The statistic object returned contains count ( x0 ), sum ( x1 ) and square sum ( x2 ) values.

  • expression - Inline expression

    An ad hoc expression can be passed as operand (something like a + b) or as complete expression. As operand, an expression may contain any expression, which is allowed in a statement, but no semicolon should be appended. Complete expressions include expression header (optional) and may include different sections in the expression body which is enclosed in { ... }.

    In contrast to class expressions, ad hoc expressions are not defined explicitly as class expressions but passed as strings to the application at run time.

    operand: a + funct(b)

    complete expression :

    bool expr(int a)

    {

    return(a*a);

    }