diff --git a/rjp++/include/array.hpp b/rjp++/include/array.hpp new file mode 100644 index 0000000..ce133f4 --- /dev/null +++ b/rjp++/include/array.hpp @@ -0,0 +1,66 @@ +#ifndef RJP_ARRAY_HPP +#define RJP_ARRAY_HPP + +#include "value.hpp" +#include "integral.hpp" +#include "string_val.hpp" +#include "iterator.hpp" +#include +#include + +namespace rjp{ + + class array_iterator : protected detail::iterator_base + { + protected: + RJP_array_iterator m_it; + + public: + array_iterator(void) = default; + array_iterator(RJP_value* v); + array_iterator(const array_iterator&) = delete; + array_iterator(array_iterator&& a); + ~array_iterator(void); + array_iterator& operator=(const array_iterator&) = delete; + array_iterator& operator=(array_iterator&& o); + + bool operator==(const array_iterator& o)const; + bool operator!=(const array_iterator& o)const; + value operator*(void)const; + value_wrapper operator->(void)const; + + array_iterator& operator++(void); + }; + class array : public value + { + public: + using iterator = array_iterator; + using const_iterator = const iterator; + public: + using value::value; + array(void); + array(const value& val); + array(value&& val); + + array(const array&) = default; + array(array&&) = default; + ~array(void) = default; + array& operator=(const array&) = default; + array& operator=(array&&) = default; + + value add(void); + string_val add(const rexy::string_base& val); + string_val add(string&& val); + + value& remove(value& val); + void destroy(value&& val); + + iterator begin(void); + iterator end(void); + const_iterator begin(void)const; + const_iterator end(void)const; + }; + +} + +#endif diff --git a/rjp++/include/integral.hpp b/rjp++/include/integral.hpp new file mode 100644 index 0000000..e36e711 --- /dev/null +++ b/rjp++/include/integral.hpp @@ -0,0 +1,94 @@ +#ifndef RJP_INTEGRAL_HPP +#define RJP_INTEGRAL_HPP + +#include "value.hpp" +#include + +namespace rjp{ + + class integer : public value + { + public: + using underlying_type = RJP_int; + public: + using value::value; + integer(underlying_type i); + integer(void); + integer(const value& val); + integer(value&& val); + integer(const value& val, underlying_type i); + integer(value&& val, underlying_type i); + + integer(const integer&) = default; + integer(integer&&) = default; + ~integer(void) = default; + integer& operator=(const integer&) = default; + integer& operator=(integer&&) = default; + + underlying_type get(void)const; + void set(underlying_type i); + + }; + class dfloat : public value + { + public: + using underlying_type = RJP_float; + public: + using value::value; + dfloat(underlying_type i); + dfloat(void); + dfloat(const value& val); + dfloat(value&& val); + dfloat(const value& val, underlying_type i); + dfloat(value&& val, underlying_type i); + + dfloat(const dfloat&) = default; + dfloat(dfloat&&) = default; + ~dfloat(void) = default; + dfloat& operator=(const dfloat&) = default; + dfloat& operator=(dfloat&&) = default; + + underlying_type get(void)const; + void set(underlying_type i); + }; + class boolean : public value + { + public: + using underlying_type = RJP_bool; + public: + using value::value; + boolean(underlying_type i); + boolean(void); + boolean(const value& val); + boolean(value&& val); + boolean(const value& val, underlying_type i); + boolean(value&& val, underlying_type i); + + boolean(const boolean&) = default; + boolean(boolean&&) = default; + ~boolean(void) = default; + boolean& operator=(const boolean&) = default; + boolean& operator=(boolean&&) = default; + + bool get(void)const; + void set(bool i); + }; + class null : public value + { + public: + using value::value; + null(void); + null(const value& val); + null(value&& val); + + null(const null&) = default; + null(null&&) = default; + ~null(void) = default; + null& operator=(const null&) = default; + null& operator=(null&&) = default; + + }; + +} + +#endif diff --git a/rjp++/include/iterator.hpp b/rjp++/include/iterator.hpp new file mode 100644 index 0000000..640323e --- /dev/null +++ b/rjp++/include/iterator.hpp @@ -0,0 +1,27 @@ +#ifndef RJP_ITERATOR_BASE_HPP +#define RJP_ITERATOR_BASE_HPP + +#include + +#include "member.hpp" +#include "value.hpp" + +namespace rjp::detail{ + class iterator_base + { + protected: + class value_wrapper + { + private: + member m_value; + public: + value_wrapper(RJP_value* value, bool managed): + m_value(value, managed){} + member* operator->(void){ + return &m_value; + } + }; + }; +} + +#endif diff --git a/rjp++/include/member.hpp b/rjp++/include/member.hpp new file mode 100644 index 0000000..edf379d --- /dev/null +++ b/rjp++/include/member.hpp @@ -0,0 +1,34 @@ +#ifndef RJP_MEMBER_HPP +#define RJP_MEMBER_HPP + +#include "value.hpp" +#include "string.hpp" +#include + +#include //move + +namespace rjp{ + + class member : public value + { + public: + member(void) = default; + member(const member&) = default; + member(member&&) = default; + member(const value& val): + value(val){} + member(value&& val): + value(std::move(val)){} + using value::value; + ~member(void) = default; + + member& operator=(const member&) = default; + member& operator=(member&&) = default; + + rexy::static_string key(void)const{return rexy::static_string(rjp_member_key(m_value)->value, rjp_member_key(m_value)->length);} + string steal_key(void){return string(m_value);} + }; + +} + +#endif diff --git a/rjp++/include/object.hpp b/rjp++/include/object.hpp new file mode 100644 index 0000000..d3a1d7d --- /dev/null +++ b/rjp++/include/object.hpp @@ -0,0 +1,73 @@ +#ifndef RJP_OBJECT_HPP +#define RJP_OBJECT_HPP + +#include "value.hpp" +#include "integral.hpp" +#include "string.hpp" +#include "string_val.hpp" +#include "iterator.hpp" +#include +#include + +namespace rjp{ + + class object_iterator : protected detail::iterator_base + { + protected: + RJP_object_iterator m_it; + + public: + object_iterator(void); + object_iterator(RJP_value* v); + object_iterator(const object_iterator&) = delete; + object_iterator(object_iterator&& o); + ~object_iterator(void); + object_iterator& operator=(const object_iterator&) = delete; + object_iterator& operator=(object_iterator&& o); + + bool operator==(const object_iterator& o)const; + bool operator!=(const object_iterator& o)const; + member operator*(void)const; + value_wrapper operator->(void)const; + + object_iterator& operator++(void); + }; + + class object : public value + { + public: + using iterator = object_iterator; + using const_iterator = const iterator; + public: + using value::value; + object(void); + object(const value& val); + object(value&& val); + + object(const object&) = default; + object(object&&) = default; + ~object(void) = default; + object& operator=(const object&) = default; + object& operator=(object&&) = default; + + member add(const rexy::string_base& key); + + value remove(const rexy::string_base& key); + value& remove(value& val); + + void destroy(const rexy::string_base& key); + void destroy(value&& val); + + bool has_child(const value&); + + iterator begin(void); + const_iterator begin(void)const; + iterator end(void)const; + + value search(const rexy::string_base& key); + + }; + +} + +#endif diff --git a/rjp++/include/rjp.hpp b/rjp++/include/rjp.hpp index df28529..841dc16 100644 --- a/rjp++/include/rjp.hpp +++ b/rjp++/include/rjp.hpp @@ -1,407 +1,14 @@ -/** - rjp++ - Copyright (C) 2020 rexy712 - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - #ifndef RJP_HPP_INCLUDED #define RJP_HPP_INCLUDED -#include -#include - -#include //move - -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 - { - public: - string(const string&) = default; - string(string&&) = default; - string& operator=(const string&) = default; - string& operator=(string&&) = default; - - using rexy::string_intermediary::string_intermediary; - string(RJP_value* r); - using rexy::string_intermediary::operator=; - string& operator=(RJP_value* r); - }; - - class value - { - protected: - RJP_value* m_value; - bool m_managed = true; - - public: - value(void); - explicit value(RJP_value* val, bool managed); - value(const value& val); - value(value&& val); - ~value(void); - - value& operator=(const value& val); - value& operator=(value&& val); - - const RJP_value* raw(void)const; - RJP_value* raw(void); - - RJP_data_type type(void)const; - - value parent(void)const; - bool is_child_of(const value&)const; - - string to_json(int flags = RJP_FORMAT_PRETTY); - protected: - static value create_unmanaged(RJP_value* val); - static value create_managed(RJP_value* val); - static void remove_management(value& val); - static void add_management(value& val); - }; - - class integer : public value - { - public: - using underlying_type = RJP_int; - public: - using value::value; - integer(underlying_type i); - integer(void); - integer(const value& val); - integer(value&& val); - integer(const value& val, underlying_type i); - integer(value&& val, underlying_type i); - - integer(const integer&) = default; - integer(integer&&) = default; - ~integer(void) = default; - integer& operator=(const integer&) = default; - integer& operator=(integer&&) = default; - - underlying_type get(void)const; - void set(underlying_type i); - - }; - class dfloat : public value - { - public: - using underlying_type = RJP_float; - public: - using value::value; - dfloat(underlying_type i); - dfloat(void); - dfloat(const value& val); - dfloat(value&& val); - dfloat(const value& val, underlying_type i); - dfloat(value&& val, underlying_type i); - - dfloat(const dfloat&) = default; - dfloat(dfloat&&) = default; - ~dfloat(void) = default; - dfloat& operator=(const dfloat&) = default; - dfloat& operator=(dfloat&&) = default; - - underlying_type get(void)const; - void set(underlying_type i); - }; - class boolean : public value - { - public: - using underlying_type = RJP_bool; - public: - using value::value; - boolean(underlying_type i); - boolean(void); - boolean(const value& val); - boolean(value&& val); - boolean(const value& val, underlying_type i); - boolean(value&& val, underlying_type i); - - boolean(const boolean&) = default; - boolean(boolean&&) = default; - ~boolean(void) = default; - boolean& operator=(const boolean&) = default; - boolean& operator=(boolean&&) = default; - - bool get(void)const; - void set(bool i); - }; - class null : public value - { - public: - using value::value; - null(void); - null(const value& val); - null(value&& val); - - null(const null&) = default; - null(null&&) = default; - ~null(void) = default; - null& operator=(const null&) = default; - null& operator=(null&&) = default; - - }; - - class string_val : public value - { - public: - using underlying_type = RJP_string; - public: - using value::value; - string_val(const rexy::string_base& str); - string_val(string&& str); - string_val(void); - string_val(const value& val); - string_val(value&& val); - string_val(const value& val, const rexy::string_base& i); - string_val(value&& val, const rexy::string_base& i); - string_val(const value& val, string&& i); - string_val(value&& val, string&& i); - - string_val(const string_val&) = default; - string_val(string_val&&) = default; - ~string_val(void) = default; - string_val& operator=(const string_val&) = default; - string_val& operator=(string_val&&) = default; - - rexy::static_string get(void)const; - string steal(void); - void set(const rexy::string_base& str); - void set(string&& str); - - }; - - class member : public value - { - public: - member(void) = default; - member(const member&) = default; - member(member&&) = default; - member(const value& val): - value(val){} - member(value&& val): - value(std::move(val)){} - using value::value; - ~member(void) = default; - - member& operator=(const member&) = default; - member& operator=(member&&) = default; - - rexy::static_string key(void)const{return rexy::static_string(rjp_member_key(m_value)->value, rjp_member_key(m_value)->length);} - string steal_key(void){return string(m_value);} - }; - class iterator_base - { - protected: - class value_wrapper - { - private: - member m_value; - public: - value_wrapper(RJP_value* value, bool managed): - m_value(value, managed){} - member* operator->(void){ - return &m_value; - } - }; - }; - class object_iterator : protected iterator_base - { - protected: - RJP_object_iterator m_it; - - public: - object_iterator(void); - object_iterator(RJP_value* v); - object_iterator(const object_iterator&) = delete; - object_iterator(object_iterator&& o); - ~object_iterator(void); - object_iterator& operator=(const object_iterator&) = delete; - object_iterator& operator=(object_iterator&& o); - - bool operator==(const object_iterator& o)const; - bool operator!=(const object_iterator& o)const; - member operator*(void)const; - value_wrapper operator->(void)const; - - object_iterator& operator++(void); - }; - - class object : public value - { - public: - using iterator = object_iterator; - using const_iterator = const iterator; - public: - using value::value; - object(void); - object(const value& val); - object(value&& val); - - object(const object&) = default; - object(object&&) = default; - ~object(void) = default; - object& operator=(const object&) = default; - object& operator=(object&&) = default; - - template - T add(rjp::string&& key, typename T::underlying_type i){ - RJP_value* newmemb = rjp_add_member(m_value, key.get(), key.length()); - key.release(); - return T(create_unmanaged(newmemb), i); - } - member add(const rexy::string_base& key); - member add(const rexy::string_base& key, const rexy::string_base& val); - member add(const rexy::string_base& key, string&& val); - member add(string&& key, const rexy::string_base& val); - member add(string&& key, string&& val); - - value remove(const rexy::string_base& key); - value& remove(value& val); - - void destroy(const rexy::string_base& key); - void destroy(value&& val); - - bool has_child(const value&); - - iterator begin(void); - const_iterator begin(void)const; - iterator end(void)const; - - value search(const rexy::string_base& key); - - }; - - class array_iterator : protected iterator_base - { - protected: - RJP_array_iterator m_it; - - public: - array_iterator(void) = default; - array_iterator(RJP_value* v); - array_iterator(const array_iterator&) = delete; - array_iterator(array_iterator&& a); - ~array_iterator(void); - array_iterator& operator=(const array_iterator&) = delete; - array_iterator& operator=(array_iterator&& o); - - bool operator==(const array_iterator& o)const; - bool operator!=(const array_iterator& o)const; - value operator*(void)const; - value_wrapper operator->(void)const; - - array_iterator& operator++(void); - }; - class array : public value - { - public: - using iterator = array_iterator; - using const_iterator = const iterator; - public: - using value::value; - array(void); - array(const value& val); - array(value&& val); - - array(const array&) = default; - array(array&&) = default; - ~array(void) = default; - array& operator=(const array&) = default; - array& operator=(array&&) = default; - - value add(void); - string_val add(const rexy::string_base& val); - string_val add(string&& val); - template - T add(typename T::underlying_type i){ - RJP_value* newelem = rjp_add_element(m_value); - return T(create_unmanaged(newelem), i); - } - - value& remove(value& val); - void destroy(value&& val); - - iterator begin(void); - iterator end(void); - const_iterator begin(void)const; - const_iterator end(void)const; - }; - - - string to_json(const value& val, int format = RJP_FORMAT_PRETTY); - value parse_json(const rexy::string_base& str); - value parse_json(const char* str); - - namespace detail{ - template,std::remove_reference_t>::value> - struct convert_helper; - template - struct convert_helper{ - static To perform(From&& t){ - return To(std::move(t)); - } - }; - template - struct convert_helper{ - static To perform(const From& t){ - return To(const_cast(t.raw()), false); - } - }; - template - struct convert_helper{ - static decltype(auto) perform(From&& t){ - return std::forward(t); - } - }; - } - - template - To convert(From&& from){ - return detail::convert_helper::perform(std::forward(from)); - } - - namespace detail{ - template - struct get_ref{ - using type = std::remove_reference_t; - }; - template - struct get_ref{ - using type = std::remove_reference_t&; - }; - template - struct get_ref{ - using type = std::remove_reference_t&&; - }; - } - - template - decltype(auto) cast(From&& from){ - return static_cast::type>(std::forward(from)); - } -} +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif diff --git a/rjp++/include/rjp_internal.hpp b/rjp++/include/rjp_internal.hpp new file mode 100644 index 0000000..ef9e1b3 --- /dev/null +++ b/rjp++/include/rjp_internal.hpp @@ -0,0 +1,83 @@ +/** + rjp++ + Copyright (C) 2020 rexy712 + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifndef RJP_HPP_INTERNAL +#define RJP_HPP_INTERNAL + +#include +#include "string.hpp" +#include "value.hpp" + +#include //move + +namespace rjp{ + + string to_json(const value& val, int format = RJP_FORMAT_PRETTY); + value parse_json(const rexy::string_base& str); + value parse_json(const char* str); + + namespace detail{ + template,std::remove_reference_t>::value> + struct convert_helper; + template + struct convert_helper{ + static To perform(From&& t){ + return To(std::move(t)); + } + }; + template + struct convert_helper{ + static To perform(const From& t){ + return To(const_cast(t.raw()), false); + } + }; + template + struct convert_helper{ + static decltype(auto) perform(From&& t){ + return std::forward(t); + } + }; + } + + template + To convert(From&& from){ + return detail::convert_helper::perform(std::forward(from)); + } + + namespace detail{ + template + struct get_ref{ + using type = std::remove_reference_t; + }; + template + struct get_ref{ + using type = std::remove_reference_t&; + }; + template + struct get_ref{ + using type = std::remove_reference_t&&; + }; + } + + template + decltype(auto) cast(From&& from){ + return static_cast::type>(std::forward(from)); + } +} + +#endif diff --git a/rjp++/include/string.hpp b/rjp++/include/string.hpp new file mode 100644 index 0000000..79d4510 --- /dev/null +++ b/rjp++/include/string.hpp @@ -0,0 +1,34 @@ +#ifndef RJP_STRING_HPP +#define RJP_STRING_HPP + +#include +#include + +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 + { + public: + string(const string&) = default; + string(string&&) = default; + string& operator=(const string&) = default; + string& operator=(string&&) = default; + + using rexy::string_intermediary::string_intermediary; + string(RJP_value* r); + using rexy::string_intermediary::operator=; + string& operator=(RJP_value* r); + }; + +} + +#endif diff --git a/rjp++/include/string_val.hpp b/rjp++/include/string_val.hpp new file mode 100644 index 0000000..b26988b --- /dev/null +++ b/rjp++/include/string_val.hpp @@ -0,0 +1,42 @@ +#ifndef RJP_STRING_VAL_HPP +#define RJP_STRING_VAL_HPP + +#include +#include +#include "string.hpp" +#include "value.hpp" + +namespace rjp{ + + class string_val : public value + { + public: + using underlying_type = RJP_string; + public: + using value::value; + string_val(const rexy::string_base& str); + string_val(string&& str); + string_val(void); + string_val(const value& val); + string_val(value&& val); + string_val(const value& val, const rexy::string_base& i); + string_val(value&& val, const rexy::string_base& i); + string_val(const value& val, string&& i); + string_val(value&& val, string&& i); + + string_val(const string_val&) = default; + string_val(string_val&&) = default; + ~string_val(void) = default; + string_val& operator=(const string_val&) = default; + string_val& operator=(string_val&&) = default; + + rexy::static_string get(void)const; + string steal(void); + void set(const rexy::string_base& str); + void set(string&& str); + + }; + +} + +#endif diff --git a/rjp++/include/value.hpp b/rjp++/include/value.hpp new file mode 100644 index 0000000..2f40f12 --- /dev/null +++ b/rjp++/include/value.hpp @@ -0,0 +1,43 @@ +#ifndef RJP_VALUE_HPP +#define RJP_VALUE_HPP + +#include +#include "string.hpp" + +namespace rjp{ + + class value + { + protected: + RJP_value* m_value; + bool m_managed = true; + + public: + value(void); + explicit value(RJP_value* val, bool managed); + value(const value& val); + value(value&& val); + ~value(void); + + value& operator=(const value& val); + value& operator=(value&& val); + + const RJP_value* raw(void)const; + RJP_value* raw(void); + + RJP_data_type type(void)const; + + value parent(void)const; + bool is_child_of(const value&)const; + + string to_json(int flags = RJP_FORMAT_PRETTY); + protected: + static value create_unmanaged(RJP_value* val); + static value create_managed(RJP_value* val); + static void remove_management(value& val); + static void add_management(value& val); + }; + +} + +#endif diff --git a/rjp++/src/allocator.cpp b/rjp++/src/allocator.cpp index 05c571f..c767c7b 100644 --- a/rjp++/src/allocator.cpp +++ b/rjp++/src/allocator.cpp @@ -16,7 +16,8 @@ along with this program. If not, see . */ -#include +#include "rjp.h" +#include "string.hpp" #include //memcpy namespace rjp::detail{ diff --git a/rjp++/src/array.cpp b/rjp++/src/array.cpp index 751f5a7..61cf623 100644 --- a/rjp++/src/array.cpp +++ b/rjp++/src/array.cpp @@ -16,7 +16,8 @@ along with this program. If not, see . */ -#include +#include "array.hpp" +#include "rjp.h" #include //move, swap namespace rjp{ diff --git a/rjp++/src/integral.cpp b/rjp++/src/integral.cpp index b4e776a..9c45a84 100644 --- a/rjp++/src/integral.cpp +++ b/rjp++/src/integral.cpp @@ -16,7 +16,8 @@ along with this program. If not, see . */ -#include +#include "integral.hpp" +#include "rjp.h" #include //move namespace rjp{ diff --git a/rjp++/src/object.cpp b/rjp++/src/object.cpp index 8a40e82..50e41dc 100644 --- a/rjp++/src/object.cpp +++ b/rjp++/src/object.cpp @@ -16,8 +16,8 @@ along with this program. If not, see . */ -#include -#include +#include "object.hpp" +#include "rjp.h" #include //move namespace rjp{ @@ -39,30 +39,6 @@ namespace rjp{ RJP_value* newmemb = rjp_add_member_key_copy(m_value, key.get(), key.length()); return create_unmanaged(newmemb); } - member object::add(const rexy::string_base& key, const rexy::string_base& val){ - RJP_value* newmemb = rjp_add_member_key_copy(m_value, key.get(), key.length()); - rjp_set_string_copy(newmemb, val.get(), val.length()); - return create_unmanaged(newmemb); - } - member object::add(const rexy::string_base& key, string&& val){ - RJP_value* newmemb = rjp_add_member_key_copy(m_value, key.get(), key.length()); - auto len = val.length(); - rjp_set_string(newmemb, val.release(), len); - return create_unmanaged(newmemb); - } - member object::add(string&& key, const rexy::string_base& val){ - auto keylen = key.length(); - RJP_value* newmemb = rjp_add_member(m_value, key.release(), keylen); - rjp_set_string_copy(newmemb, val.get(), val.length()); - return create_unmanaged(newmemb); - } - member object::add(string&& key, string&& val){ - auto keylen = key.length(); - auto len = val.length(); - RJP_value* newmemb = rjp_add_member(m_value, key.release(), keylen); - rjp_set_string(newmemb, val.release(), len); - return create_unmanaged(newmemb); - } value object::remove(const rexy::string_base& key){ RJP_value* removed = rjp_remove_member_by_key(m_value, key.get()); diff --git a/rjp++/src/rjp.cpp b/rjp++/src/rjp.cpp index 5d31517..9be5e44 100644 --- a/rjp++/src/rjp.cpp +++ b/rjp++/src/rjp.cpp @@ -16,7 +16,8 @@ along with this program. If not, see . */ -#include +#include "rjp_internal.hpp" +#include "value.hpp" namespace rjp{ diff --git a/rjp++/src/string.cpp b/rjp++/src/string.cpp index 96ef3f4..d972c42 100644 --- a/rjp++/src/string.cpp +++ b/rjp++/src/string.cpp @@ -16,8 +16,9 @@ along with this program. If not, see . */ -#include -#include +#include +#include "rjp.h" +#include "string.hpp" #include //exchange namespace rjp{ diff --git a/rjp++/src/string_val.cpp b/rjp++/src/string_val.cpp index 28d346b..058e23e 100644 --- a/rjp++/src/string_val.cpp +++ b/rjp++/src/string_val.cpp @@ -16,8 +16,8 @@ along with this program. If not, see . */ -#include -#include +#include "string_val.hpp" +#include "rjp.h" #include //move namespace rjp{ diff --git a/rjp++/src/value.cpp b/rjp++/src/value.cpp index 091e1cb..090025b 100644 --- a/rjp++/src/value.cpp +++ b/rjp++/src/value.cpp @@ -16,7 +16,8 @@ along with this program. If not, see . */ -#include +#include "value.hpp" +#include "rjp.h" #include //swap, move, exchange namespace rjp{