#include <libsswf.h>
Public Member Functions | |
ActionStoreRegister (TagBase *tag) | |
Initialize the ActionStoreRegister. | |
void | SetRegister (unsigned char reg) |
Defines which register will hold the stack content. | |
Private Member Functions | |
virtual Action * | Duplicate (void) const |
Create a clone of this action. | |
virtual int | GetMaxRegister (void) const |
Get the maximum register number in use. | |
virtual ErrorManager::error_code_t | ParseData (const Data &data) |
Parse the data of the ActionStoreRegister. | |
virtual ErrorManager::error_code_t | SaveData (Data &data, Data &nested_data) |
Save the extraneous data for this action. | |
Private Attributes | |
unsigned char | f_reg |
ActionStoreRegister::ActionStoreRegister | ( | TagBase * | tag | ) |
Initialize the ActionStoreRegister by setting the register number to zero. Use the SetRegister() function to change the default.
[in] | tag | The tag in which this action is being added |
References f_reg.
Referenced by Duplicate().
Action * ActionStoreRegister::Duplicate | ( | void | ) | const [private, virtual] |
This function allocates a new ActionStoreRegister object, it copies the register number and returns the pointer of the new action.
Reimplemented from sswf::Action.
References ActionStoreRegister(), f_reg, SetRegister(), and sswf::Action::Tag().
int ActionStoreRegister::GetMaxRegister | ( | void | ) | const [private, virtual] |
This function gets the larger register number in use by this action. This is actually equal to the register you defined with SetRegister() or zero.
Reimplemented from sswf::Action.
References f_reg.
ErrorManager::error_code_t ActionStoreRegister::ParseData | ( | const Data & | data | ) | [private, virtual] |
This function retrieves the register number of the action.
[in] | data | The Data buffer where the register number is read from |
Reimplemented from sswf::Action.
References f_reg, and sswf::Data::GetByte().
ErrorManager::error_code_t ActionStoreRegister::SaveData | ( | Data & | data, | |
Data & | nested_data | |||
) | [private, virtual] |
This means saving one byte with the register number.
[in] | data | The Data buffer where the register number is to be saved |
[in] | nested_data | The ActionStoreRegister does not support nested data |
Reimplemented from sswf::Action.
References sswf::ErrorManager::ERROR_CODE_NONE, f_reg, and sswf::Data::PutByte().
void ActionStoreRegister::SetRegister | ( | unsigned char | reg | ) |
This function can be used to define the register number to hold the current stack content.
Outside a function, only registers 0 to 3 are acceptable.
Inside a function (DeclareFunction2--Version 7 of SWF), all registers from 0 to 254 are acceptable. (from my testing it seems that register 255 does not work.)
[in] | reg | The new register to assign to this action |
References f_reg.
Referenced by Duplicate().
unsigned char sswf::ActionStoreRegister::f_reg [private] |
Referenced by ActionStoreRegister(), Duplicate(), GetMaxRegister(), ParseData(), SaveData(), and SetRegister().