Tawara
0.1.0
|
The data of an attached file. More...
#include <tawara/attachments.h>
Public Types | |
typedef boost::shared_ptr < FileData > | Ptr |
Type of a pointer to a FileData instance. More... | |
typedef boost::shared_ptr < FileData const > | ConstPtr |
Type of a pointer to a const FileData instance. More... | |
Public Member Functions | |
FileData (std::vector< char > data) | |
Constructor. More... | |
![]() | |
BinaryElement (uint32_t id, std::vector< char > value) | |
Create a new binary element with no default. More... | |
BinaryElement (uint32_t id, std::vector< char > value, std::vector< char > default_value) | |
Create a new binary element with a default value. More... | |
virtual BinaryElement & | operator= (std::vector< char > const &rhs) |
Value assignment operator. More... | |
![]() | |
PrimitiveElement (uint32_t id, std::vector< char >value) | |
Create a new element with no default. More... | |
PrimitiveElement (uint32_t id, std::vector< char >value, std::vector< char >default_value) | |
Create a signed integer element with a default value. More... | |
virtual uint32_t | id () const |
Get the element's ID. More... | |
virtual void | id (uint32_t id) |
Set the element's ID. More... | |
virtual std::vector< char > | value () const |
Get the value. More... | |
virtual void | value (std::vector< char >value) |
Set the value. More... | |
operator std::vector< char > () const | |
Cast to the stored type. More... | |
virtual bool | has_default () const |
Check if a default value is set. More... | |
virtual std::vector< char > | get_default () const |
Get the default value. More... | |
virtual void | set_default (std::vector< char >default_value) |
Set the default value. More... | |
virtual std::vector< char > | remove_default () |
Remove the default value. More... | |
virtual bool | is_default () const |
Check if this element is at the default value. More... | |
![]() | |
Element (tawara::ids::ID id) | |
Create a new Element. More... | |
virtual | ~Element () |
Destructor. More... | |
uint32_t | id () const |
Get the element's ID. More... | |
std::streampos | offset () const |
Get the element's offset in the byte stream. More... | |
virtual std::streamsize | size () const |
Get the total size of the element. More... | |
virtual std::streamsize | write (std::ostream &output) |
Element writing. More... | |
virtual std::streamsize | read (std::istream &input) |
Element reading. More... | |
Additional Inherited Members | |
![]() | |
virtual std::streamsize | body_size () const |
Get the size of the body of this element. More... | |
virtual std::streamsize | read_body (std::istream &input, std::streamsize size) |
Element body loading. More... | |
virtual std::streamsize | write_body (std::ostream &output) |
Element body writing. More... | |
![]() | |
virtual bool | equal_ (PrimitiveElement< std::vector< char > > const &rhs) |
![]() | |
std::streamsize | write_id (std::ostream &output) |
Element ID writing. More... | |
virtual std::streamsize | write_size (std::ostream &output) |
Element size writing. More... | |
![]() | |
std::vector< char > | value_ |
std::vector< char > | default_ |
bool | has_default_ |
![]() | |
tawara::ids::ID | id_ |
std::streampos | offset_ |
The data of an attached file.
The data in a single attachment is stored as a binary blob, using an EBML binary element.
Definition at line 60 of file attachments.h.
typedef boost::shared_ptr<FileData const> tawara::FileData::ConstPtr |
Type of a pointer to a const FileData instance.
Definition at line 72 of file attachments.h.
typedef boost::shared_ptr<FileData> tawara::FileData::Ptr |
Type of a pointer to a FileData instance.
Definition at line 70 of file attachments.h.
|
inline |
Constructor.
Definition at line 64 of file attachments.h.