25 #include <boost/bind.hpp> 31 namespace ActionScript {
48 Array::Array(
const std::list<Variable> &values) : _values(values) {
69 std::list<Variable>::iterator iter =
_values.begin();
70 std::advance(iter, static_cast<size_t>(
id.asNumber()));
74 if (
id.isString() &&
id.asString() ==
"length")
82 std::list<Variable>::iterator iter =
_values.begin();
83 std::advance(iter, static_cast<size_t>(
id.asNumber()));
void setMember(const Variable &id, const Variable &value)
static Variable as_push(AVM &avm)
Array(const std::list< Variable > &values=std::list< Variable >())
static Variable as_pop(AVM &avm)
std::list< Variable > _values
Implementation for an actionscript Array class.
virtual void setMember(const Variable &id, const Variable &value)
void push(const Variable &v)
boost::shared_ptr< T > as() const
Variable getMember(const Variable &id)
An action script variable.
virtual Variable getMember(const Variable &id)
boost::shared_ptr< Array > ArrayPtr
Variable getRegister(byte index)
The Action script virtual machine (AVM).