General-purpose automatically managed/resized buffer. More...
#include <ndn-cxx/encoding/buffer.hpp>
 Inheritance diagram for ndn::Buffer:
 Inheritance diagram for ndn::Buffer: Collaboration diagram for ndn::Buffer:
 Collaboration diagram for ndn::Buffer:| Public Member Functions | |
| Buffer ()=default | |
| Creates an empty Buffer.  More... | |
| Buffer (const Buffer &) | |
| Copy constructor.  More... | |
| Buffer (Buffer &&) noexcept | |
| Move constructor.  More... | |
| Buffer (size_t size) | |
| Creates a Buffer with pre-allocated size.  More... | |
| Buffer (const void *buf, size_t length) | |
| Creates a Buffer by copying contents from a raw buffer.  More... | |
| template<class InputIt > | |
| Buffer (InputIt first, InputIt last) | |
| Creates a Buffer by copying the elements of the range [first, last)  More... | |
| template<class T > | |
| T * | get () noexcept | 
| template<class T > | |
| const T * | get () const noexcept | 
| Buffer & | operator= (const Buffer &) | 
| Copy assignment operator.  More... | |
| Buffer & | operator= (Buffer &&) noexcept | 
| Move assignment operator.  More... | |
| Public Attributes | |
| T | elements | 
| STL member.  More... | |
General-purpose automatically managed/resized buffer.
In most respect, the Buffer class is equivalent to a std::vector<uint8_t>, and it in fact uses the latter as a base class. In addition to that, it provides the get<T>() helper method that automatically casts the returned pointer to the requested type. 
Definition at line 40 of file buffer.hpp.
| 
 | default | 
Creates an empty Buffer.
| 
 | inlinedefault | 
Copy constructor.
| 
 | inlinedefaultnoexcept | 
Move constructor.
| 
 | inlineexplicit | 
Creates a Buffer with pre-allocated size.
| size | size of the Buffer to be allocated | 
Definition at line 69 of file buffer.hpp.
| 
 | inline | 
Creates a Buffer by copying contents from a raw buffer.
| buf | const pointer to buffer to copy | 
| length | length of the buffer to copy | 
Definition at line 78 of file buffer.hpp.
| 
 | inline | 
Creates a Buffer by copying the elements of the range [first, last)
| first | an input iterator to the first element to copy | 
| last | an input iterator to the element immediately following the last element to copy | 
Definition at line 89 of file buffer.hpp.
| 
 | inlinenoexcept | 
Definition at line 98 of file buffer.hpp.
| 
 | inlinenoexcept | 
Definition at line 107 of file buffer.hpp.
| 
 | inherited | 
STL member.