NSL
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
NSL::matcher Class Referenceabstract

#include <matchers.h>

Inheritance diagram for NSL::matcher:
NSL::andMatcher NSL::boolMatcher NSL::notMatcher NSL::orMatcher

Public Types

using funcType = std::function< bool(Event &)>
 
using hookType = std::function< void(Event &)>
 

Public Member Functions

virtual bool operator() (Event &ev)
 
virtual void AddPreHook (const hookType &hook)
 
virtual void AddPreHook (hookType &&hook)
 
virtual void AddPostHook (const hookType &hook, PostHookCondition condition)
 
virtual void AddPostHook (hookType &&hook, PostHookCondition condition)
 

Private Member Functions

virtual bool check (Event &ev)=0
 

Private Attributes

std::vector< hookTypem_preHooks {}
 
std::vector< std::pair
< hookType, PostHookCondition > > 
m_postHooks {}
 

Detailed Description

Definition at line 17 of file matchers.h.

Member Typedef Documentation

using NSL::matcher::funcType = std::function<bool(Event &)>

Definition at line 19 of file matchers.h.

using NSL::matcher::hookType = std::function<void(Event &)>

Definition at line 20 of file matchers.h.

Member Function Documentation

virtual void NSL::matcher::AddPostHook ( const hookType hook,
PostHookCondition  condition 
)
inlinevirtual

Definition at line 44 of file matchers.h.

virtual void NSL::matcher::AddPostHook ( hookType &&  hook,
PostHookCondition  condition 
)
inlinevirtual

Definition at line 47 of file matchers.h.

virtual void NSL::matcher::AddPreHook ( const hookType hook)
inlinevirtual

Definition at line 41 of file matchers.h.

virtual void NSL::matcher::AddPreHook ( hookType &&  hook)
inlinevirtual

Definition at line 42 of file matchers.h.

virtual bool NSL::matcher::check ( Event ev)
privatepure virtual
virtual bool NSL::matcher::operator() ( Event ev)
inlinevirtual

Definition at line 22 of file matchers.h.

References NSL::Always, check(), m_postHooks, m_preHooks, NSL::OnFailure, and NSL::OnSuccess.

Member Data Documentation

std::vector<std::pair<hookType, PostHookCondition> > NSL::matcher::m_postHooks {}
private

Definition at line 53 of file matchers.h.

Referenced by operator()().

std::vector<hookType> NSL::matcher::m_preHooks {}
private

Definition at line 52 of file matchers.h.

Referenced by operator()().


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