Made to Order Software Corporation Logo

libsswf: sswf::TagRemove Class Reference

Remove an object from the display list. More...

#include <libsswf.h>

Inheritance diagram for sswf::TagRemove:

:TagBase :MemoryManager

List of all members.


Public Member Functions

virtual ErrorManager::error_code_t Save (Data &data)
 Save the TagRemove in the specified Data buffer.
void SetDepth (int depth)
 Set the depth at which an object is removed.
void SetObjectID (sswf_id_t id)
 Set the identifier of the object to be removed.
 TagRemove (TagBase *parent)
 Initialize the TagRemove with defaults.
virtual swf_type_t TypeFlags (void) const
 Return the type flags of the TagRemove tag.

Private Member Functions

virtual ErrorManager::error_code_t ParseTag (swf_tag_t tag, const Data &data)
 Parse data from a file into a Remove tag.
virtual ErrorManager::error_code_t PreSave (void)
 Prepare the movie to save a Remove tag.

Private Attributes

int f_depth
sswf_id_t f_id

Detailed Description

A Flash animation is composed of a set of characters (shapes) and a display list. You insert shapes in the display list using the sswf::TagPlace and you remove shapes using the sswf::TagRemove tag.

Since version 3 of SWF, it is possible to remove objects from the list using sswf::TagPlace only.

See also:
sswf::TagPlace

sswf::TagPlace::Replace

SWF Alexis' Reference—Remove Object

SWF Alexis' Reference—swf_tag


Constructor & Destructor Documentation

TagRemove::TagRemove ( TagBase parent  ) 

By default, a TagRemove tag is set to 'no depth' and 'no identifier'.

You can specify one or both of these parameters.

Parameters:
parent A object of type sswf::TagHeader or sswf::TagSprite
See also:
void sswf::TagRemove::SetDepth

void sswf::TagRemove::SetObjectID

sswf::TagPlace

void sswf::TagPlace::Replace(void)

References f_depth, f_id, and SSWF_ID_NONE.


Member Function Documentation

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

This function reads the remove tag identifier and depth.

Parameters:
[in] tag The tag that generated this call
[in] data The Data buffer from the Flash file being loaded
Returns:
An error if one occurs, or ErrorManager::ERROR_CODE_NONE

Implements sswf::TagBase.

References sswf::ErrorManager::ERROR_CODE_NONE, f_depth, f_id, sswf::Data::GetShort(), and sswf::TagBase::SWF_TAG_REMOVE_OBJECT.

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

A TagRemove requests at least a version 3 movie when an object identification was specified.

Returns:
Zero when no error occurs; non-zero otherwise

Reimplemented from sswf::TagBase.

References sswf::ErrorManager::ERROR_CODE_NONE, f_id, sswf::TagBase::MinimumVersion(), and SSWF_ID_NONE.

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

This function saves the TagRemove information--the depth and eventual object identifier--in the Data buffer.

Parameters:
data The Data buffer where the tag is saved
Returns:
Zero when no errors occur, non-zero otherwise

Implements sswf::TagBase.

References sswf::assert(), sswf::ErrorManager::ERROR_CODE_NONE, f_depth, f_id, sswf::Data::PutShort(), sswf::TagBase::SaveTag(), SSWF_ID_NONE, sswf::TagBase::SWF_TAG_REMOVE_OBJECT, and sswf::TagBase::SWF_TAG_REMOVE_OBJECT2.

void sswf::TagRemove::SetDepth ( int  depth  )  [inline]

This function can be used to remove an object at the specified depth.

It is possible to only define the depth in which case the last object added at this depth is removed from the display list.

Note:
Defining the depth is mandatory.
Since version 3 of SWF, it is possible to use the replace flag of the sswf::TagPlace instead of removing an object with an sswf::TagRemove.

Parameters:
depth The depth where an object is removed
See also:
void sswf::TagRemove::SetObjectID(sswf_id_t id)

void sswf::TagPlace::Replace(void)

References f_depth.

void sswf::TagRemove::SetObjectID ( sswf_id_t  id  )  [inline]

The identification of the object to be removed.

The TagRemove can be used with an object identification in which case only an object with the given identification is removed from the list. If no such object exists, nothing happens.

Note:
Since version 3 of SWF, it is possible to use the replace flag of the sswf::TagPlace instead of removing an object with an sswf::TagRemove.
See also:
void sswf::TagRemove::SetDepth(int depth)

void sswf::TagPlace::Replace(void)

References f_id.

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

A TagRemove is a CONTROL tag: it is used to change the display list.

A TagRemove has a REFERENCE to another object.

See also:
TagBase::swf_type_t sswf::TagBase::TypeFlags(void) const

Implements sswf::TagBase.

References SWF_TYPE_CONTROL, and SWF_TYPE_REFERENCE.


Member Data Documentation

int sswf::TagRemove::f_depth [private]

Referenced by ParseTag(), Save(), SetDepth(), and TagRemove().


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


Generated on Wed Mar 18 15:13:59 2009 for libsswf by  doxygen 1.5.5