MADARA  3.4.1
madara::filters::DynamicPrefixIntConvert Class Reference

Filter for integerizing variables (usually before sending) More...

#include <DynamicPrefixIntConvert.h>

Inheritance diagram for madara::filters::DynamicPrefixIntConvert:
madara::filters::AggregateFilter

Public Member Functions

 DynamicPrefixIntConvert (const std::string &string_vector_name=".prefixes", knowledge::KnowledgeRecord::Integer new_value=0)
 Constructor. More...
 
virtual ~DynamicPrefixIntConvert ()=default
 Destructor. More...
 
virtual void filter (knowledge::KnowledgeMap &records, const transport::TransportContext &, knowledge::Variables &vars)
 Converts records to integers. More...
 

Public Attributes

std::string name
 The string vector name to bind to inside the knowledge base. More...
 
knowledge::KnowledgeRecord::Integer value
 integer to convert all valid records to More...
 

Protected Attributes

knowledge::containers::StringVector prefixes_
 A map of discovered peers. More...
 

Private Attributes

bool initialized_
 Tracks if the prefix vector has been initialized. More...
 

Detailed Description

Filter for integerizing variables (usually before sending)

Definition at line 26 of file DynamicPrefixIntConvert.h.

Constructor & Destructor Documentation

◆ DynamicPrefixIntConvert()

madara::filters::DynamicPrefixIntConvert::DynamicPrefixIntConvert ( const std::string &  string_vector_name = ".prefixes",
knowledge::KnowledgeRecord::Integer  new_value = 0 
)
inline

Constructor.

Parameters
string_vector_namethe name of the string vector in the KB to use for prefix information
new_valuethe value to change matching prefix variables to

Definition at line 36 of file DynamicPrefixIntConvert.h.

◆ ~DynamicPrefixIntConvert()

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

Destructor.

Member Function Documentation

◆ filter()

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

Converts records to integers.

Parameters
recordsthe aggregate records vector
varscontext for querying current program state

Implements madara::filters::AggregateFilter.

Definition at line 55 of file DynamicPrefixIntConvert.h.

Member Data Documentation

◆ initialized_

bool madara::filters::DynamicPrefixIntConvert::initialized_
private

Tracks if the prefix vector has been initialized.

Definition at line 118 of file DynamicPrefixIntConvert.h.

◆ name

std::string madara::filters::DynamicPrefixIntConvert::name

The string vector name to bind to inside the knowledge base.

Definition at line 124 of file DynamicPrefixIntConvert.h.

◆ prefixes_

knowledge::containers::StringVector madara::filters::DynamicPrefixIntConvert::prefixes_
protected

A map of discovered peers.

Definition at line 133 of file DynamicPrefixIntConvert.h.

◆ value

knowledge::KnowledgeRecord::Integer madara::filters::DynamicPrefixIntConvert::value

integer to convert all valid records to

Definition at line 127 of file DynamicPrefixIntConvert.h.


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