Tawara
0.1.0
|
This element is used to specify reference blocks. More...
#include <tawara/block_additions.h>
Public Types | |
typedef std::pair< uint64_t, std::vector< char > > | Addition |
The type of a single block addition of data. More... | |
typedef boost::shared_ptr < Addition > | AdditionPtr |
A pointer to an addition. More... | |
typedef std::vector < AdditionPtr >::value_type | value_type |
The value type of this container. More... | |
typedef std::vector < AdditionPtr >::size_type | size_type |
The size type of this container. More... | |
typedef std::vector < AdditionPtr >::reference | reference |
The reference type. More... | |
typedef std::vector < AdditionPtr > ::const_reference | const_reference |
The constant reference type. More... | |
typedef std::vector < AdditionPtr >::iterator | iterator |
The random access iterator type. More... | |
typedef std::vector < AdditionPtr > ::const_iterator | const_iterator |
The constant random access iterator type. More... | |
typedef std::vector < AdditionPtr > ::reverse_iterator | reverse_iterator |
The reversed random access iterator type. More... | |
typedef std::vector < AdditionPtr > ::const_reverse_iterator | const_reverse_iterator |
The constant reversed random access iterator type. More... | |
Public Member Functions | |
BlockAdditions () | |
Constructor. More... | |
value_type & | at (size_type pos) |
Get the addition at the given position, with bounds checking. More... | |
value_type const & | at (size_type pos) const |
Get the addition at the given position, with bounds checking. More... | |
value_type & | operator[] (size_type pos) |
Get a reference to an addition. More... | |
value_type const & | operator[] (size_type pos) const |
Get a reference to an addition. More... | |
iterator | begin () |
Get an iterator to the first addition. More... | |
const_iterator | begin () const |
Get an iterator to the first addition. More... | |
iterator | end () |
Get an iterator to the position past the last addition. More... | |
const_iterator | end () const |
Get an iterator to the position past the last addition. More... | |
reverse_iterator | rbegin () |
Get a reverse iterator to the last addition. More... | |
const_reverse_iterator | rbegin () const |
Get a reverse iterator to the last addition. More... | |
reverse_iterator | rend () |
Get a reverse iterator to the position before the first addition. More... | |
const_reverse_iterator | rend () const |
Get a reverse iterator to the position before the first addition. More... | |
bool | empty () const |
Check if there are no additions. More... | |
size_type | count () const |
Get the number of additions. More... | |
size_type | max_count () const |
Get the maximum number of additions. More... | |
void | clear () |
Remove all additions. More... | |
void | erase (iterator position) |
Erase the addition at the specified iterator. More... | |
void | erase (iterator first, iterator last) |
Erase a range of additions. More... | |
void | push_back (value_type const &value) |
Add an addition to this block. More... | |
void | resize (size_type count) |
Resizes the additions storage. More... | |
void | swap (BlockAdditions &other) |
Swaps the contents of this BlockAdditions 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 | read_addition (std::istream &input, std::streamsize size) |
Loading BlockMore elements. 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< AdditionPtr > | additions_ |
![]() | |
tawara::ids::ID | id_ |
std::streampos | offset_ |
Friends | |
bool | operator== (BlockAdditions const &lhs, BlockAdditions const &rhs) |
Equality operator. More... | |
This element is used to specify reference blocks.
When decoding a block requires data from other blocks, their IDs are listed using this element. It also contains private codec data that can be used in combination with the other blocks and the owning block.
Definition at line 60 of file block_additions.h.
typedef std::pair<uint64_t, std::vector<char> > tawara::BlockAdditions::Addition |
The type of a single block addition of data.
Definition at line 65 of file block_additions.h.
typedef boost::shared_ptr<Addition> tawara::BlockAdditions::AdditionPtr |
A pointer to an addition.
Definition at line 67 of file block_additions.h.
typedef std::vector<AdditionPtr>::const_iterator tawara::BlockAdditions::const_iterator |
The constant random access iterator type.
Definition at line 79 of file block_additions.h.
typedef std::vector<AdditionPtr>::const_reference tawara::BlockAdditions::const_reference |
The constant reference type.
Definition at line 75 of file block_additions.h.
typedef std::vector<AdditionPtr>::const_reverse_iterator tawara::BlockAdditions::const_reverse_iterator |
The constant reversed random access iterator type.
Definition at line 84 of file block_additions.h.
typedef std::vector<AdditionPtr>::iterator tawara::BlockAdditions::iterator |
The random access iterator type.
Definition at line 77 of file block_additions.h.
typedef std::vector<AdditionPtr>::reference tawara::BlockAdditions::reference |
The reference type.
Definition at line 73 of file block_additions.h.
typedef std::vector<AdditionPtr>::reverse_iterator tawara::BlockAdditions::reverse_iterator |
The reversed random access iterator type.
Definition at line 81 of file block_additions.h.
typedef std::vector<AdditionPtr>::size_type tawara::BlockAdditions::size_type |
The size type of this container.
Definition at line 71 of file block_additions.h.
typedef std::vector<AdditionPtr>::value_type tawara::BlockAdditions::value_type |
The value type of this container.
Definition at line 69 of file block_additions.h.
tawara::BlockAdditions::BlockAdditions | ( | ) |
Constructor.
|
inline |
Get the addition at the given position, with bounds checking.
Definition at line 92 of file block_additions.h.
|
inline |
Get the addition at the given position, with bounds checking.
Definition at line 97 of file block_additions.h.
|
inline |
Get an iterator to the first addition.
Definition at line 112 of file block_additions.h.
|
inline |
Get an iterator to the first addition.
Definition at line 114 of file block_additions.h.
|
protectedvirtual |
Get the size of the body of this element.
Implements tawara::Element.
|
inline |
Remove all additions.
Definition at line 141 of file block_additions.h.
|
inline |
Get the number of additions.
Definition at line 136 of file block_additions.h.
|
inline |
Check if there are no additions.
Definition at line 134 of file block_additions.h.
|
inline |
Get an iterator to the position past the last addition.
Definition at line 116 of file block_additions.h.
|
inline |
Get an iterator to the position past the last addition.
Definition at line 118 of file block_additions.h.
|
inline |
Erase the addition at the specified iterator.
Definition at line 144 of file block_additions.h.
Erase a range of additions.
Definition at line 147 of file block_additions.h.
|
inline |
Get the maximum number of additions.
Definition at line 138 of file block_additions.h.
|
inline |
Get a reference to an addition.
No bounds checking is performed.
Definition at line 103 of file block_additions.h.
|
inline |
Get a reference to an addition.
No bounds checking is performed.
Definition at line 108 of file block_additions.h.
void tawara::BlockAdditions::push_back | ( | value_type const & | value | ) |
Add an addition to this block.
|
inline |
Get a reverse iterator to the last addition.
Definition at line 120 of file block_additions.h.
|
inline |
Get a reverse iterator to the last addition.
Definition at line 122 of file block_additions.h.
|
protected |
Loading BlockMore elements.
|
protectedvirtual |
Element body loading.
Implements tawara::Element.
|
inline |
Get a reverse iterator to the position before the first addition.
Definition at line 127 of file block_additions.h.
|
inline |
Get a reverse iterator to the position before the first addition.
Definition at line 131 of file block_additions.h.
|
inline |
Resizes the additions storage.
Definition at line 154 of file block_additions.h.
|
inline |
Swaps the contents of this BlockAdditions with another.
Definition at line 158 of file block_additions.h.
|
protectedvirtual |
Element body writing.
Implements tawara::Element.
|
friend |
Equality operator.
|
protected |
Definition at line 166 of file block_additions.h.