xoreos  0.0.5
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
Engines::DragonAge::ScriptContainer Class Reference

#include <container.h>

Inheritance diagram for Engines::DragonAge::ScriptContainer:
Inheritance graph
[legend]
Collaboration diagram for Engines::DragonAge::ScriptContainer:
Collaboration graph
[legend]

Public Member Functions

 ScriptContainer ()
 
 ~ScriptContainer ()
 
const Common::UStringgetScript () const
 
bool hasScript () const
 
void enableEvent (EventType event, bool enabled)
 Enable/Disable the handling of a specific event. More...
 
void enableEvents (bool enabled)
 Enable/Disable the handling of all events. More...
 
bool runScript (EventType event, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference())
 
bool runScript (Event &event)
 

Static Public Member Functions

static bool runScript (const Common::UString &script, EventType event, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference())
 
static bool runScript (const Common::UString &script, EventType event, const Aurora::NWScript::ScriptState &state, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference())
 
static bool runScript (const Common::UString &script, Event &event)
 
static bool runScript (const Common::UString &script, Event &event, const Aurora::NWScript::ScriptState &state)
 

Protected Member Functions

void clearScript ()
 
void readScript (const Aurora::GFF3Struct &gff)
 
void readScript (const Aurora::GFF4Struct &gff)
 

Private Attributes

Common::UString _script
 
std::map< EventType, bool > _eventEnabled
 

Detailed Description

Definition at line 51 of file container.h.

Constructor & Destructor Documentation

◆ ScriptContainer()

Engines::DragonAge::ScriptContainer::ScriptContainer ( )

Definition at line 58 of file container.cpp.

◆ ~ScriptContainer()

Engines::DragonAge::ScriptContainer::~ScriptContainer ( )

Definition at line 61 of file container.cpp.

Member Function Documentation

◆ clearScript()

void Engines::DragonAge::ScriptContainer::clearScript ( )
protected

Definition at line 86 of file container.cpp.

References _script, and Common::UString::clear().

Referenced by readScript().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enableEvent()

void Engines::DragonAge::ScriptContainer::enableEvent ( EventType  event,
bool  enabled 
)

Enable/Disable the handling of a specific event.

Definition at line 72 of file container.cpp.

References _eventEnabled.

◆ enableEvents()

void Engines::DragonAge::ScriptContainer::enableEvents ( bool  enabled)

◆ getScript()

const Common::UString & Engines::DragonAge::ScriptContainer::getScript ( ) const

Definition at line 64 of file container.cpp.

References _script.

◆ hasScript()

bool Engines::DragonAge::ScriptContainer::hasScript ( ) const

Definition at line 68 of file container.cpp.

References _script, and Common::UString::empty().

Here is the call graph for this function:

◆ readScript() [1/2]

void Engines::DragonAge::ScriptContainer::readScript ( const Aurora::GFF3Struct gff)
protected

◆ readScript() [2/2]

void Engines::DragonAge::ScriptContainer::readScript ( const Aurora::GFF4Struct gff)
protected

Definition at line 97 of file container.cpp.

References _script, ARRAYSIZE, clearScript(), Aurora::GFF4Struct::getString(), and Engines::DragonAge::kScriptFields.

Here is the call graph for this function:

◆ runScript() [1/6]

bool Engines::DragonAge::ScriptContainer::runScript ( EventType  event,
const Aurora::NWScript::ObjectReference  owner = Aurora::NWScript::ObjectReference(),
const Aurora::NWScript::ObjectReference  triggerer = Aurora::NWScript::ObjectReference() 
)

◆ runScript() [2/6]

bool Engines::DragonAge::ScriptContainer::runScript ( Event event)

Definition at line 113 of file container.cpp.

References _eventEnabled, _script, Engines::DragonAge::Event::getType(), and runScript().

Here is the call graph for this function:

◆ runScript() [3/6]

bool Engines::DragonAge::ScriptContainer::runScript ( const Common::UString script,
EventType  event,
const Aurora::NWScript::ObjectReference  owner = Aurora::NWScript::ObjectReference(),
const Aurora::NWScript::ObjectReference  triggerer = Aurora::NWScript::ObjectReference() 
)
static

Definition at line 121 of file container.cpp.

References Aurora::NWScript::NCSFile::getEmptyState(), and runScript().

Here is the call graph for this function:

◆ runScript() [4/6]

bool Engines::DragonAge::ScriptContainer::runScript ( const Common::UString script,
EventType  event,
const Aurora::NWScript::ScriptState state,
const Aurora::NWScript::ObjectReference  owner = Aurora::NWScript::ObjectReference(),
const Aurora::NWScript::ObjectReference  triggerer = Aurora::NWScript::ObjectReference() 
)
static

Definition at line 128 of file container.cpp.

References runScript().

Here is the call graph for this function:

◆ runScript() [5/6]

bool Engines::DragonAge::ScriptContainer::runScript ( const Common::UString script,
Event event 
)
static

Definition at line 139 of file container.cpp.

References Aurora::NWScript::NCSFile::getEmptyState(), and runScript().

Here is the call graph for this function:

◆ runScript() [6/6]

bool Engines::DragonAge::ScriptContainer::runScript ( const Common::UString script,
Event event,
const Aurora::NWScript::ScriptState state 
)
static

Member Data Documentation

◆ _eventEnabled

std::map<EventType, bool> Engines::DragonAge::ScriptContainer::_eventEnabled
private

Definition at line 92 of file container.h.

Referenced by enableEvent(), enableEvents(), and runScript().

◆ _script

Common::UString Engines::DragonAge::ScriptContainer::_script
private

Definition at line 90 of file container.h.

Referenced by clearScript(), getScript(), hasScript(), readScript(), and runScript().


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