OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
EventMap Class Reference

#include <EventMap.h>

Public Member Functions

void add (int eventId, EventIR ir)
 
void clear ()
 
bool hasEvent (int eventId) const
 
const EventIRevent (int eventId, int step) const
 
const std::vector< EventIR > & events (int eventId) const
 
std::vector< EventTriggerenumerateTriggers (EventType triggerType)
 
bool hasHint (int eventId) const
 
std::string hint (int eventId) const
 
void dumpAll () const
 
void dump (int eventId) const
 

Static Public Member Functions

static EventMap load (const Blob &rawData)
 

Private Attributes

std::unordered_map< int, std::vector< EventIR > > _eventsById
 

Member Function Documentation

◆ add()

void EventMap::add ( int  eventId,
EventIR  ir 
)

◆ clear()

void EventMap::clear ( )

◆ dump()

void EventMap::dump ( int  eventId) const

◆ dumpAll()

void EventMap::dumpAll ( ) const

◆ enumerateTriggers()

std::vector< EventTrigger > EventMap::enumerateTriggers ( EventType  triggerType)
Parameters
triggerTypeEvent type to look for.
Returns
List of all event positions that have the given event type.

◆ event()

const EventIR & EventMap::event ( int  eventId,
int  step 
) const
Parameters
eventIdEvent id.
stepStep in the script to get event for.
Returns
Reference to an event for the given eventId and step.
Exceptions
ExceptionIf the event doesn't exist for the provided eventId and step.

◆ events()

const std::vector< EventIR > & EventMap::events ( int  eventId) const
Parameters
eventIdEvent id.
Returns
Reference to a list of events for the provided eventId.
Exceptions
ExceptionIf there are no events for the provided eventId.

◆ hasEvent()

bool EventMap::hasEvent ( int  eventId) const
inline

◆ hasHint()

bool EventMap::hasHint ( int  eventId) const
Parameters
eventIdEvent id to check.
Returns
Whether a script exists for the provided eventId that shows a hint.

◆ hint()

std::string EventMap::hint ( int  eventId) const
Parameters
eventIdEvent id to check.
Returns
Hint to show, if any. Note that unlike events(), this function returns an empty string for non-existent events.

◆ load()

EventMap EventMap::load ( const Blob rawData)
static

Member Data Documentation

◆ _eventsById

std::unordered_map<int, std::vector<EventIR> > EventMap::_eventsById
private

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