#include <libsswf.h>
Inheritance diagram for sswf::ActionStoreRegister:
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 | 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 |
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.
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.
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.
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 |
unsigned char sswf::ActionStoreRegister::f_reg [private] |