43 template<
typename CharT>
95 return BufferType{
const_cast<char*
>(data.c_str())};
100 data =
DataType(buffer[0],std::strlen(buffer[0]));
113 std::transform(data.begin(),data.end(),std::back_inserter(buffer),
114 [](
const std::string &str)
116 return const_cast<char*>(str.c_str());
123 std::transform(buffer.begin(),buffer.end(),data.begin(),
126 return std::string(ptr,std::strlen(ptr));
void * ptr(T &value)
Definition: type_trait.hpp:111
top-level namespace of the entire library
Definition: attribute.hpp:45
std::vector< CharT * > VarLengthStringBuffer
buffer for variable length string data
Definition: variable_length_string.hpp:44
static BufferType to_buffer(const DataType &data)
Definition: variable_length_string.hpp:93
std::string DataType
Definition: variable_length_string.hpp:90
static void from_buffer(const BufferType &buffer, DataType &data)
Definition: variable_length_string.hpp:98
VarLengthStringBuffer< char > BufferType
Definition: variable_length_string.hpp:89
VarLengthStringBuffer< char > BufferType
Definition: variable_length_string.hpp:107
static void from_buffer(const BufferType &buffer, DataType &data)
Definition: variable_length_string.hpp:121
std::vector< std::string > DataType
Definition: variable_length_string.hpp:108
static BufferType to_buffer(const DataType &data)
Definition: variable_length_string.hpp:110
variable length string buffer trait
Definition: variable_length_string.hpp:54
static void from_buffer(const BufferType &, DataType &)
copy data to output
Definition: variable_length_string.hpp:82
static BufferType to_buffer(const T &)
create buffer with write data
Definition: variable_length_string.hpp:67
VarLengthStringBuffer< char > BufferType
Definition: variable_length_string.hpp:55
T DataType
Definition: variable_length_string.hpp:56