39 #if !defined(TAWARA_METASEEK_H_)
40 #define TAWARA_METASEEK_H_
42 #include <boost/operators.hpp>
68 public boost::equality_comparable<SeekHead>
102 typedef storage_type_::const_reverse_iterator
109 { index_ = other.
index_;
return *
this; }
112 iterator
begin() {
return index_.begin(); }
114 const_iterator
begin()
const {
return index_.begin(); }
118 iterator
end() {
return index_.end(); }
122 const_iterator
end()
const {
return index_.end(); }
124 reverse_iterator
rbegin() {
return index_.rbegin(); }
130 reverse_iterator
rend() {
return index_.rend(); }
137 bool empty()
const {
return index_.empty(); }
139 size_type
count()
const {
return index_.size(); }
141 size_type
max_count()
const {
return index_.max_size(); }
156 {
return index_.insert(value); }
162 void insert(const_iterator first, const_iterator last)
163 { index_.insert(first, last); }
168 void erase(iterator position) { index_.erase(position); }
174 void erase(iterator first, iterator last)
175 { index_.erase(first, last); }
182 {
return index_.erase(
id); }
188 { index_.swap(other.
index_); }
199 iterator
find(key_type
const&
id) {
return index_.find(
id); }
206 const_iterator
find(key_type
const&
id)
const
207 {
return index_.find(
id); }
216 virtual std::streamsize body_size()
const;
219 virtual std::streamsize write_body(std::ostream& output);
222 virtual std::streamsize read_body(std::istream& input,
223 std::streamsize
size);
233 #endif // TAWARA_METASEEK_H_
size_type count() const
Get the number of index entries.
size_type erase(key_type const &id)
Erase all index entries with the given ID.
ids::ID key_type
The key type (Key) of this container.
void erase(iterator position)
Erase the index entry at the specified iterator.
const_iterator end() const
Get an iterator to the position past the last index entry.
storage_type_::const_iterator const_iterator
The constant random access iterator type.
iterator insert(value_type const &value)
Insert a new index entry.
reverse_iterator rend()
Get a reverse iterator to the position before the first index entry.
std::streamsize size(ID id)
Get the number of bytes required by an ID.
const_iterator begin() const
Get an iterator to the first index entry.
const_reverse_iterator rend() const
Get a reverse iterator to the position before the first index entry.
std::streamoff mapped_type
The mapped type (T) of this container.
storage_type_::value_type value_type
The value type of this container.
iterator end()
Get an iterator to the position past the last index entry.
bool empty() const
Check if there are no index entries.
iterator find(key_type const &id)
Search for the index entry with the given ID.
The MasterElement interface.
storage_type_::iterator iterator
The random access iterator type.
void clear()
Remove all index entries.
storage_type_::reverse_iterator reverse_iterator
The reversed random access iterator type.
storage_type_::const_reference const_reference
The constant reference type.
size_type max_count() const
Get the maximum number of index entries.
bool operator==(AttachedFile const &lhs, AttachedFile const &rhs)
Equality operator for the AttachedFile object.
iterator begin()
Get an iterator to the first index entry.
void swap(SeekHead &other)
Swaps the contents of this SeekHead with another.
const_iterator find(key_type const &id) const
Search for the index entry with the given ID.
storage_type_::size_type size_type
The size type of this container.
reverse_iterator rbegin()
Get a reverse iterator to the last index entry.
storage_type_::const_reverse_iterator const_reverse_iterator
The constant reversed random access iterator type.
std::multimap< key_type, mapped_type > storage_type_
The type of the internal storage.
void erase(iterator first, iterator last)
Erase a range of index entries.
SeekHead & operator=(SeekHead const &other)
Replace the stored offsets with those from another SeekHead element.
const ID SeekHead(0x114D9B74)
void insert(const_iterator first, const_iterator last)
Insert a range of offsets.
storage_type_::reference reference
The reference type.
The SeekHead element, used as an index for a Tawara file.
const_reverse_iterator rbegin() const
Get a reverse iterator to the last index entry.