#include <PhysiologyEnginePool.h>

Inherits Loggable.

Public Member Functions

 SEPhysiologyEnginePool (size_t poolSize=0, const std::string &dataDir="./", Logger *logger=nullptr)
 
 ~SEPhysiologyEnginePool ()
 
const size_t GetWorkerCount () const
 
bool RemoveEngine (int id)
 
const std::map< int, SEPhysiologyEnginePoolEngine * > & GetEngines () const
 
SEPhysiologyEnginePoolEngineGetEngine (int id) const
 
SEPhysiologyEnginePoolEngineCreateEngine (int id)
 
bool InitializeEngines ()
 
bool AdvanceModelTime (double time, const TimeUnit &unit)
 
bool ProcessAction (const SEAction &action)
 
bool ProcessActions ()
 
void ClearDataRequested ()
 
void PullDataRequested (std::vector< SEDataRequested *> &)
 
- 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, std::string const &origin=empty) const
 
virtual void Debug (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Debug (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Info (std::string const &msg, std::string const &origin=empty) const
 
virtual void Info (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Info (const std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Info (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Warning (std::string const &msg, std::string const &origin=empty) const
 
virtual void Warning (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Warning (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Error (std::string const &msg, std::string const &origin=empty) const
 
virtual void Error (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Error (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Fatal (std::string const &msg, std::string const &origin=empty) const
 
virtual void Fatal (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Fatal (std::ostream &msg, std::string const &origin=empty) const
 

Protected Member Functions

virtual void AllocateEngine (SEPhysiologyEnginePoolEngine &pe)=0
 

Protected Attributes

bool m_IsActive
 
SESubstanceManager m_SubMgr
 
std::map< int, SEPhysiologyEnginePoolEngine * > m_Engines
 
ThreadPool m_Pool
 
- Protected Attributes inherited from Loggable
bool myLogger
 
Loggerm_Logger
 

Friends

class PhysiologyEnginePoolThunk
 

Additional Inherited Members

- Static Public Attributes inherited from Loggable
static const std::string empty
 

Constructor & Destructor Documentation

◆ SEPhysiologyEnginePool()

SEPhysiologyEnginePool::SEPhysiologyEnginePool ( size_t  poolSize = 0,
const std::string &  dataDir = "./",
Logger logger = nullptr 
)

◆ ~SEPhysiologyEnginePool()

SEPhysiologyEnginePool::~SEPhysiologyEnginePool ( )

Member Function Documentation

◆ AdvanceModelTime()

bool SEPhysiologyEnginePool::AdvanceModelTime ( double  time,
const TimeUnit unit 
)

◆ AllocateEngine()

virtual void SEPhysiologyEnginePool::AllocateEngine ( SEPhysiologyEnginePoolEngine pe)
protectedpure virtual

◆ ClearDataRequested()

void SEPhysiologyEnginePool::ClearDataRequested ( )

◆ CreateEngine()

SEPhysiologyEnginePoolEngine * SEPhysiologyEnginePool::CreateEngine ( int  id)

◆ GetEngine()

SEPhysiologyEnginePoolEngine * SEPhysiologyEnginePool::GetEngine ( int  id) const

◆ GetEngines()

const std::map< int, SEPhysiologyEnginePoolEngine * > & SEPhysiologyEnginePool::GetEngines ( ) const

◆ GetWorkerCount()

const size_t SEPhysiologyEnginePool::GetWorkerCount ( ) const
inline

◆ InitializeEngines()

bool SEPhysiologyEnginePool::InitializeEngines ( )

◆ ProcessAction()

bool SEPhysiologyEnginePool::ProcessAction ( const SEAction action)

◆ ProcessActions()

bool SEPhysiologyEnginePool::ProcessActions ( )

◆ PullDataRequested()

void SEPhysiologyEnginePool::PullDataRequested ( std::vector< SEDataRequested *> &  dataRequested)

◆ RemoveEngine()

bool SEPhysiologyEnginePool::RemoveEngine ( int  id)

Friends And Related Function Documentation

◆ PhysiologyEnginePoolThunk

friend class PhysiologyEnginePoolThunk
friend

Member Data Documentation

◆ m_Engines

std::map<int, SEPhysiologyEnginePoolEngine*> SEPhysiologyEnginePool::m_Engines
protected

◆ m_IsActive

bool SEPhysiologyEnginePool::m_IsActive
protected

◆ m_Pool

ThreadPool SEPhysiologyEnginePool::m_Pool
protected

◆ m_SubMgr

SESubstanceManager SEPhysiologyEnginePool::m_SubMgr
protected

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.