39 #if !defined(TAWARA_BLOCK_GROUP_H_)
40 #define TAWARA_BLOCK_GROUP_H_
42 #include <boost/operators.hpp>
67 public boost::equality_comparable<BlockGroup>
328 virtual std::streamsize
body_size()
const;
331 virtual std::streamsize
read_body(std::istream& input,
332 std::streamsize
size);
335 virtual std::streamsize
write_body(std::ostream& output);
348 #endif // TAWARA_BLOCK_GROUP_H_
virtual bool invisible() const
If this block is invisible.
virtual uint64_t track_number() const
The block's track number.
std::vector< int16_t > & ref_blocks()
Get the reference block timecode array.
virtual int16_t timecode() const
The timecode of this block.
size_type count() const
Get the number of frames.
void push_back(value_type const &value)
Add a frame to this block.
virtual reverse_iterator rend()
Get a reverse iterator to the position before the first frame.
virtual void swap(BlockGroup &other)
Swaps the contents of this block with another.
virtual value_type & operator[](size_type pos)
Get a reference to a frame.
virtual void track_number(uint64_t track_number)
Set the block's track number.
virtual reverse_iterator rbegin()
Get a reverse iterator to the last frame.
std::vector< FramePtr >::const_iterator const_iterator
The constant random access iterator type.
virtual size_type max_count() const
Get the maximum number of frames.
Common block functionality implementation.
UIntElement ref_priority_
virtual void lacing(LacingType lacing)
Set the lacing type in use.
virtual value_type const & at(size_type pos) const
Get the frame at the given position, with bounds checking.
virtual size_type count() const
Get the number of frames.
std::vector< int16_t > ref_blocks_
void reset()
Reset all values to their defaults.
std::vector< FramePtr >::value_type value_type
The value type of this container.
virtual iterator end()
Get an iterator to the position past the last frame.
iterator begin()
Get an iterator to the first frame.
Binary primitive element.
bool invisible() const
If this block is invisible.
uint64_t ref_priority() const
Get the block's reference priority.
reverse_iterator rbegin()
Get a reverse iterator to the last frame.
virtual value_type & at(size_type pos)
Get the frame at the given position, with bounds checking.
void clear()
Remove all frames.
friend bool operator==(BlockGroup const &lhs, BlockGroup const &rhs)
Equality operator.
virtual const_iterator end() const
Get an iterator to the position past the last frame.
bool operator==(AttachedFile const &lhs, AttachedFile const &rhs)
Equality operator for the AttachedFile object.
void resize(size_type count)
Resizes the frames storage.
virtual std::streamsize write_body(std::ostream &output)
Element body writing.
BlockAdditions & additions()
Access the block additions property.
virtual std::streamsize size() const
Get the total size of the element.
std::vector< FramePtr >::size_type size_type
The size type of this container.
void ref_priority(uint64_t ref_priority)
Set the block's reference priority.
virtual void timecode(int16_t timecode)
Set the block's timecode.
virtual LacingType lacing() const
Get the lacing type in use.
bool empty() const
Check if there are no frames.
Unsigned integer primitive element.
virtual void clear()
Remove all frames.
virtual std::streamsize body_size() const
Get the size of the body of this element.
virtual void invisible(bool invisible)
Set if this block is invisible.
BinaryElement codec_state_
virtual void erase(iterator position)
Erase the frame at the specified iterator.
reverse_iterator rend()
Get a reverse iterator to the position before the first frame.
virtual void push_back(value_type const &value)
Add a frame to this block.
std::vector< FramePtr >::reverse_iterator reverse_iterator
The reversed random access iterator type.
LacingType lacing() const
Get the lacing type in use.
void duration(uint64_t duration)
Set the block's duration.
BlockAdditions additions_
virtual const_reverse_iterator rend() const
Get a reverse iterator to the position before the first frame.
This element is used to specify reference blocks.
virtual bool empty() const
Check if there are no frames.
virtual iterator begin()
Get an iterator to the first frame.
virtual value_type const & operator[](size_type pos) const
Get a reference to a frame.
void erase(iterator position)
Erase the frame at the specified iterator.
value_type & at(size_type pos)
Get the frame at the given position, with bounds checking.
BlockGroup(uint64_t track_number, int16_t timecode, LacingType lacing=LACING_NONE, uint64_t duration=0, uint64_t ref_priority=0)
Create a new BlockGroup.
std::vector< FramePtr >::const_reverse_iterator const_reverse_iterator
The constant reversed random access iterator type.
uint64_t duration() const
Get the block's duration.
virtual void resize(size_type count)
Resizes the frames storage.
uint64_t track_number() const
The block's track number.
virtual void erase(iterator first, iterator last)
Erase a range of frames.
std::vector< char > codec_state() const
Get the codec state for this block.
int16_t timecode() const
The timecode of this block.
virtual const_iterator begin() const
Get an iterator to the first frame.
virtual std::streamsize read_body(std::istream &input, std::streamsize size)
Element body loading.
void codec_state(std::vector< char > const &codec_state)
Set the codec state for this block.
The BlockGroup is the standard block.
size_type max_count() const
Get the maximum number of frames.
virtual const_reverse_iterator rbegin() const
Get a reverse iterator to the last frame.
iterator end()
Get an iterator to the position past the last frame.
std::vector< FramePtr >::iterator iterator
The random access iterator type.