Tawara  0.1.0
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
tawara::TrackJoinBlocks Class Reference

JoinBlocks track operation. More...

#include <tawara/track_operation.h>

Inheritance diagram for tawara::TrackJoinBlocks:
Inheritance graph
[legend]
Collaboration diagram for tawara::TrackJoinBlocks:
Collaboration graph
[legend]

Public Member Functions

 TrackJoinBlocks ()
 Construct a new JoinBlocks operation. More...
 
 ~TrackJoinBlocks ()
 Destructor. More...
 
std::string type () const
 Get the type of operation to be performed. More...
 
void append (uint64_t uid)
 Append a new UID to this operation. More...
 
uint64_t remove (unsigned int pos)
 Remove a UID. More...
 
uint64_t operator[] (unsigned int pos) const
 Const subscript operator. More...
 
unsigned int count () const
 Get the number of UIDs stored. More...
 
virtual std::streamsize write_body (std::ostream &output)
 TODO: Proper vector model for UIDs. More...
 
- Public Member Functions inherited from tawara::TrackOperationBase
 TrackOperationBase (ids::ID id)
 Constructor - this must be called to set the Class ID. More...
 
virtual ~TrackOperationBase ()
 Desctructor. More...
 
- Public Member Functions inherited from tawara::MasterElement
 MasterElement (uint32_t id, bool crc=false)
 Create a new MasterElement. More...
 
virtual ~MasterElement ()
 Destructor. More...
 
- Public Member Functions inherited from tawara::Element
 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 read_body (std::istream &input, std::streamsize size)
 Element body loading. More...
 
- Protected Member Functions inherited from tawara::Element
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< UIntElementuids_
 
- Protected Attributes inherited from tawara::Element
tawara::ids::ID id_
 
std::streampos offset_
 

Friends

bool operator== (TrackJoinBlocks const &lhs, TrackJoinBlocks const &rhs)
 Equality operator. More...
 

Additional Inherited Members

- Public Types inherited from tawara::TrackOperationBase
typedef boost::shared_ptr
< TrackOperationBase
Ptr
 Base type of a track operation pointer. More...
 

Detailed Description

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 89 of file track_operation.h.

Constructor & Destructor Documentation

tawara::TrackJoinBlocks::TrackJoinBlocks ( )

Construct a new JoinBlocks operation.

tawara::TrackJoinBlocks::~TrackJoinBlocks ( )
inline

Destructor.

Definition at line 97 of file track_operation.h.

Member Function Documentation

void tawara::TrackJoinBlocks::append ( uint64_t  uid)

Append a new UID to this operation.

Parameters
[in]uidThe UID to append.
Exceptions
ValueOutOfRangeif a zero-value UID is appended.
virtual std::streamsize tawara::TrackJoinBlocks::body_size ( ) const
protectedvirtual

Get the size of the body of this element.

Implements tawara::Element.

unsigned int tawara::TrackJoinBlocks::count ( ) const
inline

Get the number of UIDs stored.

Definition at line 126 of file track_operation.h.

uint64_t tawara::TrackJoinBlocks::operator[] ( unsigned int  pos) const

Const subscript operator.

Gets the UID at the specified position.

virtual std::streamsize tawara::TrackJoinBlocks::read_body ( std::istream &  input,
std::streamsize  size 
)
protectedvirtual

Element body loading.

Implements tawara::Element.

uint64_t tawara::TrackJoinBlocks::remove ( unsigned int  pos)

Remove a UID.

Parameters
[in]posThe position of the UID to remove.
Returns
The removed UID.
std::string tawara::TrackJoinBlocks::type ( ) const
inlinevirtual

Get the type of operation to be performed.

Implements tawara::TrackOperationBase.

Definition at line 100 of file track_operation.h.

virtual std::streamsize tawara::TrackJoinBlocks::write_body ( std::ostream &  output)
virtual

TODO: Proper vector model for UIDs.

Element body writing.

Exceptions
ValueOutOfRangeif a zero-value UID is written.

Implements tawara::Element.

Friends And Related Function Documentation

bool operator== ( TrackJoinBlocks const &  lhs,
TrackJoinBlocks const &  rhs 
)
friend

Equality operator.

Definition at line 153 of file track_operation.h.

Member Data Documentation

std::vector<UIntElement> tawara::TrackJoinBlocks::uids_
protected

Definition at line 141 of file track_operation.h.


The documentation for this class was generated from the following file: