MADARA  3.4.1
madara::filters::PrefixIntConvert Class Reference

Filter for printing variables as they arrive and excluding prefixes that are unwanted via a user-specified MADARA StringVector container. More...

#include <PrefixIntConvert.h>

Inheritance diagram for madara::filters::PrefixIntConvert:
madara::filters::AggregateFilter

Public Member Functions

 PrefixIntConvert (const std::vector< std::string > &source_prefixes={}, knowledge::KnowledgeRecord::Integer new_value=0)
 Constructor. More...
 
virtual ~PrefixIntConvert ()=default
 Destructor. More...
 
virtual void filter (knowledge::KnowledgeMap &records, const transport::TransportContext &, knowledge::Variables &)
 Converts the records into integer values. More...
 

Public Attributes

std::vector< std::string > prefixes
 Prefixes to print. More...
 
knowledge::KnowledgeRecord::Integer value
 integer to convert all valid records to More...
 

Detailed Description

Filter for printing variables as they arrive and excluding prefixes that are unwanted via a user-specified MADARA StringVector container.

Definition at line 27 of file PrefixIntConvert.h.

Constructor & Destructor Documentation

◆ PrefixIntConvert()

madara::filters::PrefixIntConvert::PrefixIntConvert ( const std::vector< std::string > &  source_prefixes = {},
knowledge::KnowledgeRecord::Integer  new_value = 0 
)
inline

Constructor.

Parameters
source_prefixesthe static prefixes to use for printing. If empty, print all variables. If contains prefixes, only print variables that begin with contained prefixes
new_valuethe value to change matching prefix variables to

Definition at line 38 of file PrefixIntConvert.h.

◆ ~PrefixIntConvert()

virtual madara::filters::PrefixIntConvert::~PrefixIntConvert ( )
virtualdefault

Destructor.

Member Function Documentation

◆ filter()

virtual void madara::filters::PrefixIntConvert::filter ( knowledge::KnowledgeMap records,
const transport::TransportContext ,
knowledge::Variables  
)
inlinevirtual

Converts the records into integer values.

Parameters
recordsthe aggregate records vector

Implements madara::filters::AggregateFilter.

Definition at line 53 of file PrefixIntConvert.h.

Member Data Documentation

◆ prefixes

std::vector<std::string> madara::filters::PrefixIntConvert::prefixes

Prefixes to print.

If empty, print all variables. If not empty, print only variables with prefixes that exist in the vector.

Definition at line 101 of file PrefixIntConvert.h.

◆ value

knowledge::KnowledgeRecord::Integer madara::filters::PrefixIntConvert::value

integer to convert all valid records to

Definition at line 95 of file PrefixIntConvert.h.


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