mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-14 15:05:34 +02: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:
@@ -28,6 +28,12 @@
|
||||
/// instead of C assert macro.
|
||||
# define JSON_USE_EXCEPTION 1
|
||||
|
||||
/// If defined, indicates that the source file is amalgated
|
||||
/// to prevent private header inclusion.
|
||||
/// Remarks: it is automatically defined in the generated amalgated header.
|
||||
// #define JSON_IS_AMALGATED
|
||||
|
||||
|
||||
# ifdef JSON_IN_CPPTL
|
||||
# include <cpptl/config.h>
|
||||
# ifndef JSON_USE_CPPTL
|
||||
|
@@ -6,7 +6,9 @@
|
||||
#ifndef CPPTL_JSON_FEATURES_H_INCLUDED
|
||||
# define CPPTL_JSON_FEATURES_H_INCLUDED
|
||||
|
||||
#if !defined(JSON_IS_AMALGATED)
|
||||
# include "forwards.h"
|
||||
#endif // if !defined(JSON_IS_AMALGATED)
|
||||
|
||||
namespace Json {
|
||||
|
||||
|
@@ -6,7 +6,9 @@
|
||||
#ifndef JSON_FORWARDS_H_INCLUDED
|
||||
# define JSON_FORWARDS_H_INCLUDED
|
||||
|
||||
#if !defined(JSON_IS_AMALGATED)
|
||||
# include "config.h"
|
||||
#endif // if !defined(JSON_IS_AMALGATED)
|
||||
|
||||
namespace Json {
|
||||
|
||||
|
@@ -6,8 +6,10 @@
|
||||
#ifndef CPPTL_JSON_READER_H_INCLUDED
|
||||
# define CPPTL_JSON_READER_H_INCLUDED
|
||||
|
||||
#if !defined(JSON_IS_AMALGATED)
|
||||
# include "features.h"
|
||||
# include "value.h"
|
||||
#endif // if !defined(JSON_IS_AMALGATED)
|
||||
# include <deque>
|
||||
# include <stack>
|
||||
# include <string>
|
||||
|
@@ -6,7 +6,9 @@
|
||||
#ifndef CPPTL_JSON_H_INCLUDED
|
||||
# define CPPTL_JSON_H_INCLUDED
|
||||
|
||||
#if !defined(JSON_IS_AMALGATED)
|
||||
# include "forwards.h"
|
||||
#endif // if !defined(JSON_IS_AMALGATED)
|
||||
# include <string>
|
||||
# include <vector>
|
||||
|
||||
|
@@ -6,7 +6,9 @@
|
||||
#ifndef JSON_WRITER_H_INCLUDED
|
||||
# define JSON_WRITER_H_INCLUDED
|
||||
|
||||
#if !defined(JSON_IS_AMALGATED)
|
||||
# include "value.h"
|
||||
#endif // if !defined(JSON_IS_AMALGATED)
|
||||
# include <vector>
|
||||
# include <string>
|
||||
# include <iostream>
|
||||
|
Reference in New Issue
Block a user