mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-23 10:28:11 +08:00
Added support for amalgated source and header generation (a la sqlite). Refer to README.txt section "Generating amalgated source and header" for detail.
The amalgated sources are generated by concatenating JsonCpp source in the correct order and defining macro JSON_IS_AMALGATED to prevent inclusion of other headers. Sources and header has been modified to prevent any inclusion when this macro is defined. The script amalgate.py handle the generation.
This commit is contained in:
@@ -3,9 +3,14 @@
|
||||
// recognized in your jurisdiction.
|
||||
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
|
||||
|
||||
#if !defined(JSON_IS_AMALGATED)
|
||||
# include <json/value.h>
|
||||
# include <json/writer.h>
|
||||
# ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
|
||||
# include "json_batchallocator.h"
|
||||
# endif // #ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
|
||||
#endif // if !defined(JSON_IS_AMALGATED)
|
||||
#include <iostream>
|
||||
#include <json/value.h>
|
||||
#include <json/writer.h>
|
||||
#include <utility>
|
||||
#include <stdexcept>
|
||||
#include <cstring>
|
||||
@@ -14,9 +19,6 @@
|
||||
# include <cpptl/conststring.h>
|
||||
#endif
|
||||
#include <cstddef> // size_t
|
||||
#ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
|
||||
# include "json_batchallocator.h"
|
||||
#endif // #ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
|
||||
|
||||
#define JSON_ASSERT_UNREACHABLE assert( false )
|
||||
#define JSON_ASSERT( condition ) assert( condition ); // @todo <= change this into an exception throw
|
||||
@@ -70,6 +72,7 @@ releaseStringValue( char *value )
|
||||
free( value );
|
||||
}
|
||||
|
||||
} // namespace Json
|
||||
|
||||
|
||||
// //////////////////////////////////////////////////////////////////
|
||||
@@ -79,13 +82,16 @@ releaseStringValue( char *value )
|
||||
// //////////////////////////////////////////////////////////////////
|
||||
// //////////////////////////////////////////////////////////////////
|
||||
// //////////////////////////////////////////////////////////////////
|
||||
#ifdef JSON_VALUE_USE_INTERNAL_MAP
|
||||
# include "json_internalarray.inl"
|
||||
# include "json_internalmap.inl"
|
||||
#endif // JSON_VALUE_USE_INTERNAL_MAP
|
||||
#if !defined(JSON_IS_AMALGATED)
|
||||
# ifdef JSON_VALUE_USE_INTERNAL_MAP
|
||||
# include "json_internalarray.inl"
|
||||
# include "json_internalmap.inl"
|
||||
# endif // JSON_VALUE_USE_INTERNAL_MAP
|
||||
|
||||
# include "json_valueiterator.inl"
|
||||
#endif // if !defined(JSON_IS_AMALGATED)
|
||||
|
||||
namespace Json {
|
||||
|
||||
// //////////////////////////////////////////////////////////////////
|
||||
// //////////////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user