39 #if !defined(TAWARA_BLOCK_H_)
40 #define TAWARA_BLOCK_H_
42 #include <boost/operators.hpp>
43 #include <boost/shared_ptr.hpp>
60 public boost::equality_comparable<Block>
64 typedef boost::shared_ptr<Block>
Ptr;
66 typedef boost::shared_ptr<Block const>
ConstPtr;
79 typedef std::vector<char>
Frame;
91 typedef std::vector<FramePtr>::iterator
iterator;
97 typedef std::vector<FramePtr>::const_reverse_iterator
106 Block(uint64_t track_number, int16_t timecode,
111 virtual ~
Block() = 0;
119 virtual uint64_t track_number()
const = 0;
121 virtual void track_number(uint64_t track_number) = 0;
129 virtual int16_t timecode()
const = 0;
131 virtual void timecode(int16_t timecode) = 0;
138 virtual bool invisible()
const = 0;
140 virtual void invisible(
bool invisible) = 0;
151 virtual LacingType lacing()
const = 0;
153 virtual void lacing(LacingType lacing) = 0;
161 virtual value_type& at(size_type pos) = 0;
168 virtual value_type
const& at(size_type pos)
const = 0;
176 virtual value_type& operator[](size_type pos) = 0;
183 virtual value_type
const& operator[](size_type pos)
const = 0;
186 virtual iterator begin() = 0;
188 virtual const_iterator begin()
const = 0;
190 virtual iterator end() = 0;
192 virtual const_iterator end()
const = 0;
194 virtual reverse_iterator rbegin() = 0;
196 virtual const_reverse_iterator rbegin()
const = 0;
200 virtual reverse_iterator rend() = 0;
204 virtual const_reverse_iterator rend()
const = 0;
211 virtual bool empty()
const = 0;
213 virtual size_type count()
const = 0;
221 virtual size_type max_count()
const = 0;
224 virtual void clear() = 0;
230 virtual void erase(iterator position) = 0;
236 virtual void erase(iterator first, iterator last) = 0;
250 virtual void push_back(value_type
const& value) = 0;
267 virtual void resize(size_type count) = 0;
280 #endif // TAWARA_BLOCK_H_
boost::shared_ptr< Frame > FramePtr
A pointer to a frame of data.
std::vector< FramePtr >::const_iterator const_iterator
The constant random access iterator type.
std::vector< FramePtr >::reference reference
The reference type.
std::vector< FramePtr >::value_type value_type
The value type of this container.
boost::shared_ptr< Block const > ConstPtr
Constant pointer to a block.
boost::shared_ptr< Block > Ptr
Pointer to a block.
std::vector< char > Frame
The type of a single frame of data.
std::vector< FramePtr >::size_type size_type
The size type of this container.
std::vector< FramePtr >::reverse_iterator reverse_iterator
The reversed random access iterator type.
Block(uint64_t track_number, int16_t timecode, LacingType lacing=LACING_NONE)
Constructor.
std::vector< FramePtr >::const_reference const_reference
The constant reference type.
virtual void swap(Block &other)
Swaps the contents of this block with another.
std::vector< FramePtr >::const_reverse_iterator const_reverse_iterator
The constant reversed random access iterator type.
std::vector< FramePtr >::iterator iterator
The random access iterator type.