FIFE  be64c707dea6b3250bd4355bf5c825d25920087d
FIFE::Action Class Reference

#include <action.h>

+ Inheritance diagram for FIFE::Action:
+ Collaboration diagram for FIFE::Action:

Public Member Functions

 Action (const std::string &identifier)
 Constructor Actions are created by calling addAction from object, thus this method should really be called only by object or test code. More...
 
virtual ~Action ()
 Destructor. More...
 
const std::string & getId ()
 Get the identifier for this action. More...
 
void setDuration (uint32_t duration)
 Sets the duration for this action. More...
 
uint32_t getDuration ()
 Gets the duration of this action. More...
 
void adoptVisual (IVisual *visual)
 Sets visualization to be used. More...
 
template<typename T >
T * getVisual () const
 Gets used visualization. More...
 
void adoptAudio (ActionAudio *audio)
 Sets audio to be used. More...
 
ActionAudiogetAudio () const
 Gets used audio. More...
 
- Public Member Functions inherited from FIFE::FifeClass
 FifeClass ()
 
virtual ~FifeClass ()
 
fifeid_t getFifeId ()
 Gets unique id of this instance inside the engine. More...
 

Private Attributes

std::string m_id
 
uint32_t m_duration
 
IVisualm_visual
 
ActionAudiom_audio
 

Detailed Description

Definition at line 44 of file action.h.

Constructor & Destructor Documentation

◆ Action()

FIFE::Action::Action ( const std::string &  identifier)

Constructor Actions are created by calling addAction from object, thus this method should really be called only by object or test code.

Definition at line 37 of file action.cpp.

◆ ~Action()

FIFE::Action::~Action ( )
virtual

Destructor.

Definition at line 44 of file action.cpp.

References m_audio, and m_visual.

Member Function Documentation

◆ adoptAudio()

void FIFE::Action::adoptAudio ( ActionAudio audio)
inline

Sets audio to be used.

Transfers ownership.

Definition at line 78 of file action.h.

References m_audio.

Referenced by FIFE::ObjectLoader::load().

+ Here is the caller graph for this function:

◆ adoptVisual()

void FIFE::Action::adoptVisual ( IVisual visual)
inline

Sets visualization to be used.

Transfers ownership.

Definition at line 70 of file action.h.

References m_visual.

Referenced by FIFE::ActionVisual::create().

+ Here is the caller graph for this function:

◆ getAudio()

ActionAudio* FIFE::Action::getAudio ( ) const
inline

Gets used audio.

Definition at line 82 of file action.h.

References m_audio.

Referenced by FIFE::Instance::finalizeAction(), and FIFE::Instance::initializeAction().

+ Here is the caller graph for this function:

◆ getDuration()

uint32_t FIFE::Action::getDuration ( )
inline

Gets the duration of this action.

Definition at line 66 of file action.h.

References m_duration.

Referenced by FIFE::Instance::update().

+ Here is the caller graph for this function:

◆ getId()

const std::string& FIFE::Action::getId ( )
inline

Get the identifier for this action.

Definition at line 58 of file action.h.

References m_id.

◆ getVisual()

template<typename T >
T* FIFE::Action::getVisual ( ) const
inline

Gets used visualization.

Definition at line 74 of file action.h.

References m_visual.

Referenced by FIFE::ActionVisual::create(), FIFE::Instance::getActionVisual(), and FIFE::ObjectLoader::load().

+ Here is the caller graph for this function:

◆ setDuration()

void FIFE::Action::setDuration ( uint32_t  duration)
inline

Sets the duration for this action.

Definition at line 62 of file action.h.

References m_duration.

Referenced by FIFE::ObjectLoader::load().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_audio

ActionAudio* FIFE::Action::m_audio
private

Definition at line 92 of file action.h.

Referenced by adoptAudio(), getAudio(), and ~Action().

◆ m_duration

uint32_t FIFE::Action::m_duration
private

Definition at line 88 of file action.h.

Referenced by getDuration(), and setDuration().

◆ m_id

std::string FIFE::Action::m_id
private

Definition at line 85 of file action.h.

Referenced by getId().

◆ m_visual

IVisual* FIFE::Action::m_visual
private

Definition at line 90 of file action.h.

Referenced by adoptVisual(), getVisual(), and ~Action().


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