Made to Order Software Corporation Logo

libsswf: sswf::TagInfo Class Reference

An attempt in creating a TagInfo. More...

#include <libsswf.h>

Inheritance diagram for sswf::TagInfo:

:TagBase :MemoryManager

List of all members.

Public Member Functions

virtual ErrorManager::error_code_t Save (Data &data)
 Save the info tag in the Data buffer.
void SetInfo (const char *info)
 Set the info string.
void SetVersion (long version)
 Set the version of the tool saving this SWF file.
 TagInfo (TagBase *parent)
 Initializes the TagInfo.
virtual swf_type_t TypeFlags (void) const
 The type of this tag.

Private Member Functions

virtual ErrorManager::error_code_t ParseTag (swf_tag_t tag, const Data &data)
virtual ErrorManager::error_code_t PreSave (void)
 This tag appeared in version 3 of SWF.

Private Attributes

char * f_info
long f_version

Detailed Description

This class is an attempt in generating a valid TagInfo (also called a GeneratorCommand tag).

At this time, this generates errors and the movie does not play correctly.

Constructor & Destructor Documentation

TagInfo::TagInfo ( TagBase parent  ) 

By default, the TagInfo has no info and no version defined.

[in] parent a TagHeader tag
See also:
void sswf::TagInfoSetInfo(const char *info)

void sswf::TagInfoSetVersion(long version)

References f_info, and f_version.

Member Function Documentation

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

Implements sswf::TagBase.

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

Tells the TagHeader that a version 3+ movie is required.

ErrorManager::ERROR_CODE_NONE or some other error

Reimplemented from sswf::TagBase.

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

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

This function saves the info version and string in the Data output buffer.

[in,out] data The Data buffer where the result is saved
Zero when no errors occurs and non-zero otherwise

Implements sswf::TagBase.

References sswf::ErrorManager::ERROR_CODE_NONE, f_info, f_version, sswf::Data::PutLong(), sswf::TagBase::SaveString(), sswf::TagBase::SaveTag(), and sswf::TagBase::SWF_TAG_DEFINE_INFO.

void TagInfo::SetInfo ( const char *  info  ) 

This function saves the string passed as a parameter and saves it as the information string.

[in] info The info string to save in the TagInfo
See also:
void TagInfo::SetVersion(long version)

References f_info, sswf::MemoryManager::MemFree(), and sswf::MemoryManager::StrDup().

void TagInfo::SetVersion ( long  version  ) 

This function saves the version information.

The version can be anything, there are no specific test on that one.

[in] version The version of the tool saving this SWF animation
See also:
void TagInfo::SetInfo(const char *info)

References f_version.

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

The TagInfo is a DEFINE type.

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

Implements sswf::TagBase.


Member Data Documentation

char* sswf::TagInfo::f_info [private]

Referenced by Save(), SetInfo(), and TagInfo().

long sswf::TagInfo::f_version [private]

Referenced by Save(), SetVersion(), and TagInfo().

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