# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NLSOUND::CSoundAnimation Class Reference

#include <sound_animation.h>

List of all members.

Public Types

enum  { NoId = -1 }

Public Methods

 CSoundAnimation (std::string &name, TSoundAnimId id)
virtual ~CSoundAnimation ()
virtual void addMarker (CSoundAnimMarker *marker)
 Add a new marker. More...

virtual void removeMarker (CSoundAnimMarker *marker)
 Remove a marker. More...

virtual uint32 countMarkers ()
 Return the number of markers in this track. More...

virtual CSoundAnimMarkergetMarker (uint32 i)
 Return a marker of this track given its index. More...

virtual std::string & getName ()
 Return the name of the animation. More...

virtual void load ()
 Load from an xml file. More...

virtual void save ()
 Save to an xml document. More...

virtual std::string & getFilename ()
 Return the filename of the animation. More...

virtual void setFilename (std::string &name)
 Set the filename of the animation. More...

virtual bool isDirty ()
 Returns whether the sound animation changed since the last save. More...

virtual void setDirty (bool b)
 Set the dirty flag (Editing support). More...

virtual void play (UAudioMixer *mixer, float lastTime, float curTime, CSoundContext &context)
 Play the sounds of the markers that fall within the specified time interval. More...


Protected Methods

virtual void sort ()
 Sort all the markers according to their time. More...


Protected Attributes

TSoundAnimId _Id
 The unique ID of the animation. More...

std::string _Name
 The name of the animation. More...

TMarkerVector _Markers
 The set of markers. More...

std::string _Filename
 The filename. More...

bool _Dirty
 Has the sound animation changed since the last save? (Editing support). More...


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
NoId 

Definition at line 49 of file sound_animation.h.


Constructor & Destructor Documentation

NLSOUND::CSoundAnimation::CSoundAnimation std::string &    name,
TSoundAnimId    id
[inline]
 

Definition at line 54 of file sound_animation.h.

References _Dirty, _Id, _Name, id, and NLSOUND::TSoundAnimId.

virtual NLSOUND::CSoundAnimation::~CSoundAnimation   [inline, virtual]
 

Definition at line 56 of file sound_animation.h.


Member Function Documentation

void NLSOUND::CSoundAnimation::addMarker CSoundAnimMarker   marker [virtual]
 

Add a new marker.

Definition at line 43 of file sound_animation.cpp.

References _Dirty, _Markers, and sort.

Referenced by load.

virtual uint32 NLSOUND::CSoundAnimation::countMarkers   [inline, virtual]
 

Return the number of markers in this track.

Definition at line 66 of file sound_animation.h.

References _Markers.

virtual std::string& NLSOUND::CSoundAnimation::getFilename   [inline, virtual]
 

Return the filename of the animation.

Definition at line 82 of file sound_animation.h.

References _Filename.

virtual CSoundAnimMarker* NLSOUND::CSoundAnimation::getMarker uint32    i [inline, virtual]
 

Return a marker of this track given its index.

Definition at line 69 of file sound_animation.h.

References _Markers.

virtual std::string& NLSOUND::CSoundAnimation::getName   [inline, virtual]
 

Return the name of the animation.

Definition at line 72 of file sound_animation.h.

References _Name.

virtual bool NLSOUND::CSoundAnimation::isDirty   [inline, virtual]
 

Returns whether the sound animation changed since the last save.

(Editing support)

Definition at line 89 of file sound_animation.h.

References _Dirty.

void NLSOUND::CSoundAnimation::load   [virtual]
 

Load from an xml file.

Definition at line 159 of file sound_animation.cpp.

References _Dirty, _Filename, addMarker, and file.

void NLSOUND::CSoundAnimation::play UAudioMixer   mixer,
float    lastTime,
float    curTime,
CSoundContext   context
[virtual]
 

Play the sounds of the markers that fall within the specified time interval.

Definition at line 142 of file sound_animation.cpp.

References _Markers, and nlassert.

void NLSOUND::CSoundAnimation::removeMarker CSoundAnimMarker   marker [virtual]
 

Remove a marker.

Definition at line 55 of file sound_animation.cpp.

References _Dirty, and _Markers.

void NLSOUND::CSoundAnimation::save   [virtual]
 

Save to an xml document.

Definition at line 81 of file sound_animation.cpp.

References _Dirty, _Filename, _Markers, file, s, and NLMISC::smprintf.

virtual void NLSOUND::CSoundAnimation::setDirty bool    b [inline, virtual]
 

Set the dirty flag (Editing support).

Definition at line 92 of file sound_animation.h.

References _Dirty.

virtual void NLSOUND::CSoundAnimation::setFilename std::string &    name [inline, virtual]
 

Set the filename of the animation.

Definition at line 86 of file sound_animation.h.

References _Filename.

void NLSOUND::CSoundAnimation::sort   [protected, virtual]
 

Sort all the markers according to their time.

Definition at line 74 of file sound_animation.cpp.

Referenced by addMarker.


Member Data Documentation

bool NLSOUND::CSoundAnimation::_Dirty [protected]
 

Has the sound animation changed since the last save? (Editing support).

Definition at line 115 of file sound_animation.h.

Referenced by addMarker, CSoundAnimation, isDirty, load, removeMarker, save, and setDirty.

std::string NLSOUND::CSoundAnimation::_Filename [protected]
 

The filename.

Definition at line 112 of file sound_animation.h.

Referenced by getFilename, load, save, and setFilename.

TSoundAnimId NLSOUND::CSoundAnimation::_Id [protected]
 

The unique ID of the animation.

Definition at line 103 of file sound_animation.h.

Referenced by CSoundAnimation.

TMarkerVector NLSOUND::CSoundAnimation::_Markers [protected]
 

The set of markers.

Definition at line 109 of file sound_animation.h.

Referenced by addMarker, countMarkers, getMarker, play, removeMarker, and save.

std::string NLSOUND::CSoundAnimation::_Name [protected]
 

The name of the animation.

Definition at line 106 of file sound_animation.h.

Referenced by CSoundAnimation, and getName.


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