MADARA  3.1.8
madara::filters::RecordFilter Class Referenceabstract

Abstract base class for implementing individual record filters via a functor interface. More...

#include <RecordFilter.h>

Public Member Functions

virtual ~RecordFilter ()
 Destructor. More...
 
virtual knowledge::KnowledgeRecord filter (knowledge::FunctionArguments &args, knowledge::Variables &vars)=0
 User-implementable method for performing a filter on network data. More...
 

Detailed Description

Abstract base class for implementing individual record filters via a functor interface.

When subclassing this class, create a new instance with the new operator, and the pointer will be managed by the underlying MADARA infrastructure.

Definition at line 33 of file RecordFilter.h.

Constructor & Destructor Documentation

virtual madara::filters::RecordFilter::~RecordFilter ( )
inlinevirtual

Destructor.

Definition at line 39 of file RecordFilter.h.

Member Function Documentation

virtual knowledge::KnowledgeRecord madara::filters::RecordFilter::filter ( knowledge::FunctionArguments args,
knowledge::Variables vars 
)
pure virtual

User-implementable method for performing a filter on network data.

This is a pure abstract function that must be overridden when implementing a subclass.

Parameters
argsarguments to the filter args[0] is the value of the record args[1] is the name of the record args[2] is the type of operation args[3] is the send bandwidth usage in B/s args[4] is the total bandwidth usage in B/s args[5] is the send timestamp in seconds args[6] is the receive timestamp in seconds args[7] is the knowledge domain args[8] is the originator id
varsvariable context for querying current state
Returns
value that the args[1] named variable should be set to. ON_SEND/REBROADCAST will mean this is the value that will be sent. ON_RECEIVE will mean this is the value that will be set in the knowledge base. If a Knowledge Record is returned in a default state (i.e., with a default constructor), then the variable is removed from the operation.

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