rjp/rjp++/include/string.hpp
2020-03-06 16:13:28 -08:00

35 lines
730 B
C++

#ifndef RJP_STRING_HPP
#define RJP_STRING_HPP
#include <rexy/string.hpp>
#include <rjp.h>
namespace rjp{
namespace detail{
struct allocator
{
static void free(void* data);
static void* allocate(size_t size);
static void* copy(const void* data, size_t len);
};
}
class string : public rexy::string_intermediary<detail::allocator>
{
public:
string(const string&) = default;
string(string&&) = default;
string& operator=(const string&) = default;
string& operator=(string&&) = default;
using rexy::string_intermediary<detail::allocator>::string_intermediary;
string(RJP_value* r);
using rexy::string_intermediary<detail::allocator>::operator=;
string& operator=(RJP_value* r);
};
}
#endif