Tide 0.1.0
|
This element is used to specify reference blocks. More...
#include <tide/block_additions.h>
Public Types | |
typedef std::pair< uint64_t, std::vector< char > > | Addition |
The type of a single block addition of data. | |
typedef boost::shared_ptr < Addition > | AdditionPtr |
A pointer to an addition. | |
typedef std::vector < AdditionPtr >::value_type | value_type |
The value type of this container. | |
typedef std::vector < AdditionPtr >::size_type | size_type |
The size type of this container. | |
typedef std::vector < AdditionPtr >::reference | reference |
The reference type. | |
typedef std::vector < AdditionPtr > ::const_reference | const_reference |
The constant reference type. | |
typedef std::vector < AdditionPtr >::iterator | iterator |
The random access iterator type. | |
typedef std::vector < AdditionPtr > ::const_iterator | const_iterator |
The constant random access iterator type. | |
typedef std::vector < AdditionPtr > ::reverse_iterator | reverse_iterator |
The reversed random access iterator type. | |
typedef std::vector < AdditionPtr > ::const_reverse_iterator | const_reverse_iterator |
The constant reversed random access iterator type. | |
Public Member Functions | |
BlockAdditions () | |
Constructor. | |
value_type & | at (size_type pos) |
Get the addition at the given position, with bounds checking. | |
value_type const & | at (size_type pos) const |
Get the addition at the given position, with bounds checking. | |
value_type & | operator[] (size_type pos) |
Get a reference to an addition. | |
value_type const & | operator[] (size_type pos) const |
Get a reference to an addition. | |
iterator | begin () |
Get an iterator to the first addition. | |
const_iterator | begin () const |
Get an iterator to the first addition. | |
iterator | end () |
Get an iterator to the position past the last addition. | |
const_iterator | end () const |
Get an iterator to the position past the last addition. | |
reverse_iterator | rbegin () |
Get a reverse iterator to the last addition. | |
const_reverse_iterator | rbegin () const |
Get a reverse iterator to the last addition. | |
reverse_iterator | rend () |
Get a reverse iterator to the position before the first addition. | |
const_reverse_iterator | rend () const |
Get a reverse iterator to the position before the first addition. | |
bool | empty () const |
Check if there are no additions. | |
size_type | count () const |
Get the number of additions. | |
size_type | max_count () const |
Get the maximum number of additions. | |
void | clear () |
Remove all additions. | |
void | erase (iterator position) |
Erase the addition at the specified iterator. | |
void | erase (iterator first, iterator last) |
Erase a range of additions. | |
void | push_back (value_type const &value) |
Add an addition to this block. | |
void | resize (size_type count) |
Resizes the additions storage. | |
void | swap (BlockAdditions &other) |
Swaps the contents of this BlockAdditions with another. | |
Protected Member Functions | |
virtual std::streamsize | body_size () const |
Get the size of the body of this element. | |
virtual std::streamsize | write_body (std::ostream &output) |
Element body writing. | |
virtual std::streamsize | read_body (std::istream &input, std::streamsize size) |
Element body loading. | |
std::streamsize | read_addition (std::istream &input, std::streamsize size) |
Loading BlockMore elements. | |
Protected Attributes | |
std::vector< AdditionPtr > | additions_ |
Friends | |
bool | operator== (BlockAdditions const &lhs, BlockAdditions const &rhs) |
Equality operator. |
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 49 of file block_additions.h.
typedef std::pair<uint64_t, std::vector<char> > tide::BlockAdditions::Addition |
The type of a single block addition of data.
Definition at line 54 of file block_additions.h.
typedef boost::shared_ptr<Addition> tide::BlockAdditions::AdditionPtr |
A pointer to an addition.
Definition at line 56 of file block_additions.h.
typedef std::vector<AdditionPtr>::const_iterator tide::BlockAdditions::const_iterator |
The constant random access iterator type.
Definition at line 68 of file block_additions.h.
typedef std::vector<AdditionPtr>::const_reference tide::BlockAdditions::const_reference |
The constant reference type.
Definition at line 64 of file block_additions.h.
typedef std::vector<AdditionPtr>::const_reverse_iterator tide::BlockAdditions::const_reverse_iterator |
The constant reversed random access iterator type.
Definition at line 73 of file block_additions.h.
typedef std::vector<AdditionPtr>::iterator tide::BlockAdditions::iterator |
The random access iterator type.
Definition at line 66 of file block_additions.h.
typedef std::vector<AdditionPtr>::reference tide::BlockAdditions::reference |
The reference type.
Definition at line 62 of file block_additions.h.
typedef std::vector<AdditionPtr>::reverse_iterator tide::BlockAdditions::reverse_iterator |
The reversed random access iterator type.
Definition at line 70 of file block_additions.h.
typedef std::vector<AdditionPtr>::size_type tide::BlockAdditions::size_type |
The size type of this container.
Definition at line 60 of file block_additions.h.
typedef std::vector<AdditionPtr>::value_type tide::BlockAdditions::value_type |
The value type of this container.
Definition at line 58 of file block_additions.h.
tide::BlockAdditions::BlockAdditions | ( | ) |
Constructor.
value_type& tide::BlockAdditions::at | ( | size_type | pos | ) | [inline] |
Get the addition at the given position, with bounds checking.
Definition at line 81 of file block_additions.h.
value_type const& tide::BlockAdditions::at | ( | size_type | pos | ) | const [inline] |
Get the addition at the given position, with bounds checking.
Definition at line 86 of file block_additions.h.
iterator tide::BlockAdditions::begin | ( | ) | [inline] |
Get an iterator to the first addition.
Definition at line 101 of file block_additions.h.
const_iterator tide::BlockAdditions::begin | ( | ) | const [inline] |
Get an iterator to the first addition.
Definition at line 103 of file block_additions.h.
virtual std::streamsize tide::BlockAdditions::body_size | ( | ) | const [protected, virtual] |
Get the size of the body of this element.
Implements tide::Element.
void tide::BlockAdditions::clear | ( | ) | [inline] |
Remove all additions.
Definition at line 130 of file block_additions.h.
size_type tide::BlockAdditions::count | ( | ) | const [inline] |
Get the number of additions.
Definition at line 125 of file block_additions.h.
bool tide::BlockAdditions::empty | ( | ) | const [inline] |
Check if there are no additions.
Definition at line 123 of file block_additions.h.
const_iterator tide::BlockAdditions::end | ( | ) | const [inline] |
Get an iterator to the position past the last addition.
Definition at line 107 of file block_additions.h.
iterator tide::BlockAdditions::end | ( | ) | [inline] |
Get an iterator to the position past the last addition.
Definition at line 105 of file block_additions.h.
void tide::BlockAdditions::erase | ( | iterator | position | ) | [inline] |
Erase the addition at the specified iterator.
Definition at line 133 of file block_additions.h.
Erase a range of additions.
Definition at line 136 of file block_additions.h.
size_type tide::BlockAdditions::max_count | ( | ) | const [inline] |
Get the maximum number of additions.
Definition at line 127 of file block_additions.h.
value_type const& tide::BlockAdditions::operator[] | ( | size_type | pos | ) | const [inline] |
Get a reference to an addition.
No bounds checking is performed.
Definition at line 97 of file block_additions.h.
value_type& tide::BlockAdditions::operator[] | ( | size_type | pos | ) | [inline] |
Get a reference to an addition.
No bounds checking is performed.
Definition at line 92 of file block_additions.h.
void tide::BlockAdditions::push_back | ( | value_type const & | value | ) |
Add an addition to this block.
reverse_iterator tide::BlockAdditions::rbegin | ( | ) | [inline] |
Get a reverse iterator to the last addition.
Definition at line 109 of file block_additions.h.
const_reverse_iterator tide::BlockAdditions::rbegin | ( | ) | const [inline] |
Get a reverse iterator to the last addition.
Definition at line 111 of file block_additions.h.
std::streamsize tide::BlockAdditions::read_addition | ( | std::istream & | input, |
std::streamsize | size | ||
) | [protected] |
Loading BlockMore elements.
virtual std::streamsize tide::BlockAdditions::read_body | ( | std::istream & | input, |
std::streamsize | size | ||
) | [protected, virtual] |
Element body loading.
Implements tide::Element.
reverse_iterator tide::BlockAdditions::rend | ( | ) | [inline] |
Get a reverse iterator to the position before the first addition.
Definition at line 116 of file block_additions.h.
const_reverse_iterator tide::BlockAdditions::rend | ( | ) | const [inline] |
Get a reverse iterator to the position before the first addition.
Definition at line 120 of file block_additions.h.
void tide::BlockAdditions::resize | ( | size_type | count | ) | [inline] |
Resizes the additions storage.
Definition at line 143 of file block_additions.h.
void tide::BlockAdditions::swap | ( | BlockAdditions & | other | ) | [inline] |
Swaps the contents of this BlockAdditions with another.
Definition at line 147 of file block_additions.h.
virtual std::streamsize tide::BlockAdditions::write_body | ( | std::ostream & | output | ) | [protected, virtual] |
Element body writing.
Implements tide::Element.
bool operator== | ( | BlockAdditions const & | lhs, |
BlockAdditions const & | rhs | ||
) | [friend] |
Equality operator.
std::vector<AdditionPtr> tide::BlockAdditions::additions_ [protected] |
Definition at line 155 of file block_additions.h.