SEEventManager Class Reference

#include <SEEventManager.h>

Inherits Loggable.

Public Member Functions

 SEEventManager (Logger *logger)
 
virtual ~SEEventManager ()
 
void Clear ()
 
virtual void OverrideActiveState (eEvent state, const SEScalarTime &duration)
 
virtual const std::map< eEvent, bool > & GetEventStates () const
 
virtual void SetEvent (eEvent e, bool active, const SEScalarTime &time)
 
virtual bool IsEventActive (eEvent e) const
 
virtual double GetEventDuration (eEvent e, const TimeUnit &unit) const
 
virtual void UpdateEvents (const SEScalarTime &timeStep)
 
virtual bool GetActiveEvents (std::vector< const SEActiveEvent * > &active) const
 
- Public Member Functions inherited from Loggable
 Loggable (Logger *logger=nullptr)
 
 Loggable (std::string const &logfile)
 
virtual ~Loggable ()
 
virtual LoggerGetLogger () const
 
virtual void SetLogger (Logger &logger)
 
virtual void Debug (std::string const &msg) const
 
virtual void Debug (std::stringstream &msg) const
 
virtual void Debug (std::ostream &msg) const
 
virtual void Info (std::string const &msg) const
 
virtual void Info (std::stringstream &msg) const
 
virtual void Info (const std::stringstream &msg) const
 
virtual void Info (std::ostream &msg) const
 
virtual void Warning (std::string const &msg) const
 
virtual void Warning (std::stringstream &msg) const
 
virtual void Warning (std::ostream &msg) const
 
virtual void Error (std::string const &msg) const
 
virtual void Error (std::stringstream &msg) const
 
virtual void Error (std::ostream &msg) const
 
virtual void Fatal (std::string const &msg) const
 
virtual void Fatal (std::stringstream &msg) const
 
virtual void Fatal (std::ostream &msg) const
 

ForwardEvents

  • Set a callback class to invoke when any event changes
    • Note that the handler callback can and will be called in the middle of a time step So system and compartment objects may not be completely up to date when called. Use the PhysiologyEngineInterface::SetEventHandler to ensure that all engine data is up to date at the time the callback is invoked
std::stringstream m_ss
 
SEEventHandlerm_EventHandler
 
std::map< eEvent, bool > m_EventState
 
std::map< eEvent, double > m_EventDuration_s
 
virtual void ForwardEvents (SEEventHandler *handler) const
 
virtual SEEventHandlerGetEventHandler ()
 

Additional Inherited Members

- Protected Attributes inherited from Loggable
bool myLogger
 
Loggerm_Logger
 

Constructor & Destructor Documentation

◆ SEEventManager()

SEEventManager::SEEventManager ( Logger logger)

◆ ~SEEventManager()

SEEventManager::~SEEventManager ( )
virtual

Member Function Documentation

◆ Clear()

void SEEventManager::Clear ( )

◆ ForwardEvents()

void SEEventManager::ForwardEvents ( SEEventHandler handler) const
virtual

◆ GetActiveEvents()

bool SEEventManager::GetActiveEvents ( std::vector< const SEActiveEvent * > &  active) const
virtual

◆ GetEventDuration()

double SEEventManager::GetEventDuration ( eEvent  e,
const TimeUnit unit 
) const
virtual

◆ GetEventHandler()

virtual SEEventHandler * SEEventManager::GetEventHandler ( )
inlinevirtual

◆ GetEventStates()

virtual const std::map< eEvent, bool > & SEEventManager::GetEventStates ( ) const
inlinevirtual

◆ IsEventActive()

bool SEEventManager::IsEventActive ( eEvent  e) const
virtual

◆ OverrideActiveState()

void SEEventManager::OverrideActiveState ( eEvent  state,
const SEScalarTime duration 
)
virtual

◆ SetEvent()

void SEEventManager::SetEvent ( eEvent  e,
bool  active,
const SEScalarTime time 
)
virtual

◆ UpdateEvents()

void SEEventManager::UpdateEvents ( const SEScalarTime timeStep)
virtual

Member Data Documentation

◆ m_EventDuration_s

std::map<eEvent, double> SEEventManager::m_EventDuration_s
protected

◆ m_EventHandler

SEEventHandler* SEEventManager::m_EventHandler
mutableprotected

◆ m_EventState

std::map<eEvent, bool> SEEventManager::m_EventState
protected

◆ m_ss

std::stringstream SEEventManager::m_ss
protected

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.