PRooFPS-dd Dev Doc 1.0
PRooFPS-dd Developer Documentation
Loading...
Searching...
No Matches
proofps_dd::EventLister Class Reference

A specified maximum number of events stored in FIFO container for a limited amount of time. More...

Detailed Description

A specified maximum number of events stored in FIFO container for a limited amount of time.

Typical event use cases: who killed who, items picked up by player, etc.

Definition at line 25 of file EventLister.h.

#include <EventLister.h>

+ Inheritance diagram for proofps_dd::EventLister:

Public Types

enum class  Orientation { Vertical , Horizontal }
 

Public Member Functions

CConsole & getConsole () const
 
 EventLister (const unsigned int &nEventTimeLimitSecs, const size_t &nEventCountLimit, const Orientation &eOrientation=Orientation::Vertical)
 
const unsigned int & getEventTimeLimitSecs () const
 
const size_t & getEventCountLimit () const
 
const OrientationgetOrientation () const
 
void show ()
 
void hide ()
 
bool visible () const
 
void update ()
 
virtual void draw ()
 
void addEvent (const std::string &sEvent)
 
void clear ()
 
const std::deque< std::pair< std::chrono::time_point< std::chrono::steady_clock >, std::string > > & getEvents () const
 

Static Public Member Functions

static const char * getLoggerModuleName ()
 

Protected Member Functions

 EventLister (const EventLister &)=delete
 
EventListeroperator= (const EventLister &)=delete
 
 EventLister (EventLister &&)=delete
 
EventLister && operator= (EventLister &&)=delete
 

Private Attributes

bool m_bVisible = false
 
std::deque< std::pair< std::chrono::time_point< std::chrono::steady_clock >, std::string > > m_qEvents
 
unsigned int m_nEventTimeLimitSecs
 
size_t m_nEventCountLimit
 
Orientation m_eOrientation
 

Member Enumeration Documentation

◆ Orientation

Enumerator
Vertical 
Horizontal 

Definition at line 29 of file EventLister.h.

Constructor & Destructor Documentation

◆ EventLister() [1/3]

proofps_dd::EventLister::EventLister ( const unsigned int & nEventTimeLimitSecs,
const size_t & nEventCountLimit,
const Orientation & eOrientation = Orientation::Vertical )

Definition at line 26 of file EventLister.cpp.

◆ EventLister() [2/3]

proofps_dd::EventLister::EventLister ( const EventLister & )
protecteddelete

◆ EventLister() [3/3]

proofps_dd::EventLister::EventLister ( EventLister && )
protecteddelete

Member Function Documentation

◆ addEvent()

void proofps_dd::EventLister::addEvent ( const std::string & sEvent)

Definition at line 85 of file EventLister.cpp.

◆ clear()

void proofps_dd::EventLister::clear ( )

Definition at line 96 of file EventLister.cpp.

◆ draw()

virtual void proofps_dd::EventLister::draw ( )
inlinevirtual

Reimplemented in proofps_dd::DrawableEventLister.

Definition at line 56 of file EventLister.h.

◆ getConsole()

CConsole & proofps_dd::EventLister::getConsole ( ) const

Definition at line 21 of file EventLister.cpp.

◆ getEventCountLimit()

const size_t & proofps_dd::EventLister::getEventCountLimit ( ) const

Definition at line 41 of file EventLister.cpp.

◆ getEvents()

const std::deque< std::pair< std::chrono::time_point< std::chrono::steady_clock >, std::string > > & proofps_dd::EventLister::getEvents ( ) const

Definition at line 101 of file EventLister.cpp.

◆ getEventTimeLimitSecs()

const unsigned int & proofps_dd::EventLister::getEventTimeLimitSecs ( ) const

Definition at line 36 of file EventLister.cpp.

◆ getLoggerModuleName()

const char * proofps_dd::EventLister::getLoggerModuleName ( )
static

Definition at line 16 of file EventLister.cpp.

◆ getOrientation()

const proofps_dd::EventLister::Orientation & proofps_dd::EventLister::getOrientation ( ) const

Definition at line 46 of file EventLister.cpp.

◆ hide()

void proofps_dd::EventLister::hide ( )

Definition at line 56 of file EventLister.cpp.

◆ operator=() [1/2]

EventLister & proofps_dd::EventLister::operator= ( const EventLister & )
protecteddelete

◆ operator=() [2/2]

EventLister && proofps_dd::EventLister::operator= ( EventLister && )
protecteddelete

◆ show()

void proofps_dd::EventLister::show ( )

Definition at line 51 of file EventLister.cpp.

◆ update()

void proofps_dd::EventLister::update ( )

Definition at line 66 of file EventLister.cpp.

◆ visible()

bool proofps_dd::EventLister::visible ( ) const

Definition at line 61 of file EventLister.cpp.

Member Data Documentation

◆ m_bVisible

bool proofps_dd::EventLister::m_bVisible = false
private

Definition at line 72 of file EventLister.h.

◆ m_eOrientation

Orientation proofps_dd::EventLister::m_eOrientation
private

Definition at line 76 of file EventLister.h.

◆ m_nEventCountLimit

size_t proofps_dd::EventLister::m_nEventCountLimit
private

Definition at line 75 of file EventLister.h.

◆ m_nEventTimeLimitSecs

unsigned int proofps_dd::EventLister::m_nEventTimeLimitSecs
private

Definition at line 74 of file EventLister.h.

◆ m_qEvents

std::deque<std::pair<std::chrono::time_point<std::chrono::steady_clock>, std::string> > proofps_dd::EventLister::m_qEvents
private

Definition at line 73 of file EventLister.h.


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