Deserialize an AMF buffer to as_values. More...
|Reader (const boost::uint8_t *&pos, const boost::uint8_t *end, Global_as &gl)|
|Construct a Reader with pointers into an AMF buffer. |
|bool||operator() (as_value &val, Type t=NOTYPE)|
|Create a type from current position in the AMF buffer. |
Deserialize an AMF buffer to as_values.
This class relies on the public interface of as_value because we don't necessarily know in advance what basic type will be read from the buffer. Note that callers may change the current buffer position. They must check that the read position is not past the end when a Reader object is called. This is very important! For reading of basic types, there is no need to use VM resources. Object types required the construction of objects, which in turn needs a reference to a Global_as. For this reason, object reading functions are member functions, and the Reader requires a Global_as& reference in case it encounters object data.
|gnash::amf::Reader::Reader||(||const boost::uint8_t *&||pos,|
|const boost::uint8_t *||end,|
Construct a Reader with pointers into an AMF buffer.
You can use the amf::Reader in combination with other reads on the data as long as the read position is never moved after end.
|pos||The read position in the buffer. This is moved after every read to point to the next data field. You must ensure that pos is not greater than end on every read.|
|end||The end of the buffer.|
|gl||A global reference for creating objects when necessary.|