mirror of
https://github.com/zeromq/cppzmq.git
synced 2024-12-12 10:33:52 +01:00
add iterator
This commit is contained in:
parent
55c2eea1a7
commit
5cd848273a
@ -46,6 +46,13 @@ private:
|
||||
std::deque<message_t> m_parts;
|
||||
|
||||
public:
|
||||
|
||||
typedef std::deque<message_t>::iterator iterator;
|
||||
typedef std::deque<message_t>::const_iterator const_iterator;
|
||||
|
||||
typedef std::deque<message_t>::reverse_iterator reverse_iterator;
|
||||
typedef std::deque<message_t>::const_reverse_iterator const_reverse_iterator;
|
||||
|
||||
// Default constructor
|
||||
multipart_t()
|
||||
{}
|
||||
@ -113,6 +120,56 @@ public:
|
||||
return m_parts.at(n);
|
||||
}
|
||||
|
||||
iterator begin()
|
||||
{
|
||||
return m_parts.begin();
|
||||
}
|
||||
|
||||
const_iterator begin() const
|
||||
{
|
||||
return m_parts.begin();
|
||||
}
|
||||
|
||||
const_iterator cbegin() const
|
||||
{
|
||||
return m_parts.cbegin();
|
||||
}
|
||||
|
||||
reverse_iterator rbegin()
|
||||
{
|
||||
return m_parts.rbegin();
|
||||
}
|
||||
|
||||
const_reverse_iterator rbegin() const
|
||||
{
|
||||
return m_parts.rbegin();
|
||||
}
|
||||
|
||||
iterator end()
|
||||
{
|
||||
return m_parts.end();
|
||||
}
|
||||
|
||||
const_iterator end() const
|
||||
{
|
||||
return m_parts.end();
|
||||
}
|
||||
|
||||
const_iterator cend() const
|
||||
{
|
||||
return m_parts.cend();
|
||||
}
|
||||
|
||||
reverse_iterator rend()
|
||||
{
|
||||
return m_parts.rend();
|
||||
}
|
||||
|
||||
const_reverse_iterator rend() const
|
||||
{
|
||||
return m_parts.rend();
|
||||
}
|
||||
|
||||
// Delete all parts
|
||||
void clear()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user