#include <element.h>
Public Types | |
enum | amf0_type_e { NOTYPE = -1, NUMBER_AMF0 = 0x00, BOOLEAN_AMF0 = 0x01, STRING_AMF0 = 0x02, OBJECT_AMF0 = 0x03, MOVIECLIP_AMF0 = 0x04, NULL_AMF0 = 0x05, UNDEFINED_AMF0 = 0x06, REFERENCE_AMF0 = 0x07, ECMA_ARRAY_AMF0 = 0x08, OBJECT_END_AMF0 = 0x09, STRICT_ARRAY_AMF0 = 0x0a, DATE_AMF0 = 0x0b, LONG_STRING_AMF0 = 0x0c, UNSUPPORTED_AMF0 = 0x0d, RECORD_SET_AMF0 = 0x0e, XML_OBJECT_AMF0 = 0x0f, TYPED_OBJECT_AMF0 = 0x10, AMF3_DATA = 0x11, RTMP_HEADER = 0x20, NOTYPE = -1, NUMBER_AMF0 = 0x00, BOOLEAN_AMF0 = 0x01, STRING_AMF0 = 0x02, OBJECT_AMF0 = 0x03, MOVIECLIP_AMF0 = 0x04, NULL_AMF0 = 0x05, UNDEFINED_AMF0 = 0x06, REFERENCE_AMF0 = 0x07, ECMA_ARRAY_AMF0 = 0x08, OBJECT_END_AMF0 = 0x09, STRICT_ARRAY_AMF0 = 0x0a, DATE_AMF0 = 0x0b, LONG_STRING_AMF0 = 0x0c, UNSUPPORTED_AMF0 = 0x0d, RECORD_SET_AMF0 = 0x0e, XML_OBJECT_AMF0 = 0x0f, TYPED_OBJECT_AMF0 = 0x10, AMF3_DATA = 0x11, RTMP_HEADER = 0x20 } |
enum | amf3_type_e { UNDEFINED_AMF3 = 0x00, NULL_AMF3 = 0x01, FALSE_AMF3 = 0x02, TRUE_AMF3 = 0x03, INTEGER_AMF3 = 0x04, DOUBLE_AMF3 = 0x05, STRING_AMF3 = 0x06, XMLDOC_AMF3 = 0x07, DATE_AMF3 = 0x08, ARRAY_AMF3 = 0x09, OBJECT_AMF3 = 0x0a, XML_AMF3 = 0x0b, BYTES_AMF3 = 0x0c, UNDEFINED_AMF3 = 0x00, NULL_AMF3 = 0x01, FALSE_AMF3 = 0x02, TRUE_AMF3 = 0x03, INTEGER_AMF3 = 0x04, DOUBLE_AMF3 = 0x05, STRING_AMF3 = 0x06, XMLDOC_AMF3 = 0x07, DATE_AMF3 = 0x08, ARRAY_AMF3 = 0x09, OBJECT_AMF3 = 0x0a, XML_AMF3 = 0x0b, BYTES_AMF3 = 0x0c } |
enum | amf0_type_e { NOTYPE = -1, NUMBER_AMF0 = 0x00, BOOLEAN_AMF0 = 0x01, STRING_AMF0 = 0x02, OBJECT_AMF0 = 0x03, MOVIECLIP_AMF0 = 0x04, NULL_AMF0 = 0x05, UNDEFINED_AMF0 = 0x06, REFERENCE_AMF0 = 0x07, ECMA_ARRAY_AMF0 = 0x08, OBJECT_END_AMF0 = 0x09, STRICT_ARRAY_AMF0 = 0x0a, DATE_AMF0 = 0x0b, LONG_STRING_AMF0 = 0x0c, UNSUPPORTED_AMF0 = 0x0d, RECORD_SET_AMF0 = 0x0e, XML_OBJECT_AMF0 = 0x0f, TYPED_OBJECT_AMF0 = 0x10, AMF3_DATA = 0x11, RTMP_HEADER = 0x20, NOTYPE = -1, NUMBER_AMF0 = 0x00, BOOLEAN_AMF0 = 0x01, STRING_AMF0 = 0x02, OBJECT_AMF0 = 0x03, MOVIECLIP_AMF0 = 0x04, NULL_AMF0 = 0x05, UNDEFINED_AMF0 = 0x06, REFERENCE_AMF0 = 0x07, ECMA_ARRAY_AMF0 = 0x08, OBJECT_END_AMF0 = 0x09, STRICT_ARRAY_AMF0 = 0x0a, DATE_AMF0 = 0x0b, LONG_STRING_AMF0 = 0x0c, UNSUPPORTED_AMF0 = 0x0d, RECORD_SET_AMF0 = 0x0e, XML_OBJECT_AMF0 = 0x0f, TYPED_OBJECT_AMF0 = 0x10, AMF3_DATA = 0x11, RTMP_HEADER = 0x20 } |
enum | amf3_type_e { UNDEFINED_AMF3 = 0x00, NULL_AMF3 = 0x01, FALSE_AMF3 = 0x02, TRUE_AMF3 = 0x03, INTEGER_AMF3 = 0x04, DOUBLE_AMF3 = 0x05, STRING_AMF3 = 0x06, XMLDOC_AMF3 = 0x07, DATE_AMF3 = 0x08, ARRAY_AMF3 = 0x09, OBJECT_AMF3 = 0x0a, XML_AMF3 = 0x0b, BYTES_AMF3 = 0x0c, UNDEFINED_AMF3 = 0x00, NULL_AMF3 = 0x01, FALSE_AMF3 = 0x02, TRUE_AMF3 = 0x03, INTEGER_AMF3 = 0x04, DOUBLE_AMF3 = 0x05, STRING_AMF3 = 0x06, XMLDOC_AMF3 = 0x07, DATE_AMF3 = 0x08, ARRAY_AMF3 = 0x09, OBJECT_AMF3 = 0x0a, XML_AMF3 = 0x0b, BYTES_AMF3 = 0x0c } |
Public Member Functions | |
Element () | |
Create a new Element with no data type. | |
~Element () | |
Delete this Element This deallocates all the memory used to hold the data. | |
Element (double data) | |
Construct an AMF Element from a double.. | |
Element (const std::string &name, double num) | |
Contruct a Property from a double. | |
Element (const char *data) | |
Contruct an AMF Element from an ASCII string. | |
Element (const std::string &data) | |
Element (const std::string &name, const std::string &data) | |
Contruct a Property from an ASCII string. | |
Element (bool data) | |
Contruct an AMF Element from a Boolean. | |
Element (const std::string &name, bool data) | |
Contruct a Property from a Boolean. | |
Element (std::vector< double > &data) | |
Contruct an AMF Element from an array of doubles. This becomes a StrictArray by default, as all the data types are the same. | |
Element (std::vector< std::string > &data) | |
Contruct an AMF Element from an array of ASCII strings This becomes a StrictArray by default, as all the data types are the same. | |
Element (std::vector< Element > &data) | |
Contruct an AMF Element from an array of other Elements. This becomes an EcmaArray by default, as all the data types are different. | |
void | clear () |
Clear the contents of the buffer by setting all the bytes to zeros. | |
Element & | operator= (Element &el) |
Make this Element be the same as another Element. | |
Element & | operator= (double num) |
Make this Element be the same as a double. This sets both the data type and the value. | |
Element & | operator= (const std::string &str) |
Make this Element be the same as an ASCII string. This sets both the data type and the value. | |
Element & | operator= (bool flag) |
Make this Element be the same as a boolean value. This sets both the data type and the value. | |
Element & | makeNullString () |
Make this Element be a NULL String type. A Null String is a string with a length of zero. | |
Element & | makeString (const char *str, size_t size) |
Make this Element with an ASCII string value. | |
Element & | makeString (boost::uint8_t *data, size_t size) |
Make this Element with an ASCII string value. | |
Element & | makeString (const std::string &data) |
Make this Element with an ASCII string value. | |
Element & | makeString (const std::string &name, const std::string &str) |
Make this Element a Property with an ASCII String value. | |
Element & | makeNumber (double num) |
Make this Element with a double value. | |
Element & | makeNumber (boost::shared_ptr< cygnal::Buffer > buf) |
Make this Element with a double value. | |
Element & | makeNumber (boost::uint8_t *data) |
Make this Element with a double value. The size isn't needed as a double is always the same size. | |
Element & | makeNumber (const std::string &name, double num) |
Make this Element a Property with a double value. | |
Element & | makeNumber (const std::string &name, boost::uint8_t *data) |
Element & | makeBoolean (boost::uint8_t *data) |
Make this Element with a boolean value. The size isn't needed as a boolean is always the same size. | |
Element & | makeBoolean (bool data) |
Make this Element with a boolean value. | |
Element & | makeBoolean (const std::string &name, bool data) |
Make this Element a Property with a boolean value. | |
Element & | makeUndefined () |
Make this Element an Undefined data type. | |
Element & | makeUndefined (const std::string &name) |
Make this Element a Property with an Undefined data type. | |
Element & | makeNull () |
Make this Element an NULL Object data type. | |
Element & | makeNull (const std::string &name) |
Make this Element a Property with an NULL Object data type. | |
Element & | makeObjectEnd () |
Make this Element an Object End data type. | |
Element & | makeObject () |
Make this Element as a Object data type. This is AMF data type that supports complex objects with properties. A Reference refers to a previously sent ActionScript object to save on bandwidth. | |
Element & | makeObject (const std::string &name) |
Make this Element as an Object data type. | |
Element & | makeObject (std::vector< boost::shared_ptr< cygnal::Element > > &data) |
Make this Element as an Object data type. | |
Element & | makeObject (const std::string &name, std::vector< boost::shared_ptr< cygnal::Element > > &data) |
Make this Element a Property with an Object as the value. | |
Element & | makeXMLObject () |
Make this Element as an XML Object data type. This is like a string object, but the type is different. | |
Element & | makeXMLObject (const std::string &name) |
Make this Element a Property with an XML Object as the value. | |
Element & | makeXMLObject (const std::string &name, const std::string &data) |
Make this Element a Property with an XML Object as the value. | |
Element & | makeXMLObject (boost::uint8_t *data) |
Element & | makeECMAArray () |
Make this Element a Property with an ECMA Array as the value. This is a mixed array of any AMF types. These are stored the same as an object, but with a different type. | |
Element & | makeECMAArray (const std::string &name) |
Make this Element a Property with an ECMA Array as the value. | |
Element & | makeECMAArray (std::vector< boost::shared_ptr< cygnal::Element > > &data) |
Make this Element a Property with an ECMA Array as the value. This is a mixed array of any AMF types. These are stored the same as an object, but with a different type. | |
Element & | makeECMAArray (const std::string &name, std::vector< boost::shared_ptr< cygnal::Element > > &data) |
Make this Element a Property with an ECMA Array as the value. | |
Element & | makeStrictArray () |
Make this Element a Property with an Strict Array as the value. This is an array of a single AMF type. These are stored the same as an object, but with a different type. | |
Element & | makeStrictArray (const std::string &name) |
Make this Element a Property with an Strict Array as the value. This is an array of a single AMF type. These are stored the same as an object, but with a different type. | |
Element & | makeStrictArray (std::vector< boost::shared_ptr< cygnal::Element > > &data) |
Make this Element a Property with an ECMA Array as the value. This is an array of a single AMF type. These are stored the same as an object, but with a different type. | |
Element & | makeStrictArray (const std::string &name, std::vector< boost::shared_ptr< cygnal::Element > > &data) |
Make this Element a Property with an Strict Array as the value. | |
Element & | makeTypedObject () |
Make this Element a Property with an Typed Object as the value. | |
Element & | makeTypedObject (const std::string &name) |
Make this Element a Property with an Typed Object as the value. | |
Element & | makeTypedObject (boost::uint8_t *data) |
Make this Element a Property with an Typed Object as the value. | |
Element & | makeReference () |
Make this Element a Property with an Object Reference as the value. | |
Element & | makeReference (boost::uint16_t index) |
Element & | makeReference (boost::uint8_t *data, size_t size) |
Make this Element a Property with an Object Reference as the value. | |
Element & | makeMovieClip () |
Make this Element a Property with a Movie Clip (SWF data) as the value. | |
Element & | makeMovieClip (boost::uint8_t *data, size_t size) |
Make this Element a Property with a Movie Clip (SWF data) as the value. | |
Element & | makeLongString () |
Make this Element a Property with a UTF8 String as the value. | |
Element & | makeLongString (boost::uint8_t *data) |
Make this Element a Property with a UTF8 String as the value. | |
Element & | makeRecordSet () |
Make this Element a Property with a Record Set as the value. | |
Element & | makeRecordSet (boost::uint8_t *data) |
Make this Element a Property with a Record Set as the value. | |
Element & | makeDate () |
Make this Element a Property with a Date as the value. | |
Element & | makeDate (boost::uint8_t *data) |
Make this Element a Property with a Date as the value. | |
Element & | makeDate (double data) |
Element & | makeUnsupported () |
Make this Element a Property with an Unsupported value. | |
Element & | makeUnsupported (boost::uint8_t *data) |
Make this Element a Property with an Unsupported value. | |
bool | operator== (Element &) |
Test equivalance against another Element. This compares all the data and the data type in the current Element with the supplied one, so it can be a performance hit. This is primarily only used for testing purposes. | |
bool | operator== (boost::shared_ptr< cygnal::Element >) |
Test equivalance against another Element. This compares all the data and the data type in the current Element with the supplied one, so it can be a performance hit. This is primarily only used for testing purposes. | |
bool | operator== (bool x) |
Test equivalance against a boolean value This compares all the data and the data type in the current Element to see if it is a Boolean and if the values ard the same. This is primarily only used for testing purposes. | |
boost::shared_ptr < cygnal::Element > | operator[] (size_t index) |
Get the Element or Property at a specified location. | |
size_t | getDataSize () const |
Get the size in bytes of the Element's data. All data in an Element is stored in a Buffer class. | |
amf0_type_e | getType () const |
Get the data type of this Element. | |
void | setType (amf0_type_e type) |
Get the data type of this Element. | |
bool | to_bool () const |
Cast the data in this Element to a boolean value. | |
double | to_number () const |
Cast the data in this Element to a double value. | |
boost::uint16_t | to_short () const |
Cast the data in this Element to a short (2 bytes) value. | |
boost::uint32_t | to_integer () const |
Cast the data in this Element to an integer (4 bytes) value. | |
const char * | to_string () const |
Cast the data in this Element to an ASCII string value. | |
boost::uint8_t * | to_reference () |
Cast the data in this Element to an real pointer to data. | |
const boost::uint8_t * | to_reference () const |
size_t | getNameSize () const |
Get the number of bytes in the name of this Element. Only top level Objects or properties have a name. | |
char * | getName () const |
Get the name of this Element. Only top level Objects or properties have a name. | |
void | setName (const std::string &name) |
Set the name of this Element or property. Only top level Objects or properties have a name. | |
void | setName (const char *name, size_t x) |
Set the name of this Element or property. Only top level Objects or properties have a name. | |
void | setName (boost::uint8_t *name, size_t size) |
Set the name of this Element or property. Only top level Objects or properties have a name. | |
boost::shared_ptr< Element > | findProperty (const std::string &name) |
Find the named property for this Object. | |
boost::shared_ptr< Element > | getProperty (size_t index) const |
Find the property at this index for this Object. | |
void | addProperty (boost::shared_ptr< Element > el) |
Add a Property to the array of properties for this object. | |
void | clearProperties () |
boost::shared_ptr< Element > | popProperty () |
Get a smart pointer to the Element for this Property. | |
size_t | propertySize () const |
Get the count of properties for this Element. | |
boost::shared_ptr< Buffer > | encode () |
Encode this Element (data type object). This encodes this Element and all of it's associated properties into raw binary data in big endoan format. | |
boost::shared_ptr< Buffer > | encode (bool notobject) |
std::vector< boost::shared_ptr < Element > > | getProperties () const |
Get the array of properties for this Element. | |
size_t | calculateSize () |
size_t | calculateSize (cygnal::Element &el) const |
void | dump () const |
Dump the internal data of this class in a human readable form. | |
void | dump (std::ostream &os) const |
Dump the internal data of this class in a human readable form. | |
Element () | |
Create a new Element with no data type. | |
~Element () | |
Delete this Element This deallocates all the memory used to hold the data. | |
Element (double data) | |
Construct an AMF Element from a double.. | |
Element (const std::string &name, double num) | |
Contruct a Property from a double. | |
Element (const char *data) | |
Contruct an AMF Element from an ASCII string. | |
Element (const std::string &data) | |
Element (const std::string &name, const std::string &data) | |
Contruct a Property from an ASCII string. | |
Element (bool data) | |
Contruct an AMF Element from a Boolean. | |
Element (const std::string &name, bool data) | |
Contruct a Property from a Boolean. | |
Element (std::vector< double > &data) | |
Contruct an AMF Element from an array of doubles. This becomes a StrictArray by default, as all the data types are the same. | |
Element (std::vector< std::string > &data) | |
Contruct an AMF Element from an array of ASCII strings This becomes a StrictArray by default, as all the data types are the same. | |
Element (std::vector< Element > &data) | |
Contruct an AMF Element from an array of other Elements. This becomes an EcmaArray by default, as all the data types are different. | |
void | clear () |
Clear the contents of the buffer by setting all the bytes to zeros. | |
Element & | operator= (Element &el) |
Make this Element be the same as another Element. | |
Element & | operator= (double num) |
Make this Element be the same as a double. This sets both the data type and the value. | |
Element & | operator= (const std::string &str) |
Make this Element be the same as an ASCII string. This sets both the data type and the value. | |
Element & | operator= (bool flag) |
Make this Element be the same as a boolean value. This sets both the data type and the value. | |
Element & | makeNullString () |
Make this Element be a NULL String type. A Null String is a string with a length of zero. | |
Element & | makeString (const char *str, size_t size) |
Make this Element with an ASCII string value. | |
Element & | makeString (boost::uint8_t *data, size_t size) |
Element & | makeString (const std::string &data) |
Make this Element with an ASCII string value. | |
Element & | makeString (const std::string &name, const std::string &str) |
Make this Element a Property with an ASCII String value. | |
Element & | makeNumber (double num) |
Make this Element with a double value. | |
Element & | makeNumber (boost::shared_ptr< cygnal::Buffer > buf) |
Make this Element with a double value. | |
Element & | makeNumber (boost::uint8_t *data) |
Make this Element with a double value. The size isn't needed as a double is always the same size. | |
Element & | makeNumber (const std::string &name, double num) |
Make this Element a Property with a double value. | |
Element & | makeNumber (const std::string &name, boost::uint8_t *data) |
Element & | makeBoolean (boost::uint8_t *data) |
Make this Element with a boolean value. The size isn't needed as a boolean is always the same size. | |
Element & | makeBoolean (bool data) |
Make this Element with a boolean value. | |
Element & | makeBoolean (const std::string &name, bool data) |
Make this Element a Property with a boolean value. | |
Element & | makeUndefined () |
Make this Element an Undefined data type. | |
Element & | makeUndefined (const std::string &name) |
Make this Element a Property with an Undefined data type. | |
Element & | makeNull () |
Make this Element an NULL Object data type. | |
Element & | makeNull (const std::string &name) |
Make this Element a Property with an NULL Object data type. | |
Element & | makeObjectEnd () |
Make this Element an Object End data type. | |
Element & | makeObject () |
Make this Element as a Object data type. This is AMF data type that supports complex objects with properties. A Reference refers to a previously sent ActionScript object to save on bandwidth. | |
Element & | makeObject (const std::string &name) |
Make this Element as an Object data type. | |
Element & | makeObject (std::vector< boost::shared_ptr< cygnal::Element > > &data) |
Make this Element as an Object data type. | |
Element & | makeObject (const std::string &name, std::vector< boost::shared_ptr< cygnal::Element > > &data) |
Make this Element a Property with an Object as the value. | |
Element & | makeXMLObject () |
Make this Element as an XML Object data type. This is like a string object, but the type is different. | |
Element & | makeXMLObject (const std::string &name) |
Make this Element a Property with an XML Object as the value. | |
Element & | makeXMLObject (const std::string &name, const std::string &data) |
Make this Element a Property with an XML Object as the value. | |
Element & | makeXMLObject (boost::uint8_t *data) |
Element & | makeECMAArray () |
Make this Element a Property with an ECMA Array as the value. This is a mixed array of any AMF types. These are stored the same as an object, but with a different type. | |
Element & | makeECMAArray (const std::string &name) |
Make this Element a Property with an ECMA Array as the value. | |
Element & | makeECMAArray (std::vector< boost::shared_ptr< cygnal::Element > > &data) |
Make this Element a Property with an ECMA Array as the value. This is a mixed array of any AMF types. These are stored the same as an object, but with a different type. | |
Element & | makeECMAArray (const std::string &name, std::vector< boost::shared_ptr< cygnal::Element > > &data) |
Make this Element a Property with an ECMA Array as the value. | |
Element & | makeStrictArray () |
Make this Element a Property with an Strict Array as the value. This is an array of a single AMF type. These are stored the same as an object, but with a different type. | |
Element & | makeStrictArray (const std::string &name) |
Make this Element a Property with an Strict Array as the value. This is an array of a single AMF type. These are stored the same as an object, but with a different type. | |
Element & | makeStrictArray (std::vector< boost::shared_ptr< cygnal::Element > > &data) |
Make this Element a Property with an ECMA Array as the value. This is an array of a single AMF type. These are stored the same as an object, but with a different type. | |
Element & | makeStrictArray (const std::string &name, std::vector< boost::shared_ptr< cygnal::Element > > &data) |
Make this Element a Property with an Strict Array as the value. | |
Element & | makeTypedObject () |
Make this Element a Property with an Typed Object as the value. | |
Element & | makeTypedObject (const std::string &name) |
Element & | makeTypedObject (boost::uint8_t *data) |
Make this Element a Property with an Typed Object as the value. | |
Element & | makeReference () |
Make this Element a Property with an Object Reference as the value. | |
Element & | makeReference (boost::uint16_t index) |
Element & | makeReference (boost::uint8_t *data, size_t size) |
Make this Element a Property with an Object Reference as the value. | |
Element & | makeMovieClip () |
Make this Element a Property with a Movie Clip (SWF data) as the value. | |
Element & | makeMovieClip (boost::uint8_t *data, size_t size) |
Make this Element a Property with a Movie Clip (SWF data) as the value. | |
Element & | makeLongString () |
Make this Element a Property with a UTF8 String as the value. | |
Element & | makeLongString (boost::uint8_t *data) |
Make this Element a Property with a UTF8 String as the value. | |
Element & | makeRecordSet () |
Make this Element a Property with a Record Set as the value. | |
Element & | makeRecordSet (boost::uint8_t *data) |
Make this Element a Property with a Record Set as the value. | |
Element & | makeDate () |
Make this Element a Property with a Date as the value. | |
Element & | makeDate (boost::uint8_t *data) |
Make this Element a Property with a Date as the value. | |
Element & | makeDate (double data) |
Element & | makeUnsupported () |
Make this Element a Property with an Unsupported value. | |
Element & | makeUnsupported (boost::uint8_t *data) |
Make this Element a Property with an Unsupported value. | |
bool | operator== (Element &) |
Test equivalance against another Element. This compares all the data and the data type in the current Element with the supplied one, so it can be a performance hit. This is primarily only used for testing purposes. | |
bool | operator== (boost::shared_ptr< cygnal::Element >) |
Test equivalance against another Element. This compares all the data and the data type in the current Element with the supplied one, so it can be a performance hit. This is primarily only used for testing purposes. | |
bool | operator== (bool x) |
Test equivalance against a boolean value This compares all the data and the data type in the current Element to see if it is a Boolean and if the values ard the same. This is primarily only used for testing purposes. | |
boost::shared_ptr < cygnal::Element > | operator[] (size_t index) |
Get the Element or Property at a specified location. | |
size_t | getDataSize () const |
Get the size in bytes of the Element's data. All data in an Element is stored in a Buffer class. | |
amf0_type_e | getType () const |
Get the data type of this Element. | |
void | setType (amf0_type_e type) |
Get the data type of this Element. | |
bool | to_bool () const |
Cast the data in this Element to a boolean value. | |
double | to_number () const |
Cast the data in this Element to a double value. | |
boost::uint16_t | to_short () const |
Cast the data in this Element to a short (2 bytes) value. | |
boost::uint32_t | to_integer () const |
Cast the data in this Element to an integer (4 bytes) value. | |
const char * | to_string () const |
Cast the data in this Element to an ASCII string value. | |
boost::uint8_t * | to_reference () |
Cast the data in this Element to an real pointer to data. | |
const boost::uint8_t * | to_reference () const |
size_t | getNameSize () const |
Get the number of bytes in the name of this Element. Only top level Objects or properties have a name. | |
char * | getName () const |
Get the name of this Element. Only top level Objects or properties have a name. | |
void | setName (const std::string &name) |
Set the name of this Element or property. Only top level Objects or properties have a name. | |
void | setName (const char *name, size_t x) |
void | setName (boost::uint8_t *name, size_t size) |
Set the name of this Element or property. Only top level Objects or properties have a name. | |
boost::shared_ptr< Element > | findProperty (const std::string &name) |
Find the named property for this Object. | |
boost::shared_ptr< Element > | getProperty (size_t index) const |
Find the property at this index for this Object. | |
void | addProperty (boost::shared_ptr< Element > el) |
Add a Property to the array of properties for this object. | |
void | clearProperties () |
boost::shared_ptr< Element > | popProperty () |
Get a smart pointer to the Element for this Property. | |
size_t | propertySize () const |
Get the count of properties for this Element. | |
boost::shared_ptr< Buffer > | encode () |
Encode this Element (data type object). This encodes this Element and all of it's associated properties into raw binary data in big endoan format. | |
boost::shared_ptr< Buffer > | encode (bool notobject) |
std::vector< boost::shared_ptr < Element > > | getProperties () const |
Get the array of properties for this Element. | |
size_t | calculateSize () |
size_t | calculateSize (cygnal::Element &el) const |
void | dump () const |
Dump the internal data of this class in a human readable form. | |
void | dump (std::ostream &os) const |
This class holds an deserialized AMF object or Property. The only difference is that a Property sets the name field, while raw AMF data does not.
cygnal::Element::Element | ( | ) |
Create a new Element with no data type.
cygnal::Element::~Element | ( | ) |
Delete this Element This deallocates all the memory used to hold the data.
cygnal::Element::Element | ( | double | indata | ) |
Construct an AMF Element from a double..
data | The double to use as the value for this Element. |
References makeNumber().
cygnal::Element::Element | ( | const std::string & | name, | |
double | num | |||
) |
Contruct a Property from a double.
name | The name of the Property | |
num | The double to use as the value of the property. |
cygnal::Element::Element | ( | const char * | indata | ) |
Contruct an AMF Element from an ASCII string.
data | The ASCII string to use as the value of the property. |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References makeString().
cygnal::Element::Element | ( | const std::string & | data | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
cygnal::Element::Element | ( | const std::string & | name, | |
const std::string & | data | |||
) |
Contruct a Property from an ASCII string.
name | The name of the Property | |
data | The ASCII string to use as the value of the property. |
cygnal::Element::Element | ( | bool | data | ) |
Contruct an AMF Element from a Boolean.
data | The boolean to use as the value for this Element. |
References makeBoolean().
cygnal::Element::Element | ( | const std::string & | name, | |
bool | data | |||
) |
Contruct a Property from a Boolean.
name | The name of the Property | |
data | The boolean to use as the value of the property. |
cygnal::Element::Element | ( | std::vector< double > & | data | ) |
cygnal::Element::Element | ( | std::vector< std::string > & | data | ) |
cygnal::Element::Element | ( | std::vector< Element > & | data | ) |
cygnal::Element::Element | ( | ) |
Create a new Element with no data type.
cygnal::Element::~Element | ( | ) |
Delete this Element This deallocates all the memory used to hold the data.
cygnal::Element::Element | ( | double | data | ) |
cygnal::Element::Element | ( | const std::string & | name, | |
double | num | |||
) |
Contruct a Property from a double.
name | The name of the Property | |
num | The double to use as the value of the property. |
cygnal::Element::Element | ( | const char * | data | ) |
cygnal::Element::Element | ( | const std::string & | data | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
cygnal::Element::Element | ( | const std::string & | name, | |
const std::string & | data | |||
) |
Contruct a Property from an ASCII string.
name | The name of the Property | |
data | The ASCII string to use as the value of the property. |
cygnal::Element::Element | ( | bool | data | ) |
cygnal::Element::Element | ( | const std::string & | name, | |
bool | data | |||
) |
Contruct a Property from a Boolean.
name | The name of the Property | |
data | The boolean to use as the value of the property. |
cygnal::Element::Element | ( | std::vector< double > & | data | ) |
cygnal::Element::Element | ( | std::vector< std::string > & | data | ) |
cygnal::Element::Element | ( | std::vector< Element > & | data | ) |
void cygnal::Element::addProperty | ( | boost::shared_ptr< Element > | el | ) | [inline] |
Add a Property to the array of properties for this object.
el | A smart pointer to the Element for this Property. |
References _properties.
Referenced by cygnal::RTMPServer::encodeResult(), and cygnal::OflaDemoTest::parseOflaDemoRequest().
void cygnal::Element::addProperty | ( | boost::shared_ptr< Element > | el | ) | [inline] |
Add a Property to the array of properties for this object.
el | A smart pointer to the Element for this Property. |
References _properties.
size_t cygnal::Element::calculateSize | ( | ) |
size_t cygnal::Element::calculateSize | ( | cygnal::Element & | el | ) | const |
size_t cygnal::Element::calculateSize | ( | ) |
size_t cygnal::Element::calculateSize | ( | cygnal::Element & | el | ) | const |
void cygnal::Element::clear | ( | ) |
Clear the contents of the buffer by setting all the bytes to zeros.
void cygnal::Element::clear | ( | ) |
Clear the contents of the buffer by setting all the bytes to zeros.
void cygnal::Element::clearProperties | ( | ) | [inline] |
References _properties.
void cygnal::Element::clearProperties | ( | ) | [inline] |
References _properties.
void cygnal::Element::dump | ( | ) | const [inline] |
Dump the internal data of this class in a human readable form.
References dump().
Referenced by gnash::RTMP::dump(), dump(), cygnal::EchoTest::formatEchoResponse(), cygnal::OflaDemoTest::formatOflaDemoResponse(), cygnal::operator<<(), and cygnal::RTMPServer::packetRead().
void cygnal::Element::dump | ( | ) | const [inline] |
void cygnal::Element::dump | ( | std::ostream & | os | ) | const |
Dump the internal data of this class in a human readable form.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References AMF3_DATA, cygnal::astype_str, BOOLEAN_AMF0, DATE_AMF0, ECMA_ARRAY_AMF0, getDataSize(), LONG_STRING_AMF0, MOVIECLIP_AMF0, NULL_AMF0, NUMBER_AMF0, OBJECT_AMF0, OBJECT_END_AMF0, RECORD_SET_AMF0, REFERENCE_AMF0, STRICT_ARRAY_AMF0, STRING_AMF0, to_bool(), to_number(), to_string(), TYPED_OBJECT_AMF0, UNDEFINED_AMF0, UNSUPPORTED_AMF0, and XML_OBJECT_AMF0.
void cygnal::Element::dump | ( | std::ostream & | os | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
boost::shared_ptr<Buffer> cygnal::Element::encode | ( | ) |
Encode this Element (data type object). This encodes this Element and all of it's associated properties into raw binary data in big endoan format.
notobject | Flag to not encode the element as an object, instead it's just a list of properties. This is used when formatting onStatus response packets. |
boost::shared_ptr<Buffer> cygnal::Element::encode | ( | bool | notobject | ) |
boost::shared_ptr< Buffer > cygnal::Element::encode | ( | ) |
Encode this Element (data type object). This encodes this Element and all of it's associated properties into raw binary data in big endoan format.
notobject | Flag to not encode the element as an object, instead it's just a list of properties. This is used when formatting onStatus response packets. |
Referenced by cygnal::RTMPServer::encodeBWDone(), gnash::RTMPClient::encodeEchoRequest(), cygnal::RTMPServer::encodeResult(), gnash::RTMPClient::encodeStreamOp(), cygnal::EchoTest::formatEchoResponse(), cygnal::FitcDemoTest::formatFitcDemoResponse(), cygnal::OflaDemoTest::formatOflaDemoResponse(), and cygnal::OflaDemoTest::parseOflaDemoRequest().
boost::shared_ptr< Buffer > cygnal::Element::encode | ( | bool | notobject | ) |
boost::shared_ptr< cygnal::Element > cygnal::Element::findProperty | ( | const std::string & | name | ) |
Find the named property for this Object.
name | An ASCII string that is the name of the property to search for. |
boost::shared_ptr<Element> cygnal::Element::findProperty | ( | const std::string & | name | ) |
Find the named property for this Object.
name | An ASCII string that is the name of the property to search for. |
size_t cygnal::Element::getDataSize | ( | ) | const |
size_t cygnal::Element::getDataSize | ( | ) | const |
Get the size in bytes of the Element's data. All data in an Element is stored in a Buffer class.
Referenced by calculateSize(), dump(), operator=(), and operator==().
char* cygnal::Element::getName | ( | ) | const [inline] |
Get the name of this Element. Only top level Objects or properties have a name.
References _name.
Referenced by gnash::RTMP::addProperty(), cygnal::EchoTest::formatEchoResponse(), cygnal::OflaDemoTest::formatOflaDemoResponse(), operator=(), and operator==().
char* cygnal::Element::getName | ( | ) | const [inline] |
size_t cygnal::Element::getNameSize | ( | ) | const |
Get the number of bytes in the name of this Element. Only top level Objects or properties have a name.
Referenced by calculateSize(), encode(), operator=(), and operator==().
size_t cygnal::Element::getNameSize | ( | ) | const |
Get the number of bytes in the name of this Element. Only top level Objects or properties have a name.
std::vector<boost::shared_ptr<Element> > cygnal::Element::getProperties | ( | ) | const [inline] |
Get the array of properties for this Element.
References _properties.
std::vector<boost::shared_ptr<Element> > cygnal::Element::getProperties | ( | ) | const [inline] |
Get the array of properties for this Element.
References _properties.
Referenced by calculateSize().
boost::shared_ptr<Element> cygnal::Element::getProperty | ( | size_t | index | ) | const [inline] |
Find the property at this index for this Object.
index | The index of the property in the array of data. |
References _properties.
boost::shared_ptr<Element> cygnal::Element::getProperty | ( | size_t | index | ) | const [inline] |
Find the property at this index for this Object.
index | The index of the property in the array of data. |
References _properties.
amf0_type_e cygnal::Element::getType | ( | ) | const [inline] |
Get the data type of this Element.
amf0_type_e cygnal::Element::getType | ( | ) | const [inline] |
Get the data type of this Element.
Referenced by calculateSize(), operator=(), and operator==().
Element & cygnal::Element::makeBoolean | ( | bool | flag | ) |
Make this Element with a boolean value.
data | A boolean to use as the value. |
References gnash::key::e.
Element& cygnal::Element::makeBoolean | ( | const std::string & | name, | |
bool | data | |||
) |
Element & cygnal::Element::makeBoolean | ( | boost::uint8_t * | data | ) |
Make this Element with a boolean value. The size isn't needed as a boolean is always the same size.
data | A real pointer to the boolean use as the value. |
Referenced by Element(), and operator=().
Element& cygnal::Element::makeBoolean | ( | boost::uint8_t * | data | ) |
Element& cygnal::Element::makeBoolean | ( | bool | data | ) |
Element& cygnal::Element::makeBoolean | ( | const std::string & | name, | |
bool | data | |||
) |
Element& cygnal::Element::makeDate | ( | ) |
Element& cygnal::Element::makeDate | ( | boost::uint8_t * | data | ) |
Element& cygnal::Element::makeDate | ( | double | data | ) |
Element & cygnal::Element::makeDate | ( | double | data | ) |
References cygnal::AMF0_NUMBER_SIZE, and gnash::key::e.
Element & cygnal::Element::makeDate | ( | boost::uint8_t * | data | ) |
Make this Element a Property with a Date as the value.
data | A real pointer to the raw data to use as the value. |
References makeNumber().
Element & cygnal::Element::makeDate | ( | ) |
Element & cygnal::Element::makeECMAArray | ( | const std::string & | name | ) |
Make this Element a Property with an ECMA Array as the value.
name | The name of the Property |
References makeECMAArray(), and setName().
Element & cygnal::Element::makeECMAArray | ( | ) |
Make this Element a Property with an ECMA Array as the value. This is a mixed array of any AMF types. These are stored the same as an object, but with a different type.
Referenced by makeECMAArray(), and cygnal::OflaDemoTest::parseOflaDemoRequest().
Element & cygnal::Element::makeECMAArray | ( | std::vector< boost::shared_ptr< cygnal::Element > > & | data | ) |
Make this Element a Property with an ECMA Array as the value. This is a mixed array of any AMF types. These are stored the same as an object, but with a different type.
data | A smart pointer to a vector of Elements to use as the vaule. |
References data, and makeObject().
Element & cygnal::Element::makeECMAArray | ( | const std::string & | name, | |
std::vector< boost::shared_ptr< cygnal::Element > > & | data | |||
) |
Make this Element a Property with an ECMA Array as the value.
name | The name of the Property | |
data | A smart pointer to a vector of Elements to use as the vaule. |
References data, and makeObject().
Element& cygnal::Element::makeECMAArray | ( | ) |
Element& cygnal::Element::makeECMAArray | ( | const std::string & | name | ) |
Element& cygnal::Element::makeECMAArray | ( | std::vector< boost::shared_ptr< cygnal::Element > > & | data | ) |
Element& cygnal::Element::makeECMAArray | ( | const std::string & | name, | |
std::vector< boost::shared_ptr< cygnal::Element > > & | data | |||
) |
Element& cygnal::Element::makeLongString | ( | ) |
Element& cygnal::Element::makeLongString | ( | boost::uint8_t * | data | ) |
Element & cygnal::Element::makeLongString | ( | boost::uint8_t * | indata | ) |
Element & cygnal::Element::makeLongString | ( | ) |
Element& cygnal::Element::makeMovieClip | ( | ) |
Element& cygnal::Element::makeMovieClip | ( | boost::uint8_t * | data, | |
size_t | size | |||
) |
Element & cygnal::Element::makeMovieClip | ( | ) |
Element & cygnal::Element::makeMovieClip | ( | boost::uint8_t * | indata, | |
size_t | size | |||
) |
Element & cygnal::Element::makeNull | ( | ) |
Make this Element an NULL Object data type.
Make this Element an NULL Object data type A NULL AMF0 Object consists of a single byte, which is the type.
Referenced by cygnal::RTMPServer::encodeBWDone(), gnash::RTMPClient::encodeStreamOp(), cygnal::EchoTest::formatEchoResponse(), cygnal::FitcDemoTest::formatFitcDemoResponse(), cygnal::OflaDemoTest::formatOflaDemoResponse(), makeNull(), and cygnal::OflaDemoTest::parseOflaDemoRequest().
Element & cygnal::Element::makeNull | ( | const std::string & | name | ) |
Make this Element a Property with an NULL Object data type.
name | The name of the Property |
References makeNull(), and setName().
Element& cygnal::Element::makeNull | ( | ) |
Element& cygnal::Element::makeNull | ( | const std::string & | name | ) |
Element& cygnal::Element::makeNullString | ( | ) |
Element & cygnal::Element::makeNullString | ( | ) |
Make this Element be a NULL String type. A Null String is a string with a length of zero.
Make this Element be a NULL String type. A Null String is a string with a length of zero. The data is only one byte, which always has the value of zero of course.
References gnash::key::e.
Element & cygnal::Element::makeNumber | ( | double | num | ) |
Make this Element with a double value.
str | The double to use as the value. |
References cygnal::AMF0_NUMBER_SIZE, and gnash::key::e.
Referenced by Element(), cygnal::RTMPServer::encodeBWDone(), cygnal::RTMPServer::encodeResult(), gnash::RTMPClient::encodeStreamOp(), cygnal::EchoTest::formatEchoResponse(), cygnal::FitcDemoTest::formatFitcDemoResponse(), cygnal::OflaDemoTest::formatOflaDemoResponse(), makeDate(), makeNumber(), operator=(), and cygnal::OflaDemoTest::parseOflaDemoRequest().
Element & cygnal::Element::makeNumber | ( | boost::shared_ptr< cygnal::Buffer > | buf | ) |
Make this Element with a double value.
buf | A smart pointer to a Buffer class. |
References makeNumber().
Element& cygnal::Element::makeNumber | ( | double | num | ) |
Element& cygnal::Element::makeNumber | ( | boost::shared_ptr< cygnal::Buffer > | buf | ) |
Element& cygnal::Element::makeNumber | ( | boost::uint8_t * | data | ) |
Element& cygnal::Element::makeNumber | ( | const std::string & | name, | |
double | num | |||
) |
Make this Element a Property with a double value.
name | The name of the Property | |
num | The double to use as the value of the property. |
Element& cygnal::Element::makeNumber | ( | const std::string & | name, | |
boost::uint8_t * | data | |||
) |
Element & cygnal::Element::makeNumber | ( | boost::uint8_t * | data | ) |
Make this Element with a double value. The size isn't needed as a double is always the same size.
str | The double to use as the value. |
References cygnal::AMF0_NUMBER_SIZE, and gnash::key::e.
cygnal::Element::makeNumber | ( | const std::string & | name, | |
boost::uint8_t * | data | |||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
The size isn't needed as a double is always the same size.
References cygnal::AMF0_NUMBER_SIZE, gnash::key::e, and setName().
Element& cygnal::Element::makeNumber | ( | const std::string & | name, | |
double | num | |||
) |
Make this Element a Property with a double value.
name | The name of the Property | |
num | The double to use as the value of the property. |
Element& cygnal::Element::makeObject | ( | const std::string & | name, | |
std::vector< boost::shared_ptr< cygnal::Element > > & | data | |||
) |
Element & cygnal::Element::makeObject | ( | ) |
Make this Element as a Object data type. This is AMF data type that supports complex objects with properties. A Reference refers to a previously sent ActionScript object to save on bandwidth.
data | A smart pointer to an Element to use as the value. |
Referenced by cygnal::RTMPServer::encodeResult(), makeECMAArray(), makeObject(), and makeStrictArray().
Element & cygnal::Element::makeObject | ( | const std::string & | name | ) |
Make this Element as an Object data type.
name | The name of this object. This is not the same as the name of a property. |
References makeObject(), and setName().
Element& cygnal::Element::makeObject | ( | std::vector< boost::shared_ptr< cygnal::Element > > & | data | ) |
Element& cygnal::Element::makeObject | ( | const std::string & | name, | |
std::vector< boost::shared_ptr< cygnal::Element > > & | data | |||
) |
Element& cygnal::Element::makeObject | ( | ) |
Element& cygnal::Element::makeObject | ( | const std::string & | name | ) |
Element& cygnal::Element::makeObject | ( | std::vector< boost::shared_ptr< cygnal::Element > > & | data | ) |
Element & cygnal::Element::makeObjectEnd | ( | ) |
Element& cygnal::Element::makeObjectEnd | ( | ) |
Element& cygnal::Element::makeRecordSet | ( | ) |
Element & cygnal::Element::makeRecordSet | ( | ) |
Element & cygnal::Element::makeRecordSet | ( | boost::uint8_t * | data | ) |
Element& cygnal::Element::makeRecordSet | ( | boost::uint8_t * | data | ) |
Element& cygnal::Element::makeReference | ( | ) |
Element& cygnal::Element::makeReference | ( | boost::uint16_t | index | ) |
Element& cygnal::Element::makeReference | ( | boost::uint8_t * | data, | |
size_t | size | |||
) |
Element & cygnal::Element::makeReference | ( | ) |
Make this Element a Property with an Object Reference as the value.
Referenced by makeReference().
Element & cygnal::Element::makeReference | ( | boost::uint16_t | index | ) |
References makeReference().
Element & cygnal::Element::makeReference | ( | boost::uint8_t * | indata, | |
size_t | size | |||
) |
Make this Element a Property with an Object Reference as the value.
data | A real pointer to the raw data to use as the value. | |
size | The number of bytes to use as the value. |
References gnash::key::e.
Element& cygnal::Element::makeStrictArray | ( | const std::string & | name | ) |
Element & cygnal::Element::makeStrictArray | ( | ) |
Make this Element a Property with an Strict Array as the value. This is an array of a single AMF type. These are stored the same as an object, but with a different type.
Referenced by makeStrictArray().
Element & cygnal::Element::makeStrictArray | ( | const std::string & | name | ) |
Make this Element a Property with an Strict Array as the value. This is an array of a single AMF type. These are stored the same as an object, but with a different type.
name | The name of the Property |
References makeStrictArray(), and setName().
Element & cygnal::Element::makeStrictArray | ( | std::vector< boost::shared_ptr< cygnal::Element > > & | data | ) |
Make this Element a Property with an ECMA Array as the value. This is an array of a single AMF type. These are stored the same as an object, but with a different type.
data | A smart pointer to a vector of Elements to use as the vaule. |
References data, and makeObject().
Element & cygnal::Element::makeStrictArray | ( | const std::string & | name, | |
std::vector< boost::shared_ptr< cygnal::Element > > & | data | |||
) |
Make this Element a Property with an Strict Array as the value.
name | The name of the Property | |
data | A smart pointer to a vector of Elements to use as the vaule. |
References data, and makeObject().
Element& cygnal::Element::makeStrictArray | ( | const std::string & | name, | |
std::vector< boost::shared_ptr< cygnal::Element > > & | data | |||
) |
Element& cygnal::Element::makeStrictArray | ( | ) |
Element& cygnal::Element::makeStrictArray | ( | std::vector< boost::shared_ptr< cygnal::Element > > & | data | ) |
Element& cygnal::Element::makeString | ( | const std::string & | data | ) |
Element & cygnal::Element::makeString | ( | boost::uint8_t * | data, | |
size_t | size | |||
) |
Make this Element with an ASCII string value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
data | The ASCII string to use as the value. | |
size | The number of bytes in the ASCII string. |
References gnash::key::e.
Element& cygnal::Element::makeString | ( | const std::string & | name, | |
const std::string & | str | |||
) |
Element& cygnal::Element::makeString | ( | const char * | str, | |
size_t | size | |||
) |
Element& cygnal::Element::makeString | ( | boost::uint8_t * | data, | |
size_t | size | |||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Element& cygnal::Element::makeString | ( | const std::string & | data | ) |
Element& cygnal::Element::makeString | ( | const std::string & | name, | |
const std::string & | str | |||
) |
Element & cygnal::Element::makeString | ( | const char * | str, | |
size_t | size | |||
) |
Make this Element with an ASCII string value.
str | The ASCII string to use as the value. | |
size | The number of bytes in the ASCII string. |
Referenced by Element(), cygnal::RTMPServer::encodeBWDone(), cygnal::RTMPServer::encodeResult(), gnash::RTMPClient::encodeStreamOp(), cygnal::EchoTest::formatEchoResponse(), cygnal::FitcDemoTest::formatFitcDemoResponse(), cygnal::OflaDemoTest::formatOflaDemoResponse(), and cygnal::OflaDemoTest::parseOflaDemoRequest().
Element& cygnal::Element::makeTypedObject | ( | const std::string & | name | ) |
Element& cygnal::Element::makeTypedObject | ( | ) |
Element& cygnal::Element::makeTypedObject | ( | boost::uint8_t * | data | ) |
Element & cygnal::Element::makeTypedObject | ( | const std::string & | name | ) |
Element & cygnal::Element::makeTypedObject | ( | boost::uint8_t * | data | ) |
Element & cygnal::Element::makeTypedObject | ( | ) |
Element & cygnal::Element::makeUndefined | ( | ) |
Make this Element an Undefined data type.
Referenced by makeUndefined().
Element & cygnal::Element::makeUndefined | ( | const std::string & | name | ) |
Make this Element a Property with an Undefined data type.
name | The name of the Property |
References makeUndefined(), and setName().
Element& cygnal::Element::makeUndefined | ( | ) |
Element& cygnal::Element::makeUndefined | ( | const std::string & | name | ) |
Element & cygnal::Element::makeUnsupported | ( | boost::uint8_t * | data | ) |
Element& cygnal::Element::makeUnsupported | ( | ) |
Element& cygnal::Element::makeUnsupported | ( | boost::uint8_t * | data | ) |
Element & cygnal::Element::makeUnsupported | ( | ) |
Element & cygnal::Element::makeXMLObject | ( | boost::uint8_t * | data | ) |
Element& cygnal::Element::makeXMLObject | ( | const std::string & | name, | |
const std::string & | data | |||
) |
Element& cygnal::Element::makeXMLObject | ( | const std::string & | name | ) |
Element & cygnal::Element::makeXMLObject | ( | ) |
Element& cygnal::Element::makeXMLObject | ( | const std::string & | name | ) |
Element& cygnal::Element::makeXMLObject | ( | ) |
Element& cygnal::Element::makeXMLObject | ( | const std::string & | name, | |
const std::string & | data | |||
) |
Element& cygnal::Element::makeXMLObject | ( | boost::uint8_t * | data | ) |
Element& cygnal::Element::operator= | ( | bool | flag | ) |
Element& cygnal::Element::operator= | ( | double | num | ) |
Make this Element be the same as another Element.
el | A reference to an Element class. |
References getDataSize(), getName(), getNameSize(), getType(), setName(), and to_reference().
Element & cygnal::Element::operator= | ( | bool | flag | ) |
Make this Element be the same as a boolean value. This sets both the data type and the value.
el | A boolean value. |
References makeBoolean().
Element& cygnal::Element::operator= | ( | const std::string & | str | ) |
Element & cygnal::Element::operator= | ( | double | num | ) |
Make this Element be the same as a double. This sets both the data type and the value.
el | A double value. |
References makeNumber().
Element& cygnal::Element::operator= | ( | const std::string & | str | ) |
bool cygnal::Element::operator== | ( | Element & | ) |
Test equivalance against another Element. This compares all the data and the data type in the current Element with the supplied one, so it can be a performance hit. This is primarily only used for testing purposes.
buf | A reference to an Element. |
bool cygnal::Element::operator== | ( | bool | x | ) |
Test equivalance against a boolean value This compares all the data and the data type in the current Element to see if it is a Boolean and if the values ard the same. This is primarily only used for testing purposes.
buf | A boolean value |
bool cygnal::Element::operator== | ( | bool | x | ) |
Test equivalance against a boolean value This compares all the data and the data type in the current Element to see if it is a Boolean and if the values ard the same. This is primarily only used for testing purposes.
buf | A boolean value |
bool cygnal::Element::operator== | ( | boost::shared_ptr< cygnal::Element > | ) |
Test equivalance against another Element. This compares all the data and the data type in the current Element with the supplied one, so it can be a performance hit. This is primarily only used for testing purposes.
buf | A smart pointer to an Element. |
bool cygnal::Element::operator== | ( | boost::shared_ptr< cygnal::Element > | ) |
Test equivalance against another Element. This compares all the data and the data type in the current Element with the supplied one, so it can be a performance hit. This is primarily only used for testing purposes.
buf | A smart pointer to an Element. |
bool cygnal::Element::operator== | ( | Element & | el | ) |
Test equivalance against another Element. This compares all the data and the data type in the current Element with the supplied one, so it can be a performance hit. This is primarily only used for testing purposes.
buf | A reference to an Element. |
References getDataSize(), getName(), getNameSize(), getType(), propertySize(), and to_reference().
boost::shared_ptr<cygnal::Element> cygnal::Element::operator[] | ( | size_t | index | ) |
boost::shared_ptr< Element > cygnal::Element::operator[] | ( | size_t | index | ) |
boost::shared_ptr<Element> cygnal::Element::popProperty | ( | ) | [inline] |
Get a smart pointer to the Element for this Property.
References _properties.
boost::shared_ptr<Element> cygnal::Element::popProperty | ( | ) | [inline] |
Get a smart pointer to the Element for this Property.
References _properties.
size_t cygnal::Element::propertySize | ( | ) | const [inline] |
Get the count of properties for this Element.
References _properties.
Referenced by operator==().
size_t cygnal::Element::propertySize | ( | ) | const [inline] |
Get the count of properties for this Element.
References _properties.
void cygnal::Element::setName | ( | const std::string & | name | ) |
void cygnal::Element::setName | ( | const char * | name, | |
size_t | size | |||
) |
Set the name of this Element or property. Only top level Objects or properties have a name.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
name | A real pointer to the raw bytes to use as the name for this Element. | |
size | The number of bytes to use for the name. |
References setName().
void cygnal::Element::setName | ( | boost::uint8_t * | name, | |
size_t | size | |||
) |
Set the name of this Element or property. Only top level Objects or properties have a name.
name | A real pointer to the raw bytes to use as the name for this Element. | |
size | The number of bytes to use for the name. |
void cygnal::Element::setName | ( | boost::uint8_t * | name, | |
size_t | size | |||
) |
Set the name of this Element or property. Only top level Objects or properties have a name.
name | A real pointer to the raw bytes to use as the name for this Element. | |
size | The number of bytes to use for the name. |
name | A real pointer to the raw bytes to use as the name for this Element. | |
size | The number of bytes to use for the name. |
void cygnal::Element::setName | ( | const std::string & | name | ) |
Set the name of this Element or property. Only top level Objects or properties have a name.
str | the name to use for this Element. |
Referenced by makeECMAArray(), makeNull(), makeNumber(), makeObject(), makeStrictArray(), makeTypedObject(), makeUndefined(), operator=(), and setName().
void cygnal::Element::setName | ( | const char * | name, | |
size_t | x | |||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void cygnal::Element::setType | ( | amf0_type_e | type | ) | [inline] |
Get the data type of this Element.
type | The data type to use as the value. |
void cygnal::Element::setType | ( | amf0_type_e | type | ) | [inline] |
Get the data type of this Element.
type | The data type to use as the value. |
bool cygnal::Element::to_bool | ( | ) | const |
bool cygnal::Element::to_bool | ( | ) | const |
Cast the data in this Element to a boolean value.
boost::uint32_t cygnal::Element::to_integer | ( | ) | const |
Cast the data in this Element to an integer (4 bytes) value.
boost::uint32_t cygnal::Element::to_integer | ( | ) | const |
double cygnal::Element::to_number | ( | ) | const |
double cygnal::Element::to_number | ( | ) | const |
Cast the data in this Element to a double value.
const boost::uint8_t * cygnal::Element::to_reference | ( | ) | const |
boost::uint8_t* cygnal::Element::to_reference | ( | ) |
Cast the data in this Element to an real pointer to data.
boost::uint8_t * cygnal::Element::to_reference | ( | ) |
Cast the data in this Element to an real pointer to data.
Referenced by operator=(), and operator==().
const boost::uint8_t* cygnal::Element::to_reference | ( | ) | const |
boost::uint16_t cygnal::Element::to_short | ( | ) | const |
Cast the data in this Element to a short (2 bytes) value.
boost::uint16_t cygnal::Element::to_short | ( | ) | const |
const char* cygnal::Element::to_string | ( | ) | const |
Cast the data in this Element to an ASCII string value.
const char * cygnal::Element::to_string | ( | ) | const |