309 Commits

Author SHA1 Message Date
Takatoshi Kondo
ea23bf843e Added std::forward_list support.
Fixed cmake filename typo.
2014-08-10 23:45:50 +09:00
Takatoshi Kondo
0bc4b3f599 Added the C++11 std::array support.
std::array<char, N> is mapped to BIN. That is the same mannar as std::vector.
2014-08-10 23:06:30 +09:00
Takatoshi Kondo
9a1ccaf155 Merge pull request #100 from redboltz/add_vector_char_as_bin
vector<char> is mapped to BIN
2014-08-10 21:52:02 +09:00
Takatoshi Kondo
0201c21b9a Added minimum copy/reference threshold.
Even if ref_size is given on vrefbuffer's constructor, the minimum size of vrefbuffer::ref_buffer is 10.
Because int64, uint64, and double's msgpack expression size equals 9, and those buffer is allocated on the stack internally.
2014-08-08 14:28:03 +09:00
Takatoshi Kondo
0a99b9f933 Fixed the problem that reference function doesn't pass correctly.
Fixed referenced flag writing timing on next(). It should place before flush.
Added msgpack_tuple test for CMakeLists.txt
Untabified CMakeLists.txt
Added reference function test.
2014-08-07 23:26:09 +09:00
Takatoshi Kondo
1f5d6b9cac Added EXT support.
Removed obsolete unpack functions.
Updated examples that no longer use obsolete functions.
Added reference checking function to unpacked. ( unpacked::referenced() )
Added std:: namespace.
Added reference or copy choice function and default behavior:
  When you use unpacker, default behavior is:
    STR, BIN, EXT types are always held by reference.
  When you don't use unpacker, default behavior is:
    STR, BIN, EXT types are always held by copy.
    The memory is allocated from zone.
  You can customize the behavior passing your custom judging function to unpack() or unpacker's constructor.
2014-08-06 16:18:37 +09:00
Takatoshi Kondo
15a0d61a64 Added the new mapping:
std::vector<char> is mapped to BIN.

So, currently BIN, STR, and ARRAY mappings are as follows:
  std::vector<char> is mapped to BIN
  std::string       is mapped to STR
  std::vector<T>    is mapped to ARRAY // T is not char
2014-08-04 15:14:39 +09:00
Takatoshi Kondo
66014eebc0 Updated test codes using recommended interface.
They used to use obsolete interfaces.
2014-08-04 01:08:05 +09:00
Takatoshi Kondo
fd566afeb4 Added reference version of unpacker::next(). 2014-08-04 00:52:04 +09:00
Takatoshi Kondo
55bf279a7c Removed obsolete unpack interface from test codes. 2014-08-03 08:08:08 +09:00
Takatoshi Kondo
78e8cbdfb5 Cleaned up pointer and reference versions of unpack(). 2014-08-03 07:09:03 +09:00
Takatoshi Kondo
f11a811114 Added a move constructor and a move assign operator for unpacker and context.
https://github.com/msgpack/msgpack-c/issues/96
2014-07-23 21:32:45 +09:00
Takatoshi Kondo
0380215982 Fixed https://github.com/msgpack/msgpack-c/issues/88
Added examples for the following updated functions:

msgpack_unpack_return msgpack_unpacker_next(msgpack_unpacker* mpac, msgpack_unpacked* result);

msgpack_unpack_return
msgpack_unpack_next(msgpack_unpacked* result,
        const char* data, size_t len, size_t* off);
2014-07-13 09:35:58 +09:00
Takatoshi Kondo
b0df21295c Untabified.
Adjust line break positions.
2014-07-12 00:17:31 +09:00
Takatoshi Kondo
212f025f00 Supported the C++11's enum class. 2014-07-08 19:31:02 +09:00
Takatoshi Kondo
f6a5402194 Supported the C++11 tuple. 2014-07-08 19:18:43 +09:00
Takatoshi Kondo
bc33317b7e Reorganized tree. 2014-07-07 16:31:29 +09:00
Takatoshi Kondo
3b7a2f8f32 Updated test codes using reference version of unpack functions. 2014-07-07 16:19:31 +09:00
Takatoshi Kondo
ed51d23335 Refined tuple implementation. 2014-07-07 16:19:31 +09:00
Takatoshi Kondo
beebccd323 Renamed zone::malloc familiy functions. 2014-07-07 16:17:59 +09:00
Takatoshi Kondo
d70c44b723 Added bin and str families support. 2014-07-07 16:17:59 +09:00
Takatoshi Kondo
b6b2ef5e57 Removed the last comma at enum definitions to support C++03 strictly. 2014-07-07 16:17:58 +09:00
Takatoshi Kondo
4ef69da25d Restored the test cases using pointer based interfaces.
It assures that we can use the same interfaces as the original version(0.5.6).
To support both C++03 and C++11, I introduced msgpack::unique_ptr and msgpack::move() in test codes.
2014-07-07 16:17:58 +09:00
Takatoshi Kondo
415b14335f Modified the parameter of object::convert() from pointer to reference. 2014-07-07 16:17:58 +09:00
Takatoshi Kondo
27629a8dd6 Modified 'unpacked' interface using references instead of pointers.
Added speed test for 'unpacked' based unpack() function.
2014-07-07 16:17:58 +09:00
Takatoshi Kondo
bad3801eae Modified zone* to zone&. 2014-07-07 16:17:58 +09:00
Takatoshi Kondo
56b0ad6809 Modified passed by value of object to const reference of object.
Modified object pointers to object references.
This modification has increased unpack speed.
2014-07-07 16:17:58 +09:00
Takatoshi Kondo
e80cbd4437 Tests for msgpack::type::tuple C++11 expansion moved to __cplusplus >= 201103. 2014-07-07 16:17:58 +09:00
Takatoshi Kondo
da601e4589 Added member fucntion version of msgpack::type::tuple::get().
Added support functions for msgpack::type::tuple as same as std::tuple.
2014-07-07 16:17:58 +09:00
Takatoshi Kondo
5b3a168b86 Supported C++03. 2014-07-07 16:16:29 +09:00
Takatoshi Kondo
c2ca709d68 Added header files that use c++11 variadic templates instead of ruby code generation.
When the compiler configured to support C++11 (e.g. CXXFLAG contains -std=c++11 is given),
those files are used.
Decoupled unpacker and msgpack_unpacker.
This modification introduced C++11 dependency such as nullptr and unique_ptr.
I will support C++11 and C++03, finally.

Decoupled msgpack.hpp and msgpack.h.

Decoupled sbuffer from msgpack_sbuffer.

Decoupled vrefbuffer from msgpack_vrefbuffer.

Decoupled zbuffer from msgpack_zbuffer.

Added some z_stream initialization.

Removed unpack macros.

Removed CTX_CAST and CTX_REFERENCED.

Embed ctx_ as a member variable (not a pointer).

Modified zone free using C++ way.
2014-07-07 16:16:29 +09:00
Nobuyuki Kubota
f50148a9cc Merge branch 'fbuffer' 2014-07-02 17:53:18 +09:00
Nobuyuki Kubota
9d8e6b92fc Add fclose to fbuffer's tests 2014-07-02 17:35:15 +09:00
Takatoshi Kondo
3104f7e451 Added -O3 -g option for gcc and clang. Improved compiler checking method. 2014-06-21 19:00:59 +09:00
Takatoshi Kondo
6daef66ea7 Added warning flags. 2014-06-21 11:11:32 +09:00
Takatoshi Kondo
06930616b2 Added cmake files.
https://github.com/msgpack/msgpack-c/pull/20
Removed 'preprocess' from original CMakeLists.txt.
Removed file copy from original CMakeLists.txt.

Removed 'preprocess' from bootstrap.
Removed file copy from bootstrap.

Added erb generated files. Ruby is no longer required.
Moved cases.mpac, cases_compact.mpa, pack_define.h,
pack_template.h, unpack_define.h, unpack_template.h,
and sysdep.h to apropriate location.

If you want to re-generate zone.hpp, define.hpp, and tuple.hpp,
then you execute preprocess.
2014-06-05 20:49:15 +00:00
Takatoshi Kondo
12e8615ac5 Fixed dereferencing type-punned pointer will break strict-aliasing rules warning. 2014-03-31 16:37:29 +09:00
ovz
977eab7c4a Fixed failing test zone_allocate_constructor.
Corrected a typo in definition of myclass constructor with parameters.
2014-03-18 14:25:55 -07:00
Takatoshi Kondo
14ee1e5827 Removed C++11 features 2014-03-02 14:14:04 +00:00
Nobuyuki Kubota
98c5767372 Merge branch 'redboltz/add_integer_to_float_conv' 2014-02-28 15:53:11 +09:00
Nobuyuki Kubota
97a7b7545a Refactored test cases with type parameterized test 2014-02-28 15:52:36 +09:00
Takatoshi Kondo
b8076fa71f Supported VC++. Fixed testing macro for tr1 containers. 2014-02-27 23:54:48 +00:00
Takatoshi Kondo
260ce4aa1d Added object that has integer to float and double converter. 2014-01-21 21:12:13 +00:00
Nobuyuki Kubota
bdb397e043 Merge pull request #36 from redboltz/support_plain_char
Supported 'plain' char.
2013-12-22 11:19:19 -08:00
Takatoshi Kondo
229467cb29 Added a test and speed test examples for #37. 2013-12-08 10:39:13 +00:00
Vladimir Volodko
2c1a1fd4f8 Add C/C++ FILE* buffer adaptor.
* add function msgpack_fbuffer_write();
* add class msgpack::fbuffer;
* add tests buffer.fbuffer and buffer.fbuffer_c .
2013-11-22 12:57:30 +07:00
Takatoshi Kondo
09d90e1231 Supported 'plain' char.
Note: char, signed char, and unsigned char are three different types.
2013-10-31 13:19:22 +09:00
Takatoshi Kondo
5a9f89ae1f Added libgtest.a for make check 2013-10-29 13:35:26 +09:00
Takatoshi Kondo
6cca6cb20d Added the casts for the byte data. 2013-08-30 12:57:20 +09:00
Takatoshi Kondo
88356b79be Fixed malloc delete unmatch bug. 2013-08-27 09:37:42 +09:00