#include <libsswf.h>
Public Member Functions | |
ActionWaitForFrame (TagBase *tag, action_t action=ACTION_WAIT_FOR_FRAME) | |
Initialize the ActionWaitForFrame object. | |
void | AddAction (Action *action) |
Add a sub-action to the wait frame action. | |
void | SetFrameName (const char *name) |
Set the name of the frame to wait for. | |
virtual Vectors * | SubList (void) |
Return the Vectors holding the sub-actions. | |
Private Member Functions | |
virtual Action * | Duplicate (void) const |
Create a clone of this action. | |
virtual ErrorManager::error_code_t | ParseData (const Data &data) |
Parse the data of the ActionWaitForFrame object. | |
virtual ErrorManager::error_code_t | SaveData (Data &data, Data &nested_data) |
Save the extraneous data of the ActionWaitForFrame object. | |
Private Attributes | |
Vectors | f_actions |
uint16_t | f_frame |
char * | f_frame_name |
This constructor initializes the ActionWaitForFrame object with a frame with no name and no actions.
The action parameter can be set to:
ACTION_WAIT_FOR_FRAME ACTION_WAIT_FOR_FRAME2
[in] | tag | The tag in which this action is being added |
[in] | action | One of the wait for action codes |
References sswf::Action::ACTION_WAIT_FOR_FRAME, sswf::Action::ACTION_WAIT_FOR_FRAME2, sswf::assert(), and f_frame_name.
Referenced by Duplicate().
void ActionWaitForFrame::AddAction | ( | Action * | action | ) |
This function adds a sub-action to execute once the movie loaded the specified frame.
You can also access the list of sub-actions using the sswf::ActioWaitForFrame::SubList() function.
Note that the total number of these actions is 255 (and not 255 bytes!) This makes it difficult to read this action.
[in] | action | The action to append to this wait for frame |
References f_actions, and sswf::Vectors::Set().
Referenced by Duplicate().
Action * ActionWaitForFrame::Duplicate | ( | void | ) | const [private, virtual] |
This function creates a new ActionWaitForFrame and copies the frame name and all the sub-actions in it. Finally, it returns the pointer of the new action.
Reimplemented from sswf::Action.
References ActionWaitForFrame(), AddAction(), sswf::Vectors::Count(), sswf::Action::Duplicate(), sswf::Action::f_action, f_actions, f_frame_name, sswf::Vectors::Get(), SetFrameName(), and sswf::Action::Tag().
ErrorManager::error_code_t ActionWaitForFrame::ParseData | ( | const Data & | data | ) | [private, virtual] |
This function parses the Data buffer to retrieve the frame number (ACTION_WAIT_FOR_FRAME) and the number of nested actions.
[in] | data | The Data buffer where the information is saved |
Reimplemented from sswf::Action.
References sswf::Action::ACTION_WAIT_FOR_FRAME, sswf::ErrorManager::ERROR_CODE_NONE, sswf::Action::f_action, f_actions, f_frame, sswf::Data::GetByte(), sswf::Data::GetShort(), sswf::Action::Parse(), and sswf::Action::Tag().
ErrorManager::error_code_t ActionWaitForFrame::SaveData | ( | Data & | data, | |
Data & | nested_data | |||
) | [private, virtual] |
This function saves the frame number (ACTION_WAIT_FOR_FRAME) and the number of nested actions.
If the specified frame is not found or no frame name is specified for an ACTION_WAIT_FOR_FRAME, then an error results.
[in] | data | The Data buffer where the information is saved |
[in] | nested_data | The Action::Save() function defines this buffer, this function does not need it since the size is not what is saved in these actions |
Reimplemented from sswf::Action.
References sswf::Action::ACTION_WAIT_FOR_FRAME, sswf::Vectors::Count(), sswf::ErrorManager::ERROR_CODE_ACTION_OVERFLOW, sswf::ErrorManager::ERROR_CODE_MISSING_FRAME_NAME, sswf::ErrorManager::ERROR_CODE_NONE, sswf::ErrorManager::ERROR_CODE_OBJECT_NOT_FOUND, sswf::Action::f_action, f_actions, f_frame_name, sswf::TagBase::FindLabelledTag(), sswf::ErrorManager::KeepFirst(), sswf::Action::OnError(), sswf::Data::PutByte(), sswf::Data::PutShort(), sswf::Action::Tag(), and sswf::TagBase::WhichFrame().
void ActionWaitForFrame::SetFrameName | ( | const char * | frame_name | ) |
In case you used ACTION_WAIT_FOR_FRAME, this is the name of the frame to wait for.
[in] | frame_name | The name of the frame to wait for |
References f_frame_name, sswf::MemoryManager::MemFree(), and sswf::MemoryManager::StrDup().
Referenced by Duplicate().
Vectors * ActionWaitForFrame::SubList | ( | void | ) | [virtual] |
This function is used to retrieve the pointer of the Vectors used to register all the sub-actions of this ActionWaitForFrame object.
Reimplemented from sswf::Action.
References f_actions.
Vectors sswf::ActionWaitForFrame::f_actions [private] |
Referenced by AddAction(), Duplicate(), ParseData(), SaveData(), and SubList().
uint16_t sswf::ActionWaitForFrame::f_frame [private] |
Referenced by ParseData().
char* sswf::ActionWaitForFrame::f_frame_name [private] |
Referenced by ActionWaitForFrame(), Duplicate(), SaveData(), and SetFrameName().