summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarsh Sharma <harsh.sharma@multitech.com>2019-12-10 12:18:18 -0600
committerHarsh Sharma <harsh.sharma@multitech.com>2019-12-10 12:18:18 -0600
commit66b9c65b64e08b477ff598aa9cae19c06507899d (patch)
tree135e9465824a0e95e6649d3bf44bf214fde63369
parent5522157b8e9ceb349d4a478698738885fa9c6273 (diff)
downloadmts-io-66b9c65b64e08b477ff598aa9cae19c06507899d.tar.gz
mts-io-66b9c65b64e08b477ff598aa9cae19c06507899d.tar.bz2
mts-io-66b9c65b64e08b477ff598aa9cae19c06507899d.zip
Revert "Initial commit"
This reverts commit 5522157b8e9ceb349d4a478698738885fa9c6273
-rw-r--r--io-tool/Makefile122
-rw-r--r--io-tool/README.md9
-rw-r--r--io-tool/change.log5
-rw-r--r--io-tool/include/General.h57
-rw-r--r--io-tool/include/Version.h25
-rw-r--r--io-tool/include/rapidjson/allocators.h290
-rw-r--r--io-tool/include/rapidjson/cursorstreamwrapper.h78
-rw-r--r--io-tool/include/rapidjson/document.h2652
-rw-r--r--io-tool/include/rapidjson/encodedstream.h299
-rw-r--r--io-tool/include/rapidjson/encodings.h716
-rw-r--r--io-tool/include/rapidjson/error/en.h74
-rw-r--r--io-tool/include/rapidjson/error/error.h161
-rw-r--r--io-tool/include/rapidjson/filereadstream.h99
-rw-r--r--io-tool/include/rapidjson/filewritestream.h104
-rw-r--r--io-tool/include/rapidjson/fwd.h151
-rw-r--r--io-tool/include/rapidjson/internal/biginteger.h290
-rw-r--r--io-tool/include/rapidjson/internal/diyfp.h271
-rw-r--r--io-tool/include/rapidjson/internal/dtoa.h245
-rw-r--r--io-tool/include/rapidjson/internal/ieee754.h78
-rw-r--r--io-tool/include/rapidjson/internal/itoa.h308
-rw-r--r--io-tool/include/rapidjson/internal/meta.h186
-rw-r--r--io-tool/include/rapidjson/internal/pow10.h55
-rw-r--r--io-tool/include/rapidjson/internal/regex.h740
-rw-r--r--io-tool/include/rapidjson/internal/stack.h232
-rw-r--r--io-tool/include/rapidjson/internal/strfunc.h69
-rw-r--r--io-tool/include/rapidjson/internal/strtod.h290
-rw-r--r--io-tool/include/rapidjson/internal/swap.h46
-rw-r--r--io-tool/include/rapidjson/istreamwrapper.h128
-rw-r--r--io-tool/include/rapidjson/memorybuffer.h70
-rw-r--r--io-tool/include/rapidjson/memorystream.h71
-rw-r--r--io-tool/include/rapidjson/msinttypes/inttypes.h316
-rw-r--r--io-tool/include/rapidjson/msinttypes/stdint.h300
-rw-r--r--io-tool/include/rapidjson/ostreamwrapper.h81
-rw-r--r--io-tool/include/rapidjson/pointer.h1414
-rw-r--r--io-tool/include/rapidjson/prettywriter.h277
-rw-r--r--io-tool/include/rapidjson/rapidjson.h656
-rw-r--r--io-tool/include/rapidjson/reader.h2230
-rw-r--r--io-tool/include/rapidjson/schema.h2497
-rw-r--r--io-tool/include/rapidjson/stream.h223
-rw-r--r--io-tool/include/rapidjson/stringbuffer.h121
-rw-r--r--io-tool/include/rapidjson/writer.h709
-rw-r--r--io-tool/src/MtsIo.cpp413
-rw-r--r--io-tool/src/Version.cpp4
43 files changed, 0 insertions, 17162 deletions
diff --git a/io-tool/Makefile b/io-tool/Makefile
deleted file mode 100644
index 234ac4b..0000000
--- a/io-tool/Makefile
+++ /dev/null
@@ -1,122 +0,0 @@
-# set up environment for building outside bitbake
-# run: make MANUAL_BUILD=1
-# run: make strip MANUAL_BUILD=1
-ifdef MANUAL_BUILD
-
-ifndef OETREE
-$(error Please set OETREE variable)
-endif
-
-HOST_ARCH=$(shell uname -m)
-CCDIR = $(OETREE)/build/tmp/sysroots/$(HOST_ARCH)-linux/usr/arm926ejste/bin
-INCDIR = $(OETREE)/build/tmp/sysroots/arm926ejste-mlinux-linux-gnueabi/usr/include
-CROSS_COMPILE=$(CCDIR)/arm-mlinux-linux-gnueabi-
-
-export AS = $(CROSS_COMPILE)as
-export LD = $(CROSS_COMPILE)ld
-export CC = $(CROSS_COMPILE)gcc
-export CPP = $(CROSS_COMPILE)g++
-export CXX = $(CROSS_COMPILE)g++
-export AR = $(CROSS_COMPILE)ar
-export NM = $(CROSS_COMPILE)nm
-export STRIP = $(CROSS_COMPILE)strip
-export OBJCOPY = $(CROSS_COMPILE)objcopy
-export OBJDUMP = $(CROSS_COMPILE)objdump
-export RANLIB = $(CROSS_COMPILE)ranlib
-export CFLAGS += -march=arm926ejste -mtune=arm926ej-s -mthumb-interwork -mno-thumb -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb2
-endif
-
-BUILDDIR=build
-SOURCEDIR=src
-
-# -g -pg | profiling options
-
-CFLAGS += -Werror -Wno-unused-function
-CXXFLAGS += -std=c++11 -Wno-unused-function
-
-LIBS := -lmts -ljsoncpp -lrt
-
-INC=-Iinclude -Iinclude/Utility
-SOURCES = $(wildcard $(SOURCEDIR)/**/*.cpp)
-SOURCES += $(wildcard $(SOURCEDIR)/**/*.c)
-SOURCES += $(SOURCEDIR)/Version.cpp
-OBJS1 = $(patsubst $(SOURCEDIR)/%.cpp,$(BUILDDIR)/%.o,$(SOURCES))
-OBJS = $(patsubst $(SOURCEDIR)/%.c,$(BUILDDIR)/%.o,$(OBJS1))
-CPP_DEPPS1 = $(patsubst $(SOURCEDIR)/%.cpp,$(BUILDDIR)/%.d,$(SOURCES))
-CPP_DEPPS = $(patsubst $(SOURCEDIR)/%.c,$(BUILDDIR)/%.d,$(CPP_DEPPS1))
-CPP_DEPPS = $(BUILDDIR)/MtsIo.d
-
-JS_OBJS = $(BUILDDIR)/Version.o
-
-ifndef MTS_CHECK
-MTS_CHECK := 1
-endif
-
-
-
-.PHONY: all clean
-
-all: postbuild
-
-prebuild:
- @echo PRE-BUILD
- @echo 'Removing previous version components started'
- -$(RM) $(BUILDDIR)/Version.o
- -$(RM) $(BUILDDIR)/Version.d
- -$(RM) $(SOURCEDIR)/Version.cpp
- @echo 'Removing previous version components complete'
- ${MKDIR_P} ${OUT_DIRS}
- @echo ' '
-
-postbuild: mainbuild
- @echo POST-BUILD
- @echo ' '
-
-mainbuild: prebuild
- @echo MAIN-BUILD
- @$(MAKE) --no-print-directory mts-io
-
-mts-io: $(OBJS) $(BUILDDIR)/MtsIo.o
- @echo 'Building target: $@'
- $(CXX) $(CFLAGS) $(INC) $(LDFLAGS) -o $(BUILDDIR)/mts-io $(OBJS) $(BUILDDIR)/MtsIo.o $(LIBS)
- @echo 'Finished building target: $@'
- @echo ' '
-
-$(BUILDDIR)/%.o: $(SOURCEDIR)/%.cpp
- @echo 'Building file: $<'
- $(CXX) $(CFLAGS) $(INC) -Wall -std=c++11 -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
- @echo 'Finished building: $<'
- @echo ' '
-
-$(BUILDDIR)/Version.o: $(SOURCEDIR)/Version.cpp
- @echo 'Building file: $<'
- $(CXX) $(CFLAGS) $(INC) -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
- @echo 'Finished building: $<'
- @echo ' '
-
-$(SOURCEDIR)/Version.cpp:
- @echo 'Creating file: Version.cpp'
- /bin/echo -e "//Pre-Build Auto-Generated Source\n#include \"Version.h\"\n\nconst std::string Version::version(\"$(shell git describe)\");" > $(SOURCEDIR)/Version.cpp
- @echo 'Finished creating: Version.cpp'
- @echo ' '
-
-$(BUILDDIR)/MtsIo.o: $(SOURCEDIR)/MtsIo.cpp
- @echo 'Building file: $<'
- $(CXX) $(CFLAGS) $(INC) -Wall -std=c++11 -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" -DENABLE_MTS_CHECK=${MTS_CHECK}
- @echo 'Finished building: $<'
- @echo ' '
-
-install:
- mkdir -p $(DESTDIR)/opt/lora
-
-strip:
- $(STRIP) $(BUILDDIR)/mts-io
-
-clean:
- -$(RM) $(OBJS) $(CPP_DEPPS) $(BUILDDIR)/mts-io $(BUILDDIR)/MtsIo.o
- -@echo ' '
-
-.PHONY: all clean dependents
-.SECONDARY:
-
-
diff --git a/io-tool/README.md b/io-tool/README.md
deleted file mode 100644
index a96d645..0000000
--- a/io-tool/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# Dependencies
-
-Libs in Makefile
--lmts -lrt
-
-git clone http://git.multitech.net/cgi-bin/cgit.cgi/libmts.git/
-
-make
-sudo make install
diff --git a/io-tool/change.log b/io-tool/change.log
deleted file mode 100644
index ff4bba3..0000000
--- a/io-tool/change.log
+++ /dev/null
@@ -1,5 +0,0 @@
-==0.0.1==
-===Changes===
-* Initial Version
-
-===Known Issues===
diff --git a/io-tool/include/General.h b/io-tool/include/General.h
deleted file mode 100644
index 1b9ecb1..0000000
--- a/io-tool/include/General.h
+++ /dev/null
@@ -1,57 +0,0 @@
-#ifndef GENERAL_HPP
-#define GENERAL_HPP
-
-#ifdef _MSC_VER
-#pragma warning ( disable : 4514 4512 4710 4355)
-#endif
-
-typedef signed char sint8;
-typedef unsigned char uint8;
-typedef signed short sint16;
-typedef unsigned short uint16;
-typedef signed int sint32;
-typedef unsigned int uint32;
-typedef signed long long sint64;
-typedef unsigned long long uint64;
-typedef signed int sint; //32 bit - even on 64 bit machines
-typedef unsigned int uint; //32 bit - even on 64 bit machines
-
-#define memzero(ptr) memset(ptr,0,sizeof(*(ptr)))
-#define ArrayZero(ptr,elements) memset(ptr,0,sizeof(*(ptr)) * (elements))
-
-#include <mts/MTS_Text.h>
-#include <mts/MTS_Logger.h>
-#include <mts/MTS_System.h>
-#include <fstream>
-#include <iostream>
-#include <iomanip>
-#include <jsoncpp/json/json.h>
-#include <curl/curl.h>
-
-#include "rapidjson/document.h"
-#include "rapidjson/writer.h"
-#include "rapidjson/stringbuffer.h"
-#include "rapidjson/istreamwrapper.h"
-
-#define MAX_ACC_CARDS 4
-#define SYSFS_PLATFORM "/sys/devices/platform/mts-io/"
-#define RESET_SHORT_CMD "reset_short_handler"
-#define RESET_LONG_CMD "reset_long_handler"
-#define RESET_SHORT_SIGNAL "kill -l SIGUSR1"
-#define RESET_LONG_SIGNAL "kill -l SIGUSR2"
-#define VERBOSE false
-#define MTS_IO_CONTROLS_STATUS_LED false
-#define MTS_IO_CONTROLS_LS_LED false
-
-#define LEDS_GPIO_DIR "/sys/devices/platform/leds-gpio/leds/"
-
-
-#define LORA_1_5_AP1_FPGA_VERSION "mts-fpga-loader -p 1 -c | grep version | awk '{printf $4}'"
-#define LORA_1_5_AP2_FPGA_VERSION "mts-fpga-loader -p 2 -c | grep version | awk '{printf $4}'"
-#define LORA_2_1_FPGA_VERSION "mts-fpga-loader -g | grep version | awk '{printf $4}'"
-#define LORA_2_1_EXT_FPGA_VERSION "mts-fpga-loader -b 1 -g | grep version | awk '{printf $4}'"
-
-#endif
-
-
-
diff --git a/io-tool/include/Version.h b/io-tool/include/Version.h
deleted file mode 100644
index 04166af..0000000
--- a/io-tool/include/Version.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Version.h
- *
- * Created on: 2012-04-17
- * Author: smg
- */
-
-#ifndef VERSION_H_
-#define VERSION_H_
-
-#include <string>
-
-class Version {
- public:
-
- //Pre-build Step - Executed in Makefile -> May require calling "make pre-build"
- /*
- * echo -e "//Pre-Build Auto-Generated Source\n
- * #include \"Version.h\"\n\nconst std::string Version::version(\"$(shell git describe)\");"
- * > ../Version.cpp
- */
- static const std::string version;
-};
-
-#endif /* VERSION_H_ */
diff --git a/io-tool/include/rapidjson/allocators.h b/io-tool/include/rapidjson/allocators.h
deleted file mode 100644
index d906bf5..0000000
--- a/io-tool/include/rapidjson/allocators.h
+++ /dev/null
@@ -1,290 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// Unless required by applicable law or agreed to in writing, software distributed
-// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-// CONDITIONS OF ANY KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations under the License.
-
-#ifndef RAPIDJSON_ALLOCATORS_H_
-#define RAPIDJSON_ALLOCATORS_H_
-
-#include "rapidjson.h"
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-///////////////////////////////////////////////////////////////////////////////
-// Allocator
-
-/*! \class rapidjson::Allocator
- \brief Concept for allocating, resizing and freeing memory block.
-
- Note that Malloc() and Realloc() are non-static but Free() is static.
-
- So if an allocator need to support Free(), it needs to put its pointer in
- the header of memory block.
-
-\code
-concept Allocator {
- static const bool kNeedFree; //!< Whether this allocator needs to call Free().
-
- // Allocate a memory block.
- // \param size of the memory block in bytes.
- // \returns pointer to the memory block.
- void* Malloc(size_t size);
-
- // Resize a memory block.
- // \param originalPtr The pointer to current memory block. Null pointer is permitted.
- // \param originalSize The current size in bytes. (Design issue: since some allocator may not book-keep this, explicitly pass to it can save memory.)
- // \param newSize the new size in bytes.
- void* Realloc(void* originalPtr, size_t originalSize, size_t newSize);
-
- // Free a memory block.
- // \param pointer to the memory block. Null pointer is permitted.
- static void Free(void *ptr);
-};
-\endcode
-*/
-
-
-/*! \def RAPIDJSON_ALLOCATOR_DEFAULT_CHUNK_CAPACITY
- \ingroup RAPIDJSON_CONFIG
- \brief User-defined kDefaultChunkCapacity definition.
-
- User can define this as any \c size that is a power of 2.
-*/
-
-#ifndef RAPIDJSON_ALLOCATOR_DEFAULT_CHUNK_CAPACITY
-#define RAPIDJSON_ALLOCATOR_DEFAULT_CHUNK_CAPACITY (64 * 1024)
-#endif
-
-
-///////////////////////////////////////////////////////////////////////////////
-// CrtAllocator
-
-//! C-runtime library allocator.
-/*! This class is just wrapper for standard C library memory routines.
- \note implements Allocator concept
-*/
-class CrtAllocator {
-public:
- static const bool kNeedFree = true;
- void* Malloc(size_t size) {
- if (size) // behavior of malloc(0) is implementation defined.
- return std::malloc(size);
- else
- return NULL; // standardize to returning NULL.
- }
- void* Realloc(void* originalPtr, size_t originalSize, size_t newSize) {
- (void)originalSize;
- if (newSize == 0) {
- std::free(originalPtr);
- return NULL;
- }
- return std::realloc(originalPtr, newSize);
- }
- static void Free(void *ptr) { std::free(ptr); }
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// MemoryPoolAllocator
-
-//! Default memory allocator used by the parser and DOM.
-/*! This allocator allocate memory blocks from pre-allocated memory chunks.
-
- It does not free memory blocks. And Realloc() only allocate new memory.
-
- The memory chunks are allocated by BaseAllocator, which is CrtAllocator by default.
-
- User may also supply a buffer as the first chunk.
-
- If the user-buffer is full then additional chunks are allocated by BaseAllocator.
-
- The user-buffer is not deallocated by this allocator.
-
- \tparam BaseAllocator the allocator type for allocating memory chunks. Default is CrtAllocator.
- \note implements Allocator concept
-*/
-template <typename BaseAllocator = CrtAllocator>
-class MemoryPoolAllocator {
-public:
- static const bool kNeedFree = false; //!< Tell users that no need to call Free() with this allocator. (concept Allocator)
-
- //! Constructor with chunkSize.
- /*! \param chunkSize The size of memory chunk. The default is kDefaultChunkSize.
- \param baseAllocator The allocator for allocating memory chunks.
- */
- MemoryPoolAllocator(size_t chunkSize = kDefaultChunkCapacity, BaseAllocator* baseAllocator = 0) :
- chunkHead_(0), chunk_capacity_(chunkSize), userBuffer_(0), baseAllocator_(baseAllocator), ownBaseAllocator_(0)
- {
- }
-
- //! Constructor with user-supplied buffer.
- /*! The user buffer will be used firstly. When it is full, memory pool allocates new chunk with chunk size.
-
- The user buffer will not be deallocated when this allocator is destructed.
-
- \param buffer User supplied buffer.
- \param size Size of the buffer in bytes. It must at least larger than sizeof(ChunkHeader).
- \param chunkSize The size of memory chunk. The default is kDefaultChunkSize.
- \param baseAllocator The allocator for allocating memory chunks.
- */
- MemoryPoolAllocator(void *buffer, size_t size, size_t chunkSize = kDefaultChunkCapacity, BaseAllocator* baseAllocator = 0) :
- chunkHead_(0), chunk_capacity_(chunkSize), userBuffer_(buffer), baseAllocator_(baseAllocator), ownBaseAllocator_(0)
- {
- RAPIDJSON_ASSERT(buffer != 0);
- RAPIDJSON_ASSERT(size > sizeof(ChunkHeader));
- chunkHead_ = reinterpret_cast<ChunkHeader*>(buffer);
- chunkHead_->capacity = size - sizeof(ChunkHeader);
- chunkHead_->size = 0;
- chunkHead_->next = 0;
- }
-
- //! Destructor.
- /*! This deallocates all memory chunks, excluding the user-supplied buffer.
- */
- ~MemoryPoolAllocator() {
- Clear();
- RAPIDJSON_DELETE(ownBaseAllocator_);
- }
-
- //! Deallocates all memory chunks, excluding the user-supplied buffer.
- void Clear() {
- while (chunkHead_ && chunkHead_ != userBuffer_) {
- ChunkHeader* next = chunkHead_->next;
- baseAllocator_->Free(chunkHead_);
- chunkHead_ = next;
- }
- if (chunkHead_ && chunkHead_ == userBuffer_)
- chunkHead_->size = 0; // Clear user buffer
- }
-
- //! Computes the total capacity of allocated memory chunks.
- /*! \return total capacity in bytes.
- */
- size_t Capacity() const {
- size_t capacity = 0;
- for (ChunkHeader* c = chunkHead_; c != 0; c = c->next)
- capacity += c->capacity;
- return capacity;
- }
-
- //! Computes the memory blocks allocated.
- /*! \return total used bytes.
- */
- size_t Size() const {
- size_t size = 0;
- for (ChunkHeader* c = chunkHead_; c != 0; c = c->next)
- size += c->size;
- return size;
- }
-
- //! Allocates a memory block. (concept Allocator)
- void* Malloc(size_t size) {
- if (!size)
- return NULL;
-
- size = RAPIDJSON_ALIGN(size);
- if (chunkHead_ == 0 || chunkHead_->size + size > chunkHead_->capacity)
- if (!AddChunk(chunk_capacity_ > size ? chunk_capacity_ : size))
- return NULL;
-
- if (chunkHead_ == 0)
- return NULL;
-
- void *buffer = reinterpret_cast<char *>(chunkHead_) + RAPIDJSON_ALIGN(sizeof(ChunkHeader)) + chunkHead_->size;
- chunkHead_->size += size;
- return buffer;
- }
-
- //! Resizes a memory block (concept Allocator)
- void* Realloc(void* originalPtr, size_t originalSize, size_t newSize) {
- if (originalPtr == 0)
- return Malloc(newSize);
-
- if (newSize == 0)
- return NULL;
-
- originalSize = RAPIDJSON_ALIGN(originalSize);
- newSize = RAPIDJSON_ALIGN(newSize);
-
- // Do not shrink if new size is smaller than original
- if (originalSize >= newSize)
- return originalPtr;
-
- if (chunkHead_ == 0)
- return NULL;
-
- // Simply expand it if it is the last allocation and there is sufficient space
- if (originalPtr == reinterpret_cast<char *>(chunkHead_) + RAPIDJSON_ALIGN(sizeof(ChunkHeader)) + chunkHead_->size - originalSize) {
- size_t increment = static_cast<size_t>(newSize - originalSize);
- if (chunkHead_->size + increment <= chunkHead_->capacity) {
- chunkHead_->size += increment;
- return originalPtr;
- }
- }
-
- // Realloc process: allocate and copy memory, do not free original buffer.
- if (void* newBuffer = Malloc(newSize)) {
- if (originalSize)
- std::memcpy(newBuffer, originalPtr, originalSize);
- return newBuffer;
- }
- else
- return NULL;
- }
-
- //! Frees a memory block (concept Allocator)
- static void Free(void *ptr) { (void)ptr; } // Do nothing
-
-private:
- //! Copy constructor is not permitted.
- MemoryPoolAllocator(const MemoryPoolAllocator& rhs) /* = delete */;
- //! Copy assignment operator is not permitted.
- MemoryPoolAllocator& operator=(const MemoryPoolAllocator& rhs) /* = delete */;
-
- //! Creates a new chunk.
- /*! \param capacity Capacity of the chunk in bytes.
- \return true if success.
- */
- bool AddChunk(size_t capacity) {
- if (!baseAllocator_)
- ownBaseAllocator_ = baseAllocator_ = RAPIDJSON_NEW(BaseAllocator)();
- if (ChunkHeader* chunk = reinterpret_cast<ChunkHeader*>(baseAllocator_->Malloc(RAPIDJSON_ALIGN(sizeof(ChunkHeader)) + capacity))) {
- chunk->capacity = capacity;
- chunk->size = 0;
- chunk->next = chunkHead_;
- chunkHead_ = chunk;
- return true;
- }
- else
- return false;
- }
-
- static const int kDefaultChunkCapacity = RAPIDJSON_ALLOCATOR_DEFAULT_CHUNK_CAPACITY; //!< Default chunk capacity.
-
- //! Chunk header for perpending to each chunk.
- /*! Chunks are stored as a singly linked list.
- */
- struct ChunkHeader {
- size_t capacity; //!< Capacity of the chunk in bytes (excluding the header itself).
- size_t size; //!< Current size of allocated memory in bytes.
- ChunkHeader *next; //!< Next chunk in the linked list.
- };
-
- ChunkHeader *chunkHead_; //!< Head of the chunk linked-list. Only the head chunk serves allocation.
- size_t chunk_capacity_; //!< The minimum capacity of chunk when they are allocated.
- void *userBuffer_; //!< User supplied buffer.
- BaseAllocator* baseAllocator_; //!< base allocator for allocating memory chunks.
- BaseAllocator* ownBaseAllocator_; //!< base allocator created by this object.
-};
-
-RAPIDJSON_NAMESPACE_END
-
-#endif // RAPIDJSON_ENCODINGS_H_
diff --git a/io-tool/include/rapidjson/cursorstreamwrapper.h b/io-tool/include/rapidjson/cursorstreamwrapper.h
deleted file mode 100644
index 52c11a7..0000000
--- a/io-tool/include/rapidjson/cursorstreamwrapper.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// Unless required by applicable law or agreed to in writing, software distributed
-// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-// CONDITIONS OF ANY KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations under the License.
-
-#ifndef RAPIDJSON_CURSORSTREAMWRAPPER_H_
-#define RAPIDJSON_CURSORSTREAMWRAPPER_H_
-
-#include "stream.h"
-
-#if defined(__GNUC__)
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(effc++)
-#endif
-
-#if defined(_MSC_VER) && _MSC_VER <= 1800
-RAPIDJSON_DIAG_PUSH
-RAPIDJSON_DIAG_OFF(4702) // unreachable code
-RAPIDJSON_DIAG_OFF(4512) // assignment operator could not be generated
-#endif
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-
-//! Cursor stream wrapper for counting line and column number if error exists.
-/*!
- \tparam InputStream Any stream that implements Stream Concept
-*/
-template <typename InputStream, typename Encoding = UTF8<> >
-class CursorStreamWrapper : public GenericStreamWrapper<InputStream, Encoding> {
-public:
- typedef typename Encoding::Ch Ch;
-
- CursorStreamWrapper(InputStream& is):
- GenericStreamWrapper<InputStream, Encoding>(is), line_(1), col_(0) {}
-
- // counting line and column number
- Ch Take() {
- Ch ch = this->is_.Take();
- if(ch == '\n') {
- line_ ++;
- col_ = 0;
- } else {
- col_ ++;
- }
- return ch;
- }
-
- //! Get the error line number, if error exists.
- size_t GetLine() const { return line_; }
- //! Get the error column number, if error exists.
- size_t GetColumn() const { return col_; }
-
-private:
- size_t line_; //!< Current Line
- size_t col_; //!< Current Column
-};
-
-#if defined(_MSC_VER) && _MSC_VER <= 1800
-RAPIDJSON_DIAG_POP
-#endif
-
-#if defined(__GNUC__)
-RAPIDJSON_DIAG_POP
-#endif
-
-RAPIDJSON_NAMESPACE_END
-
-#endif // RAPIDJSON_CURSORSTREAMWRAPPER_H_
diff --git a/io-tool/include/rapidjson/document.h b/io-tool/include/rapidjson/document.h
deleted file mode 100644
index 9783fe4..0000000
--- a/io-tool/include/rapidjson/document.h
+++ /dev/null
@@ -1,2652 +0,0 @@
-// Tencent is pleased to support the open source community by making RapidJSON available.
-//
-// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
-//
-// Licensed under the MIT License (the "License"); you may not use this file except
-// in compliance with the License. You may obtain a copy of the License at
-//
-// http://opensource.org/licenses/MIT
-//
-// Unless required by applicable law or agreed to in writing, software distributed
-// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-// CONDITIONS OF ANY KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations under the License.
-
-#ifndef RAPIDJSON_DOCUMENT_H_
-#define RAPIDJSON_DOCUMENT_H_
-
-/*! \file document.h */
-
-#include "reader.h"
-#include "internal/meta.h"
-#include "internal/strfunc.h"
-#include "memorystream.h"
-#include "encodedstream.h"
-#include <new> // placement new
-#include <limits>
-
-RAPIDJSON_DIAG_PUSH
-#ifdef __clang__
-RAPIDJSON_DIAG_OFF(padded)
-RAPIDJSON_DIAG_OFF(switch-enum)
-RAPIDJSON_DIAG_OFF(c++98-compat)
-#elif defined(_MSC_VER)
-RAPIDJSON_DIAG_OFF(4127) // conditional expression is constant
-RAPIDJSON_DIAG_OFF(4244) // conversion from kXxxFlags to 'uint16_t', possible loss of data
-#endif
-
-#ifdef __GNUC__
-RAPIDJSON_DIAG_OFF(effc++)
-#endif // __GNUC__
-
-#ifndef RAPIDJSON_NOMEMBERITERATORCLASS
-#include <iterator> // std::random_access_iterator_tag
-#endif
-
-#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
-#include <utility> // std::move
-#endif
-
-RAPIDJSON_NAMESPACE_BEGIN
-
-// Forward declaration.
-template <typename Encoding, typename Allocator>
-class GenericValue;
-
-template <typename Encoding, typename Allocator, typename StackAllocator>
-class GenericDocument;
-
-//! Name-value pair in a JSON object value.
-/*!
- This class was internal to GenericValue. It used to be a inner struct.
- But a compiler (IBM XL C/C++ for AIX) have reported to have problem with that so it moved as a namespace scope struct.
- https://code.google.com/p/rapidjson/issues/detail?id=64
-*/
-template <typename Encoding, typename Allocator>
-struct GenericMember {
- GenericValue<Encoding, Allocator> name; //!< name of member (must be a string)
- GenericValue<Encoding, Allocator> value; //!< value of member.
-
- // swap() for std::