35 lines
730 B
C++
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
|