Emergency 20 Dokumentation  4.2.0
qsf::ai::reactionrules::RandomInteruption Class Reference

#include <RandomInteruptionRules.h>

Inheritance diagram for qsf::ai::reactionrules::RandomInteruption:
qsf::ai::reactionrules::StandardRule qsf::ai::ReactionRule

Public Member Functions

 RandomInteruption ()
 
virtual void serialize (BinarySerializer &serializer)
 
virtual void deserialize (const boost::property_tree::ptree &tree)
 
virtual void serialize (boost::property_tree::ptree &tree) const
 
virtual bool handle (const EvaluationParameters &parameters)
 
- Public Member Functions inherited from qsf::ai::reactionrules::StandardRule
 StandardRule (EvaluationParameters::PerceptionEventSource eventSource)
 
virtual const char * getRegistrationName () const =0
 
- Public Member Functions inherited from qsf::ai::ReactionRule
 ReactionRule ()
 
 ReactionRule (const ReactionRule &src)
 
virtual ~ReactionRule ()
 
virtual ReactionRuleclone () const =0
 
virtual bool wantsHandlingDespiteOfLowerPriority () const
 
const std::string & getName () const
 
uint32 getId () const
 
Percentage getProbability () const
 
void setProbability (Percentage probability)
 
action::Priority getPriority () const
 

Protected Member Functions

virtual bool onInteruption (const EvaluationParameters &parameters)
 
- Protected Member Functions inherited from qsf::ai::reactionrules::StandardRule
EvaluationParameters::PerceptionEventIterator checkForEvent (const EvaluationParameters &parameters) const
 
- Protected Member Functions inherited from qsf::ai::ReactionRule
bool pushEventToEntity (const PerceptionEvent &perceptionEvent) const
 

Protected Attributes

Time mLastCallTime
 
float mFireImpulsAt
 
UnsignedFloat mImpulsIn
 
UnsignedFloat mNoImpulsFor
 
- Protected Attributes inherited from qsf::ai::reactionrules::StandardRule
NamedIdentifier mEventId
 
EvaluationParameters::PerceptionEventSource mEventSource
 

Additional Inherited Members

- Static Public Member Functions inherited from qsf::ai::ReactionRule
static bool compareByPriority (const ReactionRule *a, const ReactionRule *b)
 

Detailed Description

Base reaction-rule class for random interuptions. Derived classes implement a certain reaction by overriding onInteruption.

Sensor-Configuration: No sensor required.

JSON configuration tags: ImpulsIn, NoImpulsFor

Constructor & Destructor Documentation

qsf::ai::reactionrules::RandomInteruption::RandomInteruption ( )

Member Function Documentation

virtual void qsf::ai::reactionrules::RandomInteruption::deserialize ( const boost::property_tree::ptree tree)
virtual
virtual bool qsf::ai::reactionrules::RandomInteruption::handle ( const EvaluationParameters parameters)
virtual

Implements qsf::ai::ReactionRule.

virtual bool qsf::ai::reactionrules::RandomInteruption::onInteruption ( const EvaluationParameters parameters)
protectedvirtual
virtual void qsf::ai::reactionrules::RandomInteruption::serialize ( BinarySerializer serializer)
virtual

Reimplemented from qsf::ai::ReactionRule.

virtual void qsf::ai::reactionrules::RandomInteruption::serialize ( boost::property_tree::ptree tree) const
virtual

Member Data Documentation

float qsf::ai::reactionrules::RandomInteruption::mFireImpulsAt
protected
UnsignedFloat qsf::ai::reactionrules::RandomInteruption::mImpulsIn
protected
Time qsf::ai::reactionrules::RandomInteruption::mLastCallTime
protected
UnsignedFloat qsf::ai::reactionrules::RandomInteruption::mNoImpulsFor
protected

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