JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
Public Member Functions | Protected Member Functions | Protected Attributes
joda::query::IAggregator Class Referenceabstract

#include <IAggregator.h>

Inheritance diagram for joda::query::IAggregator:
[legend]
Collaboration diagram for joda::query::IAggregator:
[legend]

Public Member Functions

 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 void accumulate (const RapidJsonDocument &json, RJMemoryPoolAlloc &alloc)=0
 
virtual void merge (IAggregator *other)=0
 
virtual RJValue terminate (RJMemoryPoolAlloc &alloc)=0
 
virtual std::unique_ptr< IAggregatorduplicate () 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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ IAggregator() [1/2]

joda::query::IAggregator::IAggregator ( const std::string &  toPointer,
std::vector< std::unique_ptr< IValueProvider >> &&  params 
)
inline

Creates a new IAggregator with given parameters

Exceptions
WrongParameterExceptionif the parameters do not fit the expected (wrong count or type)
Parameters
toPointerPointer to the destination attribute
paramsA vector of IValueProviders
Here is the call graph for this function:

◆ IAggregator() [2/2]

joda::query::IAggregator::IAggregator ( IAggregator const &  )
delete

◆ ~IAggregator()

virtual joda::query::IAggregator::~IAggregator ( )
virtualdefault

Member Function Documentation

◆ accumulate()

virtual void joda::query::IAggregator::accumulate ( const RapidJsonDocument json,
RJMemoryPoolAlloc alloc 
)
pure virtual

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

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.

◆ checkMinParamSize()

void joda::query::IAggregator::checkMinParamSize ( unsigned int  expected)
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkOptionalParamType()

void joda::query::IAggregator::checkOptionalParamType ( unsigned int  i,
IValueType  expected 
)
inlineprotected
Here is the call graph for this function:

◆ checkParamSize()

void joda::query::IAggregator::checkParamSize ( unsigned int  expected)
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkParamType()

void joda::query::IAggregator::checkParamType ( unsigned int  i,
IValueType  expected 
)
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ duplicate()

virtual std::unique_ptr<IAggregator> joda::query::IAggregator::duplicate ( ) const
pure virtual

◆ duplicateParameters()

std::vector<std::unique_ptr<IValueProvider> > joda::query::IAggregator::duplicateParameters ( ) const
inlineprotected
Here is the caller graph for this function:

◆ getAttributes()

virtual std::vector<std::string> joda::query::IAggregator::getAttributes ( ) const
inlinevirtual

◆ getDestPointer()

virtual const std::string& joda::query::IAggregator::getDestPointer ( ) const
inlinevirtual

Returns the name of the Aggregator

Returns
Name of Aggregator

◆ getName()

virtual const std::string joda::query::IAggregator::getName ( ) const
pure virtual

Returns the name of the Aggregator

Returns
Name of 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.

Here is the caller graph for this function:

◆ getParameterStringRepresentation()

std::string joda::query::IAggregator::getParameterStringRepresentation ( ) const
inline
Here is the caller graph for this function:

◆ merge()

virtual void joda::query::IAggregator::merge ( IAggregator other)
pure virtual

◆ operator=()

void joda::query::IAggregator::operator= ( IAggregator const &  x)
delete

◆ terminate()

virtual RJValue joda::query::IAggregator::terminate ( RJMemoryPoolAlloc alloc)
pure virtual

◆ toString()

virtual std::string joda::query::IAggregator::toString ( ) const
inlinevirtual

Reimplemented in joda::query::GroupAggregator.

Here is the call graph for this function:

Field Documentation

◆ params

std::vector<std::unique_ptr<IValueProvider> > joda::query::IAggregator::params
protected

◆ toPointer

std::string joda::query::IAggregator::toPointer
protected

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