Skip to content

Class GlobalEvent

template <typename TSeq>

ClassList > GlobalEvent

Template for a Global Event .More...

  • #include <globalevent-bones.hpp>

Inherited by the following classes: InterventionMeaslesPEP

Public Functions

Type Name
GlobalEvent ()
GlobalEvent (GlobalFun< TSeq > fun, std::string name, int day=-99)
Construct a new Global Event object.
virtual std::unique_ptr< GlobalEvent< TSeq > > clone_ptr () const
int get_day () const
std::string get_name () const
bool operator!= (const GlobalEvent< TSeq > & other) const
virtual void operator() (Model< TSeq > * m, int day)
bool operator== (const GlobalEvent< TSeq > & other) const
void print () const
void set_day (int day)
void set_name (std::string name)
virtual ~GlobalEvent () = default

Detailed Description

Global events are functions that Model<TSeq> executes at the end of a day.

Public Functions Documentation

function GlobalEvent [1/2]

inline GlobalEvent::GlobalEvent () 

function GlobalEvent [2/2]

Construct a new Global Event object.

inline GlobalEvent::GlobalEvent (
    GlobalFun < TSeq > fun,
    std::string name,
    int day=-99
) 

Parameters:

  • fun A function that takes a Model<TSeq> * as argument and returns void.
  • name A descriptive name for the action.
  • day The day when the action will be executed. If negative, it will be executed every day.

function clone_ptr

inline virtual std::unique_ptr< GlobalEvent < TSeq > > GlobalEvent::clone_ptr () const

function get_day

inline int GlobalEvent::get_day () const

function get_name

inline std::string GlobalEvent::get_name () const

function operator!=

inline bool GlobalEvent::operator!= (
    const GlobalEvent < TSeq > & other
) const

function operator()

inline virtual void GlobalEvent::operator() (
    Model < TSeq > * m,
    int day
) 

function operator==

inline bool GlobalEvent::operator== (
    const GlobalEvent < TSeq > & other
) const

function print

inline void GlobalEvent::print () const

function set_day

inline void GlobalEvent::set_day (
    int day
) 

function set_name

inline void GlobalEvent::set_name (
    std::string name
) 

function ~GlobalEvent

virtual GlobalEvent::~GlobalEvent () = default


The documentation for this class was generated from the following file epiworld-src/include/epiworld/globalevent-bones.hpp