39 #if !defined(TAWARA_SIMPLE_BLOCK_H_)
40 #define TAWARA_SIMPLE_BLOCK_H_
60 public boost::equality_comparable<SimpleBlock>
69 SimpleBlock(uint64_t track_number, int16_t timecode,
115 {
return block_.track_number(); }
118 { block_.track_number(track_number); }
126 virtual int16_t
timecode()
const {
return block_.timecode(); }
129 { block_.timecode(timecode); }
136 virtual bool invisible()
const {
return block_.invisible(); }
139 { block_.invisible(invisible); }
153 { block_.lacing(lacing); }
169 {
return block_.at(pos); }
178 {
return block_[pos]; }
186 {
return block_[pos]; }
200 {
return block_.rbegin(); }
209 {
return block_.rend(); }
216 virtual bool empty()
const {
return block_.empty(); }
229 virtual void clear() { block_.clear(); }
242 { block_.erase(first, last); }
257 { block_.push_back(value); }
296 virtual std::streamsize body_size()
const;
299 virtual std::streamsize read_body(std::istream& input,
300 std::streamsize
size);
303 virtual std::streamsize write_body(std::ostream& output);
313 #endif // TAWARA_SIMPLE_BLOCK_H_
virtual const_iterator end() const
Get an iterator to the position past the last frame.
virtual reverse_iterator rbegin()
Get a reverse iterator to the last frame.
virtual void invisible(bool invisible)
Set if this block is invisible.
virtual void track_number(uint64_t track_number)
Set the block's track number.
virtual const_reverse_iterator rbegin() const
Get a reverse iterator to the last frame.
std::streamsize size(ID id)
Get the number of bytes required by an ID.
virtual value_type & operator[](size_type pos)
Get a reference to a frame.
virtual void erase(iterator position)
Erase the frame at the specified iterator.
std::vector< FramePtr >::const_iterator const_iterator
The constant random access iterator type.
virtual void lacing(LacingType lacing)
Set the lacing type in use.
Common block functionality implementation.
virtual iterator begin()
Get an iterator to the first frame.
virtual void timecode(int16_t timecode)
Set the block's timecode.
std::vector< FramePtr >::value_type value_type
The value type of this container.
virtual int16_t timecode() const
The timecode of this block.
bool operator==(AttachedFile const &lhs, AttachedFile const &rhs)
Equality operator for the AttachedFile object.
virtual value_type & at(size_type pos)
Get the frame at the given position, with bounds checking.
const ID SimpleBlock(0xA3)
std::vector< FramePtr >::size_type size_type
The size type of this container.
virtual const_reverse_iterator rend() const
Get a reverse iterator to the position before the first frame.
virtual 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.
virtual uint64_t track_number() const
The block's track number.
bool keyframe() const
Check if this block is a keyframe or not.
std::vector< FramePtr >::reverse_iterator reverse_iterator
The reversed random access iterator type.
virtual bool invisible() const
If this block is invisible.
virtual bool empty() const
Check if there are no frames.
void keyframe(bool keyframe)
Set if this block is a keyframe.
virtual void erase(iterator first, iterator last)
Erase a range of frames.
virtual const_iterator begin() const
Get an iterator to the first frame.
virtual value_type const & at(size_type pos) const
Get the frame at the given position, with bounds checking.
virtual LacingType lacing() const
Get the lacing type in use.
virtual void resize(size_type count)
Resizes the frames storage.
virtual size_type count() const
Get the number of frames.
virtual void clear()
Remove all frames.
std::vector< FramePtr >::const_reverse_iterator const_reverse_iterator
The constant reversed random access iterator type.
virtual value_type const & operator[](size_type pos) const
Get a reference to a frame.
The SimpleBlock element, a simplified version of Blocks.
void discardable(bool discardable)
Set if this block can be discarded during playback.
bool discardable() const
Check if this block can be discarded during playback.
virtual iterator end()
Get an iterator to the position past the last frame.
virtual size_type max_count() const
Get the maximum number of frames.
std::vector< FramePtr >::iterator iterator
The random access iterator type.