mqtt_cpp
Classes | Namespaces | Functions
buffer.hpp File Reference
#include <stdexcept>
#include <utility>
#include <type_traits>
#include <boost/asio/buffer.hpp>
#include <mqtt/namespace.hpp>
#include <mqtt/string_view.hpp>
#include <mqtt/shared_ptr_array.hpp>
#include <mqtt/move.hpp>
Include dependency graph for buffer.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  MQTT_NS::buffer
 buffer that has string_view interface This class provides string_view interface. This class hold string_view target's lifetime optionally. More...
 
struct  MQTT_NS::detail::is_buffer_sequence_class< T, Buffer >
 
struct  MQTT_NS::is_buffer_sequence< T >
 
struct  MQTT_NS::is_buffer_sequence< buffer >
 

Namespaces

 MQTT_NS
 
 MQTT_NS::literals
 
 MQTT_NS::detail
 
 boost
 
 boost::asio
 

Functions

buffer MQTT_NS::literals::operator""_mb (char const *str, std::size_t length)
 user defined literals for buffer If user use this out of mqtt scope, then user need to declare using namespace literals. When user write "ABC"_mb, then this function is called. The created buffer doesn't hold any lifetimes because the string literals has static strage duration, so buffer doesn't need to hold the lifetime. More...
 
template<typename Iterator >
buffer MQTT_NS::allocate_buffer (Iterator b, Iterator e)
 create buffer from the pair of iterators It copies string that from b to e into shared_ptr_array. Then create buffer and return it. The buffer holds the lifetime of shared_ptr_array. More...
 
buffer MQTT_NS::allocate_buffer (string_view sv)
 create buffer from the string_view It copies string that from string_view into shared_ptr_array. Then create buffer and return it. The buffer holds the lifetime of shared_ptr_array. More...
 
buffer const * MQTT_NS::buffer_sequence_begin (buffer const &buf)
 
buffer const * MQTT_NS::buffer_sequence_end (buffer const &buf)
 
template<typename Col >
Col::const_iterator MQTT_NS::buffer_sequence_begin (Col const &col)
 
template<typename Col >
Col::const_iterator MQTT_NS::buffer_sequence_end (Col const &col)
 
template<typename >
char MQTT_NS::detail::buffer_sequence_begin_helper (...)
 
template<typename T >
char(& MQTT_NS::detail::buffer_sequence_begin_helper (T *t, typename std::enable_if< !std::is_same< decltype(buffer_sequence_begin(*t)), void >::value >::type *))[2]
 
template<typename >
char MQTT_NS::detail::buffer_sequence_end_helper (...)
 
template<typename T >
char(& MQTT_NS::detail::buffer_sequence_end_helper (T *t, typename std::enable_if< !std::is_same< decltype(buffer_sequence_end(*t)), void >::value >::type *))[2]
 
template<typename , typename >
char(& MQTT_NS::detail::buffer_sequence_element_type_helper (...))[2]
 
template<typename T , typename Buffer >
char MQTT_NS::detail::buffer_sequence_element_type_helper (T *t, typename std::enable_if< std::is_convertible< decltype(*buffer_sequence_begin(*t)), Buffer >::value >::type *)
 
const_buffer boost::asio::buffer (MQTT_NS::buffer const &data)
 create boost::asio::const_buffer from the MQTT_NS::buffer boost::asio::const_buffer is a kind of view class. So the class doesn't hold any lifetimes. The caller needs to manage data's lifetime. More...