MADARA  3.4.1
madara::filters::DynamicPrefixFilter Class Reference

Filter for removing variables with any unwanted prefixes. More...

#include <DynamicPrefixFilter.h>

Inheritance diagram for madara::filters::DynamicPrefixFilter:
madara::filters::AggregateFilter

Public Member Functions

 DynamicPrefixFilter (const std::string &string_vector_name="prefixes.allowed")
 Constructor. More...
 
virtual ~DynamicPrefixFilter ()=default
 Destructor. More...
 
virtual void filter (knowledge::KnowledgeMap &records, const transport::TransportContext &, knowledge::Variables &vars)
 Removes records not in a list of allowed prefixes. More...
 

Public Attributes

std::string name
 The string vector name to bind to inside the knowledge base. 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 removing variables with any unwanted prefixes.

Definition at line 24 of file DynamicPrefixFilter.h.

Constructor & Destructor Documentation

◆ DynamicPrefixFilter()

madara::filters::DynamicPrefixFilter::DynamicPrefixFilter ( const std::string &  string_vector_name = "prefixes.allowed")
inline

Constructor.

Parameters
string_vector_namethe name of the string vector in the KB to use for prefix information

Definition at line 32 of file DynamicPrefixFilter.h.

◆ ~DynamicPrefixFilter()

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

Destructor.

Member Function Documentation

◆ filter()

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

Removes records not in a list of allowed prefixes.

Parameters
recordsthe aggregate records vector
varscontext for querying current program state

Implements madara::filters::AggregateFilter.

Definition at line 48 of file DynamicPrefixFilter.h.

Member Data Documentation

◆ initialized_

bool madara::filters::DynamicPrefixFilter::initialized_
private

Tracks if the prefix vector has been initialized.

Definition at line 109 of file DynamicPrefixFilter.h.

◆ name

std::string madara::filters::DynamicPrefixFilter::name

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

Definition at line 115 of file DynamicPrefixFilter.h.

◆ prefixes_

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

A map of discovered peers.

Definition at line 121 of file DynamicPrefixFilter.h.


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