JODA
0.13.1 (59b41972)
JSON On-Demand Analysis
|
#include <IAggregator.h>
Public Member Functions | |
IAggregator (const std::string &toPointer, std::vector< std::unique_ptr< IValueProvider >> &¶ms) | |
IAggregator (IAggregator const &)=delete | |
void | operator= (IAggregator const &x)=delete |
virtual | ~IAggregator ()=default |
virtual void | accumulate (const RapidJsonDocument &json, RJMemoryPoolAlloc &alloc)=0 |
virtual void | merge (IAggregator *other)=0 |
virtual RJValue | terminate (RJMemoryPoolAlloc &alloc)=0 |
virtual std::unique_ptr< IAggregator > | duplicate () const =0 |
virtual const std::string & | getDestPointer () const |
virtual const std::string | getName () const =0 |
virtual std::vector< std::string > | getAttributes () const |
std::string | getParameterStringRepresentation () const |
virtual std::string | toString () const |
Protected Member Functions | |
void | checkParamSize (unsigned int expected) |
void | checkMinParamSize (unsigned int expected) |
void | checkParamType (unsigned int i, IValueType expected) |
void | checkOptionalParamType (unsigned int i, IValueType expected) |
std::vector< std::unique_ptr< IValueProvider > > | duplicateParameters () const |
Protected Attributes | |
std::string | toPointer |
std::vector< std::unique_ptr< IValueProvider > > | params |
IAggregators are used to aggregate values. Multiple of these may be used during execution and will be merged at the end. Every aggregator is only called from one Thread, no syncronization is needed.
|
inline |
Creates a new IAggregator with given parameters
WrongParameterException | if the parameters do not fit the expected (wrong count or type) |
toPointer | Pointer to the destination attribute |
params | A vector of IValueProviders |
|
delete |
|
virtualdefault |
|
pure virtual |
Accumulates another value. This function is called for every value once
json | The Rapidjsondocument to retrieve values from. (Or an empty RapidJsonDocument for const values) |
alloc | A MemoryPoolAllocator to create the values with |
Implemented in joda::query::NumberAggregator< T >, joda::query::HistogramAggregator, joda::query::GroupAggregator, joda::query::DistinctAggregator, joda::query::CountAggregator, joda::query::CollectAggregator, and joda::query::AttributeStatAggregator.
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
pure virtual |
Duplicates the Aggregator
Implemented in joda::query::NumberAggregator< T >, joda::query::HistogramAggregator, joda::query::GroupAggregator, joda::query::DistinctAggregator, joda::query::CountAggregator, joda::query::CollectAggregator, and joda::query::AttributeStatAggregator.
|
inlineprotected |
|
inlinevirtual |
Reimplemented in joda::query::GroupAggregator, and joda::query::AttributeStatAggregator.
|
inlinevirtual |
Returns the name of the Aggregator
|
pure virtual |
Returns the name of the Aggregator
Implemented in joda::query::NumberAggregator< T >, joda::query::HistogramAggregator, joda::query::GroupAggregator, joda::query::DistinctAggregator, joda::query::CountAggregator, joda::query::CollectAggregator, and joda::query::AttributeStatAggregator.
|
inline |
|
pure virtual |
Merges the given instance with another.
other | Other instance to be merged. Has to be of same class! |
Implemented in joda::query::NumberAggregator< T >, joda::query::HistogramAggregator, joda::query::GroupAggregator, joda::query::DistinctAggregator, joda::query::CountAggregator, joda::query::CollectAggregator, and joda::query::AttributeStatAggregator.
|
delete |
|
pure virtual |
Terminates the aggregation and collects the values
Implemented in joda::query::NumberAggregator< T >, joda::query::HistogramAggregator, joda::query::GroupAggregator, joda::query::DistinctAggregator, joda::query::CountAggregator, joda::query::CollectAggregator, and joda::query::AttributeStatAggregator.
|
inlinevirtual |
|
protected |
|
protected |