Tide 0.1.0
|
Binary primitive element. More...
#include <tide/binary_element.h>
Public Member Functions | |
BinaryElement (uint32_t id, std::vector< char > value) | |
Create a new binary element with no default. | |
BinaryElement (uint32_t id, std::vector< char > value, std::vector< char > default_value) | |
Create a new binary element with a default value. | |
virtual BinaryElement & | operator= (std::vector< char > const &rhs) |
Value assignment operator. | |
Protected Member Functions | |
virtual std::streamsize | body_size () const |
Get the size of the body of this element. | |
virtual std::streamsize | read_body (std::istream &input, std::streamsize size) |
Element body loading. | |
virtual std::streamsize | write_body (std::ostream &output) |
Element body writing. |
Binary primitive element.
This element stores a block of opaque binary data.
Definition at line 46 of file binary_element.h.
tide::BinaryElement::BinaryElement | ( | uint32_t | id, |
std::vector< char > | value | ||
) |
Create a new binary element with no default.
[in] | id | The element's ID, as an unsigned integer up to 28 bits. |
[in] | value | The element's value. |
tide::BinaryElement::BinaryElement | ( | uint32_t | id, |
std::vector< char > | value, | ||
std::vector< char > | default_value | ||
) |
Create a new binary element with a default value.
[in] | id | The element's ID, as an unsigned integer up to 28 bits. |
[in] | value | The element's value. |
[in] | default_value | The default value of the element. |
virtual std::streamsize tide::BinaryElement::body_size | ( | ) | const [protected, virtual] |
Get the size of the body of this element.
Implements tide::Element.
virtual BinaryElement& tide::BinaryElement::operator= | ( | std::vector< char > const & | rhs | ) | [virtual] |
Value assignment operator.
Reimplemented from tide::PrimitiveElement< std::vector< char > >.
virtual std::streamsize tide::BinaryElement::read_body | ( | std::istream & | input, |
std::streamsize | size | ||
) | [protected, virtual] |
Element body loading.
Implements tide::Element.
virtual std::streamsize tide::BinaryElement::write_body | ( | std::ostream & | output | ) | [protected, virtual] |
Element body writing.
Implements tide::Element.