meta: add c++ wrapper of core module
This commit is contained in:
42
core-mm/stringstream.cpp
Normal file
42
core-mm/stringstream.cpp
Normal file
@@ -0,0 +1,42 @@
|
||||
#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_);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user