FinanceSim 0.1.0
Financial Simulation Library
Loading...
Searching...
No Matches
financesim::Event Class Referenceabstract

Base class for all typed events in the simulation. More...

#include <event.hpp>

Inheritance diagram for financesim::Event:
[legend]

Public Member Functions

virtual ~Event ()=default
 
virtual const char * type_name () const =0
 Returns the type name of this event (for debugging/logging)
 
SimTime timestamp () const
 Time at which this event was generated.
 
const std::string & source_id () const
 Source model ID that generated this event.
 

Protected Member Functions

 Event (SimTime timestamp, std::string source_id)
 

Private Attributes

SimTime timestamp_
 
std::string source_id_
 

Detailed Description

Base class for all typed events in the simulation.

Definition at line 10 of file event.hpp.

Constructor & Destructor Documentation

◆ ~Event()

virtual financesim::Event::~Event ( )
virtualdefault

◆ Event()

financesim::Event::Event ( SimTime  timestamp,
std::string  source_id 
)
inlineprotected

Definition at line 24 of file event.hpp.

Member Function Documentation

◆ source_id()

const std::string & financesim::Event::source_id ( ) const
inline

Source model ID that generated this event.

Definition at line 21 of file event.hpp.

References source_id_.

Referenced by financesim::Logger::passes_filters(), PYBIND11_MODULE(), and financesim::JsonWriter::write().

Here is the caller graph for this function:

◆ timestamp()

SimTime financesim::Event::timestamp ( ) const
inline

Time at which this event was generated.

Definition at line 18 of file event.hpp.

References timestamp_.

Referenced by PYBIND11_MODULE().

Here is the caller graph for this function:

◆ type_name()

virtual const char * financesim::Event::type_name ( ) const
pure virtual

Returns the type name of this event (for debugging/logging)

Implemented in financesim::IncomeEvent, financesim::ExpenseEvent, financesim::AssetEvent, financesim::LiabilityEvent, financesim::AccountEvent, and financesim::TransferEvent.

Referenced by financesim::Logger::passes_filters(), and PYBIND11_MODULE().

Here is the caller graph for this function:

Member Data Documentation

◆ source_id_

std::string financesim::Event::source_id_
private

Definition at line 29 of file event.hpp.

Referenced by source_id().

◆ timestamp_

SimTime financesim::Event::timestamp_
private

Definition at line 28 of file event.hpp.

Referenced by timestamp().


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