OpenEnroth 2a41f3e
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
EvtProgram Class Reference

#include <EvtProgram.h>

Public Member Functions

void add (int eventId, EvtInstruction ir)
 
void clear ()
 
bool hasEvent (int eventId) const
 
const EvtInstructioninstruction (int eventId, int step) const
 
const std::vector< EvtInstruction > & function (int eventId) const
 
std::vector< EventTriggerenumerateTriggers (EvtOpcode 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 EvtProgram load (const Blob &rawData)
 

Private Attributes

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

Member Function Documentation

◆ add()

void EvtProgram::add ( int  eventId,
EvtInstruction  ir 
)

◆ clear()

void EvtProgram::clear ( )

◆ dump()

void EvtProgram::dump ( int  eventId) const

◆ dumpAll()

void EvtProgram::dumpAll ( ) const

◆ enumerateTriggers()

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

◆ function()

const std::vector< EvtInstruction > & EvtProgram::function ( 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 EvtProgram::hasEvent ( int  eventId) const
inline

◆ hasHint()

bool EvtProgram::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 EvtProgram::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.

◆ instruction()

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

◆ load()

EvtProgram EvtProgram::load ( const Blob rawData)
static

Member Data Documentation

◆ _eventsById

std::unordered_map<int, std::vector<EvtInstruction> > EvtProgram::_eventsById
private

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