JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
Public Member Functions | Static Public Member Functions | Protected Attributes
joda::query::NumberAggregator< T > Class Template Reference

#include <NumberAggregator.h>

Inheritance diagram for joda::query::NumberAggregator< T >:
[legend]
Collaboration diagram for joda::query::NumberAggregator< T >:
[legend]

Public Member Functions

 NumberAggregator (const std::string &toPointer, std::vector< std::unique_ptr< IValueProvider >> &&params)
 
void merge (IAggregator *other) override
 
RJValue terminate (RJMemoryPoolAlloc &alloc) override
 
std::unique_ptr< IAggregatorduplicate () const override
 
void accumulate (const RapidJsonDocument &json, RJMemoryPoolAlloc &alloc) override
 
const std::string getName () const override
 
- Public Member Functions inherited from joda::query::IAggregator
 IAggregator (const std::string &toPointer, std::vector< std::unique_ptr< IValueProvider >> &&params)
 
 IAggregator (IAggregator const &)=delete
 
void operator= (IAggregator const &x)=delete
 
virtual ~IAggregator ()=default
 
virtual const std::string & getDestPointer () const
 
virtual std::vector< std::string > getAttributes () const
 
std::string getParameterStringRepresentation () const
 
virtual std::string toString () const
 

Static Public Member Functions

static constexpr auto getName_ ()
 

Protected Attributes

T::AggRep val {}
 
bool isAggregated = false
 
bool enableArray = false
 
- Protected Attributes inherited from joda::query::IAggregator
std::string toPointer
 
std::vector< std::unique_ptr< IValueProvider > > params
 

Additional Inherited Members

- Protected Member Functions inherited from joda::query::IAggregator
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
 

Detailed Description

template<class T>
class joda::query::NumberAggregator< T >

A class representing all simple single Aggregations of numbers (min/max/count/sum/sub/...)

Template Parameters
T

Constructor & Destructor Documentation

◆ NumberAggregator()

template<class T >
joda::query::NumberAggregator< T >::NumberAggregator ( const std::string &  toPointer,
std::vector< std::unique_ptr< IValueProvider >> &&  params 
)
inline
Here is the call graph for this function:

Member Function Documentation

◆ accumulate()

template<class T >
void joda::query::NumberAggregator< T >::accumulate ( const RapidJsonDocument json,
RJMemoryPoolAlloc alloc 
)
inlineoverridevirtual

Accumulates another value. This function is called for every value once

Parameters
jsonThe Rapidjsondocument to retrieve values from. (Or an empty RapidJsonDocument for const values)
allocA MemoryPoolAllocator to create the values with

Implements joda::query::IAggregator.

◆ duplicate()

template<class T >
std::unique_ptr<IAggregator> joda::query::NumberAggregator< T >::duplicate ( ) const
inlineoverridevirtual

Duplicates the Aggregator

Returns
A new Instance of the given Aggregator

Implements joda::query::IAggregator.

Here is the call graph for this function:

◆ getName()

template<class T >
const std::string joda::query::NumberAggregator< T >::getName ( ) const
inlineoverridevirtual

Returns the name of the Aggregator

Returns
Name of Aggregator

Implements joda::query::IAggregator.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getName_()

template<class T >
static constexpr auto joda::query::NumberAggregator< T >::getName_ ( )
inlinestaticconstexpr
Here is the caller graph for this function:

◆ merge()

template<class T >
void joda::query::NumberAggregator< T >::merge ( IAggregator other)
inlineoverridevirtual

Merges the given instance with another.

Parameters
otherOther instance to be merged. Has to be of same class!

Implements joda::query::IAggregator.

Here is the call graph for this function:

◆ terminate()

template<class T >
RJValue joda::query::NumberAggregator< T >::terminate ( RJMemoryPoolAlloc alloc)
inlineoverridevirtual

Terminates the aggregation and collects the values

Returns
Collected values (GroupKey,Value)

Implements joda::query::IAggregator.

Field Documentation

◆ enableArray

template<class T >
bool joda::query::NumberAggregator< T >::enableArray = false
protected

◆ isAggregated

template<class T >
bool joda::query::NumberAggregator< T >::isAggregated = false
protected

◆ val

template<class T >
T::AggRep joda::query::NumberAggregator< T >::val {}
protected

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