Add base.h to allow src/ to pick and choose includes

This commit is contained in:
John Keiser 2021-03-05 11:48:34 -08:00
parent 0948573e63
commit ec5ba79447
5 changed files with 37 additions and 24 deletions

View File

@ -34,30 +34,8 @@
}
*/
#include "simdjson/compiler_check.h"
#include "simdjson/common_defs.h"
SIMDJSON_PUSH_DISABLE_WARNINGS
SIMDJSON_DISABLE_UNDESIRED_WARNINGS
// Public API
#include "simdjson/simdjson_version.h"
#include "simdjson/error.h"
#include "simdjson/minify.h"
#include "simdjson/padded_string.h"
#include "simdjson/padded_string_view.h"
#include "simdjson/implementation.h"
// Inline functions
#include "simdjson/error-inl.h"
#include "simdjson/padded_string-inl.h"
#include "simdjson/padded_string_view-inl.h"
// DOM
#include "simdjson/base.h"
#include "simdjson/dom.h"
// Implementations
#include "simdjson/implementations.h"
SIMDJSON_POP_DISABLE_WARNINGS
#endif // SIMDJSON_H

25
include/simdjson/base.h Normal file
View File

@ -0,0 +1,25 @@
#ifndef SIMDJSON_BASE_H
#define SIMDJSON_BASE_H
#include "simdjson/compiler_check.h"
#include "simdjson/common_defs.h"
SIMDJSON_PUSH_DISABLE_WARNINGS
SIMDJSON_DISABLE_UNDESIRED_WARNINGS
// Public API
#include "simdjson/simdjson_version.h"
#include "simdjson/error.h"
#include "simdjson/minify.h"
#include "simdjson/padded_string.h"
#include "simdjson/padded_string_view.h"
#include "simdjson/implementation.h"
// Inline functions
#include "simdjson/error-inl.h"
#include "simdjson/padded_string-inl.h"
#include "simdjson/padded_string_view-inl.h"
SIMDJSON_POP_DISABLE_WARNINGS
#endif // SIMDJSON_BASE_H

View File

@ -32,7 +32,7 @@ namespace simdjson {
*/
namespace builtin = SIMDJSON_BUILTIN_IMPLEMENTATION;
/**
* @overload simdjson::SIMDJSON_BUILTIN_IMPLEMENTATION::ondemand
* @copydoc simdjson::SIMDJSON_BUILTIN_IMPLEMENTATION::ondemand
*/
namespace ondemand = SIMDJSON_BUILTIN_IMPLEMENTATION::ondemand;
/**

View File

@ -1,6 +1,9 @@
#ifndef SIMDJSON_DOM_H
#define SIMDJSON_DOM_H
SIMDJSON_PUSH_DISABLE_WARNINGS
SIMDJSON_DISABLE_UNDESIRED_WARNINGS
#include "simdjson/dom/array.h"
#include "simdjson/dom/document_stream.h"
#include "simdjson/dom/document.h"
@ -25,4 +28,6 @@
#include "simdjson/internal/tape_ref-inl.h"
#include "simdjson/dom/serialization-inl.h"
SIMDJSON_POP_DISABLE_WARNINGS
#endif // SIMDJSON_DOM_H

View File

@ -1,6 +1,9 @@
#ifndef SIMDJSON_IMPLEMENTATIONS_H
#define SIMDJSON_IMPLEMENTATIONS_H
SIMDJSON_PUSH_DISABLE_WARNINGS
SIMDJSON_DISABLE_UNDESIRED_WARNINGS
// Implementation-internal files (must be included before the implementations themselves, to keep
// amalgamation working--otherwise, the first time a file is included, it might be put inside the
// #ifdef SIMDJSON_IMPLEMENTATION_ARM64/FALLBACK/etc., which means the other implementations can't
@ -18,4 +21,6 @@
#include "simdjson/fallback.h"
#include "simdjson/builtin.h"
SIMDJSON_POP_DISABLE_WARNINGS
#endif // SIMDJSON_IMPLEMENTATIONS_H