Metall  v0.28
A persistent memory allocator for data-centric analytics
object.hpp
Go to the documentation of this file.
1 // Copyright 2022 Lawrence Livermore National Security, LLC and other Metall
2 // Project Developers. See the top-level COPYRIGHT file for details.
3 //
4 // SPDX-License-Identifier: (Apache-2.0 OR MIT)
5 
6 #ifndef METALL_OBJECT_HPP
7 #define METALL_OBJECT_HPP
8 
10 #include <metall/json/details/compact_object.hpp>
11 
12 namespace metall::json {
13 
17 #ifdef DOXYGEN_SKIP
18 template <typename allocator_type = std::allocator<std::byte>>
19 #else
20 template <typename allocator_type>
21 #endif
22 class object : public jsndtl::compact_object<allocator_type> {
23  using jsndtl::compact_object<allocator_type>::compact_object;
24 };
25 
27 template <typename allocator_type>
28 inline void swap(object<allocator_type> &lhd,
29  object<allocator_type> &rhd) noexcept {
30  lhd.swap(rhd);
31 }
32 
33 namespace jsndtl {
34 
37 template <typename allocator_type, typename other_object_type>
39  const object<allocator_type> &object,
40  const other_object_type &other_object) noexcept {
41  return general_compact_object_equal(object, other_object);
42 }
43 
44 } // namespace jsndtl
45 
46 } // namespace metall::json
47 
48 #endif // METALL_OBJECT_HPP
JSON object. An object is a table key and value pairs. The order of key-value pairs depends on the im...
Definition: object.hpp:22
bool general_object_equal(const object< allocator_type > &object, const other_object_type &other_object) noexcept
Provides 'equal' calculation for other object types that have the same interface as the object class.
Definition: object.hpp:38
Namespace for Metall JSON container, which is in an experimental phase.
Definition: array.hpp:17
void swap(array< allocator_type > &lhd, array< allocator_type > &rhd) noexcept
Swap value instances.
Definition: array.hpp:193