43 lines
714 B
C++
43 lines
714 B
C++
#include <blue/core/stringstream.h>
|
|
#include <blue/core/stringstream.hpp>
|
|
|
|
namespace blue::core
|
|
{
|
|
|
|
stringstream::stringstream()
|
|
{
|
|
ptr_ = b_stringstream_create();
|
|
}
|
|
|
|
stringstream::stringstream(char *buf, std::size_t max)
|
|
{
|
|
ptr_ = b_stringstream_create_with_buffer(buf, max);
|
|
}
|
|
|
|
status stringstream::reset()
|
|
{
|
|
return b_stringstream_reset(ptr_);
|
|
}
|
|
|
|
status stringstream::reset(char *buf, std::size_t max)
|
|
{
|
|
return b_stringstream_reset_with_buffer(ptr_, buf, max);
|
|
}
|
|
|
|
const char *stringstream::get_ptr() const
|
|
{
|
|
return b_stringstream_ptr(ptr_);
|
|
}
|
|
|
|
char *stringstream::steal_ptr()
|
|
{
|
|
return b_stringstream_steal(ptr_);
|
|
}
|
|
|
|
std::size_t stringstream::get_length() const
|
|
{
|
|
return b_stringstream_get_length(ptr_);
|
|
}
|
|
|
|
}
|