Tawara
0.1.0
|
The Attachments element stores opaque data attached to a segment. More...
#include <tawara/attachments.h>
Public Types | |
typedef std::vector < AttachedFile >::value_type | value_type |
The value type of this container. More... | |
typedef std::vector < AttachedFile >::size_type | size_type |
The size type of this container. More... | |
typedef std::vector < AttachedFile >::reference | reference |
The reference type. More... | |
typedef std::vector < AttachedFile > ::const_reference | const_reference |
The constant reference type. More... | |
typedef std::vector < AttachedFile >::iterator | iterator |
The random access iterator type. More... | |
typedef std::vector < AttachedFile > ::const_iterator | const_iterator |
The constant random access iterator type. More... | |
typedef std::vector < AttachedFile > ::reverse_iterator | reverse_iterator |
The reversed random access iterator type. More... | |
typedef std::vector < AttachedFile > ::const_reverse_iterator | const_reverse_iterator |
The constant reversed random access iterator type. More... | |
Public Member Functions | |
Attachments () | |
Constructor. More... | |
virtual value_type & | at (size_type pos) |
Get the attachment at the given position, with bounds checking. More... | |
virtual value_type const & | at (size_type pos) const |
Get the attachment at the given position, with bounds checking. More... | |
virtual value_type & | operator[] (size_type pos) |
Get a reference to an attachment. More... | |
virtual value_type const & | operator[] (size_type pos) const |
Get a reference to an attachment. More... | |
virtual iterator | begin () |
Get an iterator to the first attachment. More... | |
virtual const_iterator | begin () const |
Get an iterator to the first attachment. More... | |
virtual iterator | end () |
Get an iterator to the position past the last attachment. More... | |
virtual const_iterator | end () const |
Get an iterator to the position past the last attachment. More... | |
virtual reverse_iterator | rbegin () |
Get a reverse iterator to the last attachment. More... | |
virtual const_reverse_iterator | rbegin () const |
Get a reverse iterator to the last attachment. More... | |
virtual reverse_iterator | rend () |
Get a reverse iterator to the position before the first attachment. More... | |
virtual const_reverse_iterator | rend () const |
Get a reverse iterator to the position before the first attachment. More... | |
virtual bool | empty () const |
Check if there are no attachments. More... | |
virtual size_type | count () const |
Get the number of attachments. More... | |
virtual size_type | max_count () const |
Get the maximum number of attachments. More... | |
virtual void | clear () |
Remove all attachments. More... | |
virtual void | erase (iterator position) |
Erase the attachment at the specified iterator. More... | |
virtual void | erase (iterator first, iterator last) |
Erase a range of attachments. More... | |
virtual void | push_back (value_type const &value) |
Add an attachment. More... | |
virtual void | resize (size_type count) |
Resizes the attachments storage. More... | |
virtual void | swap (Attachments &other) |
Swaps the contents of this Attachments element with another. More... | |
![]() | |
MasterElement (uint32_t id, bool crc=false) | |
Create a new MasterElement. More... | |
virtual | ~MasterElement () |
Destructor. 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... | |
Protected Member Functions | |
virtual std::streamsize | body_size () const |
Get the size of the body of this element. More... | |
virtual std::streamsize | write_body (std::ostream &output) |
Element body writing. More... | |
virtual std::streamsize | read_body (std::istream &input, std::streamsize size) |
Element body loading. More... | |
![]() | |
std::streamsize | write_id (std::ostream &output) |
Element ID writing. More... | |
virtual std::streamsize | write_size (std::ostream &output) |
Element size writing. More... | |
Protected Attributes | |
std::vector< AttachedFile > | files_ |
![]() | |
tawara::ids::ID | id_ |
std::streampos | offset_ |
Friends | |
bool | operator== (Attachments const &lhs, Attachments const &rhs) |
Equality operator. More... | |
The Attachments element stores opaque data attached to a segment.
The Attachments element is used to store binary blobs that are attached to the segment. An attachment may contain any data at all. Because attachments can be linked to specific tracks, they are sometimes used for storing such things as the definition file (e.g. an IDL file) of the data type stored in the track, or a binary library containing a decoder for the track's codec.
Definition at line 185 of file attachments.h.
typedef std::vector<AttachedFile>::const_iterator tawara::Attachments::const_iterator |
The constant random access iterator type.
Definition at line 200 of file attachments.h.
typedef std::vector<AttachedFile>::const_reference tawara::Attachments::const_reference |
The constant reference type.
Definition at line 196 of file attachments.h.
typedef std::vector<AttachedFile>::const_reverse_iterator tawara::Attachments::const_reverse_iterator |
The constant reversed random access iterator type.
Definition at line 205 of file attachments.h.
typedef std::vector<AttachedFile>::iterator tawara::Attachments::iterator |
The random access iterator type.
Definition at line 198 of file attachments.h.
typedef std::vector<AttachedFile>::reference tawara::Attachments::reference |
The reference type.
Definition at line 194 of file attachments.h.
typedef std::vector<AttachedFile>::reverse_iterator tawara::Attachments::reverse_iterator |
The reversed random access iterator type.
Definition at line 202 of file attachments.h.
typedef std::vector<AttachedFile>::size_type tawara::Attachments::size_type |
The size type of this container.
Definition at line 192 of file attachments.h.
typedef std::vector<AttachedFile>::value_type tawara::Attachments::value_type |
The value type of this container.
Definition at line 190 of file attachments.h.
tawara::Attachments::Attachments | ( | ) |
Constructor.
|
inlinevirtual |
Get the attachment at the given position, with bounds checking.
std::out_of_range | if the position is invalid. |
Definition at line 216 of file attachments.h.
|
inlinevirtual |
Get the attachment at the given position, with bounds checking.
std::out_of_range | if the position is invalid. |
Definition at line 224 of file attachments.h.
|
inlinevirtual |
Get an iterator to the first attachment.
Definition at line 245 of file attachments.h.
|
inlinevirtual |
Get an iterator to the first attachment.
Definition at line 247 of file attachments.h.
|
protectedvirtual |
Get the size of the body of this element.
Implements tawara::Element.
|
inlinevirtual |
Remove all attachments.
Definition at line 278 of file attachments.h.
|
inlinevirtual |
Get the number of attachments.
Definition at line 273 of file attachments.h.
|
inlinevirtual |
Check if there are no attachments.
An empty Attachments element may not occur in a Tawara file. If this returns true, an error will occur when write() is called.
Definition at line 271 of file attachments.h.
|
inlinevirtual |
Get an iterator to the position past the last attachment.
Definition at line 249 of file attachments.h.
|
inlinevirtual |
Get an iterator to the position past the last attachment.
Definition at line 251 of file attachments.h.
|
inlinevirtual |
Erase the attachment at the specified iterator.
[in] | position | The position to erase at. |
Definition at line 284 of file attachments.h.
Erase a range of attachments.
[in] | first | The start of the range. |
[in] | last | The end of the range. |
Definition at line 290 of file attachments.h.
|
inlinevirtual |
Get the maximum number of attachments.
Definition at line 275 of file attachments.h.
|
inlinevirtual |
Get a reference to an attachment.
No bounds checking is performed.
Definition at line 233 of file attachments.h.
|
inlinevirtual |
Get a reference to an attachment.
No bounds checking is performed.
Definition at line 241 of file attachments.h.
|
inlinevirtual |
Add an attachment.
Definition at line 294 of file attachments.h.
|
inlinevirtual |
Get a reverse iterator to the last attachment.
Definition at line 253 of file attachments.h.
|
inlinevirtual |
Get a reverse iterator to the last attachment.
Definition at line 255 of file attachments.h.
|
protectedvirtual |
Element body loading.
Implements tawara::Element.
|
inlinevirtual |
Get a reverse iterator to the position before the first attachment.
Definition at line 260 of file attachments.h.
|
inlinevirtual |
Get a reverse iterator to the position before the first attachment.
Definition at line 264 of file attachments.h.
|
inlinevirtual |
Resizes the attachments storage.
Definition at line 298 of file attachments.h.
|
inlinevirtual |
Swaps the contents of this Attachments element with another.
[in] | other | The other Attachments element |
Definition at line 305 of file attachments.h.
|
protectedvirtual |
Element body writing.
Implements tawara::Element.
|
friend |
Equality operator.
|
protected |
Definition at line 312 of file attachments.h.