35 : _bundle(), _blob(ref), _initialized(false), _hasFirstFragBlocksAdded(false), _hasLastFragBlocksAdded(false), _appdatalength(0)
54 bool BundleMerger::Container::contains(
Length offset,
Length length)
const
57 for (std::set<Chunk>::const_iterator iter = _chunks.begin(); iter != _chunks.end(); ++iter)
59 const Chunk &chunk = (*iter);
61 if (offset < chunk.
offset)
break;
65 if ((offset + length) <= (chunk.
offset + chunk.
length))
return true;
72 void BundleMerger::Container::add(
Length offset,
Length length)
74 BundleMerger::Chunk chunk(offset, length);
75 _chunks.insert(chunk);
110 c._hasFirstFragBlocksAdded =
false;
111 c._hasLastFragBlocksAdded =
false;
113 c._initialized =
true;
129 (*stream) << (*s).rdbuf() << std::flush;
139 c._hasFirstFragBlocksAdded =
true;
150 const Block ¤t_block = (**block_it);
163 block = current_block;
171 block = current_block;
183 c._hasLastFragBlocksAdded =
true;
192 for (payload_it++; payload_it != obj.
end(); ++payload_it)
195 const Block ¤t_block = (**payload_it);
204 block = current_block;
212 block = current_block;
234 : offset(o), length(l)
244 if (offset < other.
offset)
return true;
245 if (offset != other.
offset)
return false;
247 return (length < other.
length);
255 for (std::set<Chunk>::const_iterator iter = chunks.begin(); iter != chunks.end(); ++iter)
257 const Chunk &chunk = (*iter);
260 if (chunk.
offset > position)
return false;
266 return (position >= length);