#include <libsswf.h>
Public Member Functions | |
Factory (swf_tag_t tag, int priority=0) | |
Initializes a factory. | |
int | GetPriority (void) const |
Return this factory priority. | |
swf_tag_t | GetTag (void) const |
Return the tag identifier that this factory represents. | |
virtual TagBase * | NewTag (TagBase *parent, const Data &data) const =0 |
virtual | ~Factory () |
Cleanup this factory. | |
Private Attributes | |
const int | f_priority |
const swf_tag_t | f_tag_id |
TagHeader::Factory::Factory | ( | swf_tag_t | tag, | |
int | priority = 0 | |||
) |
The factory constructor saves the factory tag and returns.
By default, the system factories have a priority of 0. To override a system factory, use a priority of 1 or more.
[in] | tag | The tag representing that factory. |
[in] | priority | The priority of this factory. |
References RegisterFactory().
TagHeader::Factory::~Factory | ( | ) | [virtual] |
This function removes the factory from the list of known factories in the TagHeader list.
References UnregisterFactory().
int TagHeader::Factory::GetPriority | ( | void | ) | const |
This function returns the priority of this factory.
This allows you to create multiple factories for the same tag, which allow you to override system factories in your code.
The factory with the highest priority is used. The others are ignored.
References f_priority.
Referenced by RegisterFactory().
TagBase::swf_tag_t TagHeader::Factory::GetTag | ( | void | ) | const |
This function returns the tag that this factory represents.
References f_tag_id.
Referenced by RegisterFactory(), and UnregisterFactory().
virtual TagBase* sswf::TagHeader::Factory::NewTag | ( | TagBase * | parent, | |
const Data & | data | |||
) | const [pure virtual] |
Referenced by sswf::TagHeader::Load().
const int sswf::TagHeader::Factory::f_priority [private] |
Referenced by GetPriority().
const swf_tag_t sswf::TagHeader::Factory::f_tag_id [private] |
Referenced by GetTag().