mirror of
https://github.com/zeromq/cppzmq.git
synced 2025-03-03 12:58:05 +01:00
Merge pull request #97 from laplaceyang/pr_direct_access
addd operator[] and at function for direct access msgs
This commit is contained in:
commit
55c2eea1a7
@ -93,6 +93,26 @@ public:
|
|||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message_t& operator[] (size_t n)
|
||||||
|
{
|
||||||
|
return m_parts[n];
|
||||||
|
}
|
||||||
|
|
||||||
|
const message_t& operator[] (size_t n) const
|
||||||
|
{
|
||||||
|
return m_parts[n];
|
||||||
|
}
|
||||||
|
|
||||||
|
message_t& at (size_t n)
|
||||||
|
{
|
||||||
|
return m_parts.at(n);
|
||||||
|
}
|
||||||
|
|
||||||
|
const message_t& at (size_t n) const
|
||||||
|
{
|
||||||
|
return m_parts.at(n);
|
||||||
|
}
|
||||||
|
|
||||||
// Delete all parts
|
// Delete all parts
|
||||||
void clear()
|
void clear()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user