Skip to content

Commit

Permalink
Third round of cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
msqr1 committed Feb 12, 2025
1 parent 97a0af9 commit deaa6e1
Show file tree
Hide file tree
Showing 55 changed files with 352 additions and 1,158 deletions.
8 changes: 1 addition & 7 deletions include/glaze/api/api.cppm
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,7 @@ import glaze.util.expected;
#include "glaze/util/expected.cppm"
#endif

// Glaze Library
// For the license information refer to glaze.hpp




namespace glz
EXPORT namespace glz
{
inline namespace v0_0_3
{
Expand Down
8 changes: 3 additions & 5 deletions include/glaze/beve.cppm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Glaze Library
// For the license information refer to glaze.hpp

#pragma once
#ifdef CPP_MODULES
module;
Expand All @@ -19,8 +22,3 @@ export import glaze.thread.atomic;
#include "glaze/beve/write.cppm"
#include "glaze/thread/atomic.cppm"
#endif

// Glaze Library
// For the license information refer to glaze.hpp


6 changes: 5 additions & 1 deletion include/glaze/concepts/container_concepts.cppm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ export module glaze.concepts.container_concepts;
// _like
// Avoid the use of _t as that makes it seem like a type and not a concept

EXPORT namespace glz
BEGIN_EXPORT

namespace glz
{
template <class T, class... U>
concept is_any_of = (std::same_as<T, U> || ...);
Expand Down Expand Up @@ -396,3 +398,5 @@ namespace glz::detail
template <class Container>
using iterator_first_type = typename iterator_first_impl<Container>::type;
}

END_EXPORT
8 changes: 3 additions & 5 deletions include/glaze/csv.cppm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Glaze Library
// For the license information refer to glaze.hpp

#pragma once
#ifdef CPP_MODULES
module;
Expand All @@ -13,8 +16,3 @@ export import glaze.thread.atomic;
#include "glaze/csv/write.cppm"
#include "glaze/thread/atomic.cppm"
#endif

// Glaze Library
// For the license information refer to glaze.hpp


10 changes: 4 additions & 6 deletions include/glaze/format/format_to.cppm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Glaze Library
// For the license information refer to glaze.hpp

#pragma once
#ifdef CPP_MODULES
module;
Expand All @@ -14,12 +17,7 @@ import glaze.util.itoa;
#include "glaze/util/itoa.cppm"
#endif

// Glaze Library
// For the license information refer to glaze.hpp



namespace glz
EXPORT namespace glz
{
template <detail::num_t T>
void format_to(std::string& buffer, T&& value)
Expand Down
56 changes: 27 additions & 29 deletions include/glaze/glaze.cppm
Original file line number Diff line number Diff line change
@@ -1,31 +1,3 @@
#pragma once
#ifdef CPP_MODULES
module;
#endif
#include "../Export.hpp"
#ifdef CPP_MODULES
export module glaze.glaze;
export import glaze.beve;
export import glaze.beve.beve_to_json;
export import glaze.csv;
export import glaze.file.file_ops;
export import glaze.file.read_directory;
export import glaze.file.write_directory;
export import glaze.json;
export import glaze.record.recorder;
export import glaze.stencil.stencil;
#else
#include "glaze/beve.cppm"
#include "glaze/beve/beve_to_json.cppm"
#include "glaze/csv.cppm"
#include "glaze/file/file_ops.cppm"
#include "glaze/file/read_directory.cppm"
#include "glaze/file/write_directory.cppm"
#include "glaze/json.cppm"
#include "glaze/record/recorder.cppm"
#include "glaze/stencil/stencil.cppm"
#endif

/*
Glaze Library
Expand Down Expand Up @@ -58,4 +30,30 @@ export import glaze.stencil.stencil;
without including the above copyright and permission notices.
*/


#pragma once
#ifdef CPP_MODULES
module;
#endif
#include "../Export.hpp"
#ifdef CPP_MODULES
export module glaze.glaze;
export import glaze.beve;
export import glaze.beve.beve_to_json;
export import glaze.csv;
export import glaze.file.file_ops;
export import glaze.file.read_directory;
export import glaze.file.write_directory;
export import glaze.json;
export import glaze.record.recorder;
export import glaze.stencil.stencil;
#else
#include "glaze/beve.cppm"
#include "glaze/beve/beve_to_json.cppm"
#include "glaze/csv.cppm"
#include "glaze/file/file_ops.cppm"
#include "glaze/file/read_directory.cppm"
#include "glaze/file/write_directory.cppm"
#include "glaze/json.cppm"
#include "glaze/record/recorder.cppm"
#include "glaze/stencil/stencil.cppm"
#endif
10 changes: 4 additions & 6 deletions include/glaze/glaze_exceptions.cppm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Glaze Library
// For the license information refer to glaze.hpp

#pragma once
#ifdef CPP_MODULES
module;
Expand All @@ -16,16 +19,11 @@ export import glaze.exceptions.json_exceptions;
#endif
#endif

// Glaze Library
// For the license information refer to glaze.hpp


#if __cpp_exceptions

// These files provide convenience functions that throw C++ exceptions, which can make code cleaner for users


namespace glz::ex
EXPORT namespace glz::ex
{
template <opts Opts>
void read(auto& value, auto&& buffer)
Expand Down
10 changes: 4 additions & 6 deletions include/glaze/hardware/volatile_array.cppm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Glaze Library
// For the license information refer to glaze.hpp

#pragma once
#ifdef CPP_MODULES
module;
Expand All @@ -11,14 +14,9 @@ export module glaze.hardware.volatile_array;
#else
#endif

// Glaze Library
// For the license information refer to glaze.hpp


// A matching std::array API for volatile data


namespace glz
EXPORT namespace glz
{
template <class T>
concept is_volatile_array = requires { std::decay_t<T>::glaze_volatile_array; };
Expand Down
8 changes: 3 additions & 5 deletions include/glaze/json.cppm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Glaze Library
// For the license information refer to glaze.hpp

#pragma once
#ifdef CPP_MODULES
module;
Expand Down Expand Up @@ -43,8 +46,3 @@ export import glaze.thread.atomic;
#include "glaze/json/write.cppm"
#include "glaze/thread/atomic.cppm"
#endif

// Glaze Library
// For the license information refer to glaze.hpp


13 changes: 7 additions & 6 deletions include/glaze/json/escape_unicode.cppm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Glaze Library
// For the license information refer to glaze.hpp

#pragma once
#ifdef CPP_MODULES
module;
Expand All @@ -12,18 +15,14 @@ import glaze.util.string_literal;
#include "glaze/util/string_literal.cppm"
#endif

// Glaze Library
// For the license information refer to glaze.hpp




// JSON does not require escaped unicode keys to match with unescaped UTF-8
// In order to match with escaped unicode you can register your fields with
// the escaped unicode value.
// glz::escape_unicode<"😀"> will generate a compile time escaped unicode version
// of your key.

BEGIN_EXPORT

namespace glz::detail
{
// Helper function to append a Unicode escape sequence to the output string.
Expand Down Expand Up @@ -265,3 +264,5 @@ namespace glz
return {arr.data(), arr.size() - 1};
}();
}

END_EXPORT
10 changes: 6 additions & 4 deletions include/glaze/json/invoke.cppm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Glaze Library
// For the license information refer to glaze.hpp

#pragma once
#ifdef CPP_MODULES
module;
Expand All @@ -14,10 +17,7 @@ import glaze.json.write;
#include "glaze/json/write.cppm"
#endif

// Glaze Library
// For the license information refer to glaze.hpp


BEGIN_EXPORT

namespace glz
{
Expand Down Expand Up @@ -247,3 +247,5 @@ namespace glz
};
}
}

END_EXPORT
11 changes: 4 additions & 7 deletions include/glaze/json/jmespath.cppm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Glaze Library
// For the license information refer to glaze.hpp

#pragma once
#ifdef CPP_MODULES
module;
Expand All @@ -21,13 +24,7 @@ import glaze.util.string_literal;
#include "glaze/util/string_literal.cppm"
#endif

// Glaze Library
// For the license information refer to glaze.hpp




namespace glz
EXPORT namespace glz
{
namespace jmespath
{
Expand Down
10 changes: 4 additions & 6 deletions include/glaze/json/json_concepts.cppm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Glaze Library
// For the license information refer to glaze.hpp

#pragma once
#ifdef CPP_MODULES
module;
Expand All @@ -10,12 +13,7 @@ import glaze.core.common;
#include "glaze/core/common.cppm"
#endif

// Glaze Library
// For the license information refer to glaze.hpp



namespace glz
EXPORT namespace glz
{
template <class T>
concept json_object =
Expand Down
10 changes: 4 additions & 6 deletions include/glaze/json/json_format.cppm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Glaze Library
// For the license information refer to glaze.hpp

#pragma once
#ifdef CPP_MODULES
module;
Expand All @@ -16,12 +19,7 @@ import glaze.util.parse;
#include "glaze/util/parse.cppm"
#endif

// Glaze Library
// For the license information refer to glaze.hpp



namespace glz::detail
EXPORT namespace glz::detail
{
enum struct json_type : char {
Unset = 'x',
Expand Down
11 changes: 4 additions & 7 deletions include/glaze/json/json_ptr.cppm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Glaze Library
// For the license information refer to glaze.hpp

#pragma once
#ifdef CPP_MODULES
module;
Expand All @@ -21,13 +24,7 @@ import glaze.util.string_literal;
#include "glaze/util/string_literal.cppm"
#endif

// Glaze Library
// For the license information refer to glaze.hpp




namespace glz
EXPORT namespace glz
{
[[nodiscard]] inline constexpr bool maybe_numeric_key(const sv key)
{
Expand Down
13 changes: 7 additions & 6 deletions include/glaze/json/json_t.cppm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Glaze Library
// For the license information refer to glaze.hpp

#pragma once
#ifdef CPP_MODULES
module;
Expand All @@ -22,18 +25,14 @@ import glaze.util.expected;
#include "glaze/util/expected.cppm"
#endif

// Glaze Library
// For the license information refer to glaze.hpp




#ifdef _MSC_VER
// Turn off broken MSVC warning for "declaration of 'v' hides previous local declaration"
#pragma warning(push)
#pragma warning(disable : 4456)
#endif

BEGIN_EXPORT

namespace glz
{
// Generic json type.
Expand Down Expand Up @@ -391,3 +390,5 @@ namespace glz
// restore disabled warning
#pragma warning(pop)
#endif

END_EXPORT
Loading

0 comments on commit deaa6e1

Please sign in to comment.