Tide 0.1.0
|
JoinBlocks track operation. More...
#include <tide/track_operation.h>
Public Member Functions | |
TrackJoinBlocks () | |
Construct a new JoinBlocks operation. | |
~TrackJoinBlocks () | |
Destructor. | |
std::string | type () const |
Get the type of operation to be performed. | |
void | append (uint64_t uid) |
Append a new UID to this operation. | |
uint64_t | remove (unsigned int pos) |
Remove a UID. | |
uint64_t | operator[] (unsigned int pos) const |
Const subscript operator. | |
unsigned int | count () const |
Get the number of UIDs stored. | |
virtual std::streamsize | write_body (std::ostream &output) |
TODO: Proper vector model for UIDs. | |
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. | |
Protected Attributes | |
std::vector< UIntElement > | uids_ |
Friends | |
bool | operator== (TrackJoinBlocks const &lhs, TrackJoinBlocks const &rhs) |
Equality operator. |
JoinBlocks track operation.
This track operation is used to join the blocks of the source tracks into a single virtual track. Usually it is used to join tracks that are distinct in time. Joining tracks overlapped in time will lead to interleaved blocks of data at best and undefined results at worst, and should be avoided.
Definition at line 78 of file track_operation.h.
tide::TrackJoinBlocks::TrackJoinBlocks | ( | ) |
Construct a new JoinBlocks operation.
tide::TrackJoinBlocks::~TrackJoinBlocks | ( | ) | [inline] |
Destructor.
Definition at line 86 of file track_operation.h.
void tide::TrackJoinBlocks::append | ( | uint64_t | uid | ) |
Append a new UID to this operation.
[in] | uid | The UID to append. |
ValueOutOfRange | if a zero-value UID is appended. |
virtual std::streamsize tide::TrackJoinBlocks::body_size | ( | ) | const [protected, virtual] |
Get the size of the body of this element.
Implements tide::Element.
unsigned int tide::TrackJoinBlocks::count | ( | ) | const [inline] |
Get the number of UIDs stored.
Definition at line 115 of file track_operation.h.
uint64_t tide::TrackJoinBlocks::operator[] | ( | unsigned int | pos | ) | const |
Const subscript operator.
Gets the UID at the specified position.
virtual std::streamsize tide::TrackJoinBlocks::read_body | ( | std::istream & | input, |
std::streamsize | size | ||
) | [protected, virtual] |
Element body loading.
Implements tide::Element.
uint64_t tide::TrackJoinBlocks::remove | ( | unsigned int | pos | ) |
Remove a UID.
[in] | pos | The position of the UID to remove. |
std::string tide::TrackJoinBlocks::type | ( | ) | const [inline, virtual] |
Get the type of operation to be performed.
Implements tide::TrackOperationBase.
Definition at line 89 of file track_operation.h.
virtual std::streamsize tide::TrackJoinBlocks::write_body | ( | std::ostream & | output | ) | [virtual] |
TODO: Proper vector model for UIDs.
Element body writing.
ValueOutOfRange | if a zero-value UID is written. |
Implements tide::Element.
bool operator== | ( | TrackJoinBlocks const & | lhs, |
TrackJoinBlocks const & | rhs | ||
) | [friend] |
Equality operator.
Definition at line 142 of file track_operation.h.
std::vector<UIntElement> tide::TrackJoinBlocks::uids_ [protected] |
Definition at line 130 of file track_operation.h.