Made to Order Software Corporation Logo

libsswf: sswf::TagProductInfo Class Reference

Information about the software creating the output animation. More...

#include <libsswf.h>

Inheritance diagram for sswf::TagProductInfo:

:TagBase :MemoryManager

List of all members.


Public Member Functions

virtual ErrorManager::error_code_t Save (Data &data)
 Save the product info tag in the Data buffer.
void SetBuild (int64_t build_number)
 Set the product build number.
void SetCompileDate (int64_t date)
 Set the date when the product was compiled.
void SetEdition (long edition)
 Set the edition identifier.
void SetProduct (long product_id)
 Set the product identifier.
void SetVersion (int major, int minor)
 Set the version of the tool saving this SWF file.
 TagProductInfo (TagBase *parent)
 Initializes the TagProductInfo.
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)
 Presumably, this tag appeared in version 3 of SWF.

Private Attributes

int64_t f_build_number
int64_t f_date
long f_edition
int f_major
int f_minor
long f_product_id

Detailed Description

This tag is used to define information about the software creating the animation such as the build version, the build date, product number and so on.

Since I do not know of any way to get a product ID which is unique, I have no idea how you can pretend that this would be unique...

See also:
SWF Alexis' Reference—Product Info

SWF Alexis' Reference—swf_tag


Constructor & Destructor Documentation

TagProductInfo::TagProductInfo ( TagBase parent  ) 

By default, the TagProductInfo is set to all zeroes except for the major version which is set to 1.

Parameters:
[in] parent a TagHeader tag
See also:
void sswf::TagProductInfo::SetProduct(uint32_t product_id);

void sswf::TagProductInfo::SetEdition(uint32_t edition);

void sswf::TagProductInfo::SetVersion(int major, int minor);

void sswf::TagProductInfo::SetBuild(int64_t build_number);

void sswf::TagProductInfo::SetCompileDate(int64_t date);

References f_build_number, f_date, f_edition, f_major, f_minor, and f_product_id.


Member Function Documentation

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

Implements sswf::TagBase.

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

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

Returns:
ErrorManager::ERROR_CODE_NONE or some other ErrorManager error

Reimplemented from sswf::TagBase.

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

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

This function saves the product info in the Data output buffer.

Parameters:
[in,out] data The Data buffer where the result is saved
Returns:
And ErrorManager error (ErrorManager::ERROR_CODE_NONE when no errors)

Implements sswf::TagBase.

References sswf::ErrorManager::ERROR_CODE_NONE, f_build_number, f_date, f_edition, f_major, f_minor, f_product_id, sswf::Data::PutByte(), sswf::Data::PutDLong(), sswf::Data::PutLong(), sswf::TagBase::SaveTag(), and sswf::TagBase::SWF_TAG_PRODUCT_INFO.

void TagProductInfo::SetBuild ( int64_t  build  ) 

This function saves your product build number.

There is no limit to the build number, any 64 bits value is acceptable.

This is usually not necessary for Linux products since we don't use build numbers, just a version. Yet, some versions have more than 2 numbers, this build number can be used to include extraneous numbers.

Parameters:
[in] build The product build number

References f_build_number.

void TagProductInfo::SetCompileDate ( int64_t  date  ) 

This function saves the date when your product was compiled.

The date is saved on 64 bits.

At this time I do not know what the unit/structure of this date is. (seconds, milliseconds or microseconds?)

Parameters:
date The date when the product was compiled

References f_date.

void TagProductInfo::SetEdition ( long  edition  ) 

This function saves your product edition identifier.

There is no limit to the identifier, any 32 bits value is acceptable.

This is anything you'd like. If you have different editions of your products (i.e. Free, Pro, Studio, Delux, etc.) use this field to differenciate their output.

Parameters:
[in] edition The product edition identifier
See also:
void TagInfo::SetProduct(uint32_t product)

References f_edition.

void TagProductInfo::SetProduct ( long  product  ) 

This function saves your product identifier.

There is no limit to the identifier, any 32 bits value is acceptable.

We would need a way to define a unique identifier...

Parameters:
[in] product The product identifier
See also:
void TagInfo::SetEdition(uint32_t edition)

References f_product_id.

void TagProductInfo::SetVersion ( int  major,
int  minor 
)

This function saves the version information.

The version can be anything. Note that both numbers are limited to a value from 0 to 255.

By default, the TagProductInfo sets 1 in the major version and 0 in the minor version.

Parameters:
[in] major The major version of the tool saving this SWF animation
[in] minor The minor version of the tool saving this SWF animation

References f_major, and f_minor.

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

The TagProductInfo is a DEFINE type.

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

Implements sswf::TagBase.

References SWF_TYPE_DEFINE.


Member Data Documentation

int64_t sswf::TagProductInfo::f_date [private]


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