Made to Order Software Corporation Logo

libsswf: sswf::TagStartSound Class Reference

Class used to start/stop a sound. More...

#include <libsswf.h>

Inheritance diagram for sswf::TagStartSound:

:TagBase :MemoryManager

List of all members.


Public Member Functions

virtual ErrorManager::error_code_t Save (Data &data)
 Save the start sound tag in the Data buffer.
void SetInfo (SoundInfo *sound_info)
 Defines the sound info of this start sound tag.
 TagStartSound (TagBase *parent)
 Initialize a start sound tag.
virtual swf_type_t TypeFlags (void) const
 Returns the type flags of this start sound tag.

Private Member Functions

virtual ErrorManager::error_code_t ParseTag (swf_tag_t tag, const Data &data)
virtual ErrorManager::error_code_t PreSave (void)
 Test the validity of the start sound tag.

Private Attributes

SoundInfof_sound_info

Detailed Description

This class is used to start and/or stop a sound in an SWF animation.

In order to work properly, you must call sswf::TagStartSound::SetInfo(SoundInfo *sound_info) at least once.

See also:
sswf::TagStartSound::SetInfo(SoundInfo *sound_info)

SWF Alexis' Reference—Start Sound

SWF Alexis' Reference—swf_tag


Constructor & Destructor Documentation

TagStartSound::TagStartSound ( TagBase parent  ) 

This function initializes a start sound tag. This means setting the pointer to the sound info to NULL.

Parameters:
[in] parent The parent of this TagStartSound
See also:
sswf::TagStartSound::SetInfo(SoundInfo *sound_info)

References f_sound_info.


Member Function Documentation

virtual ErrorManager::error_code_t sswf::TagStartSound::ParseTag ( swf_tag_t  tag,
const Data data 
) [private, virtual]

Implements sswf::TagBase.

ErrorManager::error_code_t TagStartSound::PreSave ( void   )  [private, virtual]

This function makes sure that you have set a valid sound info.

If the sound info pointer is null, this function returns an error.

Returns:
sswf::ErrorManager::ERROR_CODE_START_SOUND_NO_INFO if no sound info was defined; no error otherwise

Reimplemented from sswf::TagBase.

References sswf::ErrorManager::ERROR_CODE_START_SOUND_NO_INFO, f_sound_info, sswf::TagBase::OnError(), and sswf::SoundInfo::PreSave().

ErrorManager::error_code_t TagStartSound::Save ( Data data  )  [virtual]

This function saves the start sound tag in the specified Data buffer. This calls the sswf::SoundInfo::Save(Data& data) function.

Parameters:
[in] data The Data buffer where the start sound tag is saved
Returns:
an error manager code
See also:
sswf::SoundInfo::Save(Data& data)

Implements sswf::TagBase.

References sswf::Data::Append(), sswf::Data::ByteSize(), sswf::ErrorManager::ERROR_CODE_NONE, f_sound_info, sswf::SoundInfo::Save(), sswf::TagBase::SaveTag(), and sswf::TagBase::SWF_TAG_START_SOUND.

void TagStartSound::SetInfo ( SoundInfo sound_info  ) 

This function saves the specified sound info pointer in the TagStartSound object.

Warning:
The sound_info structure will be used by the TagStartSound until replaced by a new pointer or set to NULL.
You are responsible to ensure that this structure remains valid until the object does not require it anymore.

References f_sound_info.

TagBase::swf_type_t TagStartSound::TypeFlags ( void   )  const [virtual]

The start sound tag is a CONTROL tag.

The start sound tag has a reference to a sound (actually defined in the sound info.)

Returns:
A set of SWF TYPE flags
See also:
sswf::TagStartSound::SetInfo(SoundInfo *sound_info)

Implements sswf::TagBase.

References SWF_TYPE_CONTROL, and SWF_TYPE_REFERENCE.


Member Data Documentation


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


Generated on Wed Mar 18 15:14:00 2009 for libsswf by  doxygen 1.5.5