C++ Device API Reference Manual
Reference documentation for the Simics C++ Device API.
 
Loading...
Searching...
No Matches
sme::I_pattern_rule Class Referenceabstract

Interface and base class for all notification rule types. More...

#include <I_pattern_rule.h>

Inheritance diagram for sme::I_pattern_rule:
sme::rules::all_fall sme::rules::any_rise sme::rules::falling_bit sme::rules::masked sme::rules::notify sme::rules::pattern sme::rules::rising_bit

Public Member Functions

 I_pattern_rule ()
 Interface parent constructor for a new i pattern rule object.
 
virtual ~I_pattern_rule ()
 Destroy the i pattern rule object.
 
virtual void process_rule (std::uint64_t _old_value, std::uint64_t &_new_value)=0
 process rule evaluation between old and new values.
 
void action (std::function< void()> _action)
 Binds a void(void) lambda as the callback action to this rule.
 
_always_inline bool is_active ()
 reports if rule is active for processing.
 
_always_inline bool is_bound ()
 has the lambda callback been bound.
 

Protected Attributes

std::function< void()> m_lambda
 placeholder for lambda
 
bool m_is_active
 stores is active
 

Friends

class pattern_rule_container
 

Detailed Description

Interface and base class for all notification rule types.

Constructor & Destructor Documentation

◆ I_pattern_rule()

sme::I_pattern_rule::I_pattern_rule ( )
inline

Interface parent constructor for a new i pattern rule object.

◆ ~I_pattern_rule()

virtual sme::I_pattern_rule::~I_pattern_rule ( )
inlinevirtual

Destroy the i pattern rule object.

Member Function Documentation

◆ action()

void sme::I_pattern_rule::action ( std::function< void()>  _action)
inline

Binds a void(void) lambda as the callback action to this rule.

Parameters
_action

◆ is_active()

_always_inline bool sme::I_pattern_rule::is_active ( )
inline

reports if rule is active for processing.

Returns
bool

◆ is_bound()

_always_inline bool sme::I_pattern_rule::is_bound ( )
inline

has the lambda callback been bound.

Returns
_always_inline

◆ process_rule()

virtual void sme::I_pattern_rule::process_rule ( std::uint64_t  _old_value,
std::uint64_t &  _new_value 
)
pure virtual

process rule evaluation between old and new values.

Parameters
_old_valuevalue of content prior to read or write
_new_valuevalue of content post read or write

Friends And Related Function Documentation

◆ pattern_rule_container

friend class pattern_rule_container
friend

Member Data Documentation

◆ m_is_active

bool sme::I_pattern_rule::m_is_active
protected

stores is active

◆ m_lambda

std::function<void()> sme::I_pattern_rule::m_lambda
protected

placeholder for lambda


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