#include <libsswf.h>
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 | |
SoundInfo * | f_sound_info |
In order to work properly, you must call sswf::TagStartSound::SetInfo(SoundInfo *sound_info) at least once.
TagStartSound::TagStartSound | ( | TagBase * | parent | ) |
This function initializes a start sound tag. This means setting the pointer to the sound info to NULL.
[in] | parent | The parent of this TagStartSound |
References f_sound_info.
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.
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.
[in] | data | The Data buffer where the start sound tag is saved |
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.
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.)
Implements sswf::TagBase.
References SWF_TYPE_CONTROL, and SWF_TYPE_REFERENCE.
SoundInfo* sswf::TagStartSound::f_sound_info [private] |
Referenced by PreSave(), Save(), SetInfo(), and TagStartSound().