diff --git a/src/sst/core/Makefile.am b/src/sst/core/Makefile.am index fbf00c7d5..0238cf8fe 100644 --- a/src/sst/core/Makefile.am +++ b/src/sst/core/Makefile.am @@ -88,25 +88,24 @@ nobase_dist_sst_HEADERS = \ eli/statsInfo.h \ eli/subcompSlotInfo.h \ serialization/serializable.h \ + serialization/serialize_serializable.h \ serialization/serializable_base.h \ - serialization/serializable_fwd.h \ serialization/serialize.h \ serialization/serialize_impl_fwd.h \ - serialization/serialize_array.h \ - serialization/serialize_atomic.h \ - serialization/serialize_buffer_accessor.h \ - serialization/serialize_deque.h \ - serialization/serialize_list.h \ - serialization/serialize_map.h \ - serialization/serialize_multiset.h \ - serialization/serialize_packer.h \ - serialization/serialize_priority_queue.h \ - serialization/serialize_serializable.h \ - serialization/serialize_set.h \ - serialization/serialize_sizer.h \ - serialization/serialize_string.h \ - serialization/serialize_unpacker.h \ - serialization/serialize_vector.h \ + serialization/impl/serialize_array.h \ + serialization/impl/serialize_atomic.h \ + serialization/impl/ser_buffer_accessor.h \ + serialization/impl/serialize_deque.h \ + serialization/impl/serialize_list.h \ + serialization/impl/serialize_map.h \ + serialization/impl/serialize_multiset.h \ + serialization/impl/packer.h \ + serialization/impl/serialize_priority_queue.h \ + serialization/impl/serialize_set.h \ + serialization/impl/sizer.h \ + serialization/impl/serialize_string.h \ + serialization/impl/unpacker.h \ + serialization/impl/serialize_vector.h \ serialization/serializer.h \ serialization/serializer_fwd.h \ serialization/statics.h \ @@ -212,7 +211,7 @@ sst_core_sources = \ sstpart.cc \ timeVortex.cc \ serialization/serializable_base.cc \ - serialization/serialize_serializable.cc \ + serialization/serializable.cc \ serialization/serializer.cc \ serialization/statics.cc \ sstinfo.h \ diff --git a/src/sst/core/baseComponent.h b/src/sst/core/baseComponent.h index 9532dc0ed..d67b25a1b 100644 --- a/src/sst/core/baseComponent.h +++ b/src/sst/core/baseComponent.h @@ -20,6 +20,7 @@ #include "sst/core/oneshot.h" #include "sst/core/profile/componentProfileTool.h" #include "sst/core/serialization/serializable_base.h" +#include "sst/core/serialization/serialize.h" #include "sst/core/sst_types.h" #include "sst/core/statapi/statbase.h" #include "sst/core/statapi/statengine.h" diff --git a/src/sst/core/serialization/CMakeLists.txt b/src/sst/core/serialization/CMakeLists.txt index 40cd4b507..d698abc7f 100644 --- a/src/sst/core/serialization/CMakeLists.txt +++ b/src/sst/core/serialization/CMakeLists.txt @@ -14,30 +14,16 @@ # ~~~ # +add_subdirectory(impl) + set(SSTSerializationHeaders - serializable_fwd.h - serializable_base.h serializable.h - serialize_array.h - serialize_atomic.h - serialize_buffer_accessor.h - serialize_deque.h + serializable_base.h serialize.h serialize_impl_fwd.h - serialize_list.h - serialize_map.h - serialize_multiset.h - serialize_output.h - serialize_packer.h - serialize_priority_queue.h - serializer_fwd.h - serializer.h serialize_serializable.h - serialize_set.h - serialize_sizer.h - serialize_string.h - serialize_unpacker.h - serialize_vector.h + serializer.h + serializer_fwd.h statics.h) install(FILES ${SSTSerializationHeaders} diff --git a/src/sst/core/serialization/impl/CMakeLists.txt b/src/sst/core/serialization/impl/CMakeLists.txt new file mode 100644 index 000000000..8d15fe56d --- /dev/null +++ b/src/sst/core/serialization/impl/CMakeLists.txt @@ -0,0 +1,36 @@ +# ~~~ +# SST-CORE src/sst/core/serialization CMake +# +# Copyright 2009-2024 NTESS. Under the terms +# of Contract DE-NA0003525 with NTESS, the U.S. +# Government retains certain rights in this software. +# +# Copyright (c) 2009-2024, NTESS +# All rights reserved. +# +# This file is part of the SST software package. For license +# information, see the LICENSE file in the top level directory of the +# distribution. +# ~~~ +# + +set(SSTSerializationImplHeaders + packer.h + ser_buffer_accessor.h + serialize_array.h + serialize_atomic.h + serialize_deque.h + serialize_list.h + serialize_map.h + serialize_multiset.h + serialize_priority_queue.h + serialize_set.h + serialize_string.h + serialize_vector.h + sizer.h + unpacker.h) + +install(FILES ${SSTSerializationImplHeaders} + DESTINATION "include/sst/core/serialization/impl") + +# EOF diff --git a/src/sst/core/serialization/serialize_packer.h b/src/sst/core/serialization/impl/packer.h similarity index 68% rename from src/sst/core/serialization/serialize_packer.h rename to src/sst/core/serialization/impl/packer.h index 6535d90b8..c6831543a 100644 --- a/src/sst/core/serialization/serialize_packer.h +++ b/src/sst/core/serialization/impl/packer.h @@ -9,10 +9,15 @@ // information, see the LICENSE file in the top level directory of the // distribution. -#ifndef SST_CORE_SERIALIZATION_SERIALIZE_PACKER_H -#define SST_CORE_SERIALIZATION_SERIALIZE_PACKER_H +#ifndef SST_CORE_SERIALIZATION_IMPL_PACKER_H +#define SST_CORE_SERIALIZATION_IMPL_PACKER_H -#include "sst/core/serialization/serialize_buffer_accessor.h" +#ifndef SST_INCLUDING_SERIALIZER_H +#warning \ + "The header file sst/core/serialization/impl/packer.h should not be directly included as it is not part of the stable public API. The file is included in sst/core/serialization/serializer.h" +#endif + +#include "sst/core/serialization/impl/ser_buffer_accessor.h" #include @@ -48,4 +53,4 @@ class ser_packer : public ser_buffer_accessor } // namespace Core } // namespace SST -#endif // SERIALIZE_PACKER_H +#endif // SST_CORE_SERIALIZATION_IMPL_PACKER_H diff --git a/src/sst/core/serialization/serialize_buffer_accessor.h b/src/sst/core/serialization/impl/ser_buffer_accessor.h similarity index 82% rename from src/sst/core/serialization/serialize_buffer_accessor.h rename to src/sst/core/serialization/impl/ser_buffer_accessor.h index 3a936b0d3..039facc80 100644 --- a/src/sst/core/serialization/serialize_buffer_accessor.h +++ b/src/sst/core/serialization/impl/ser_buffer_accessor.h @@ -9,8 +9,13 @@ // information, see the LICENSE file in the top level directory of the // distribution. -#ifndef SST_CORE_SERIALIZATION_SERIALIZE_BUFFER_ACCESSOR_H -#define SST_CORE_SERIALIZATION_SERIALIZE_BUFFER_ACCESSOR_H +#ifndef SST_CORE_SERIALIZATION_IMPL_SER_BUFFER_ACCESSOR_H +#define SST_CORE_SERIALIZATION_IMPL_SER_BUFFER_ACCESSOR_H + +#ifndef SST_INCLUDING_SERIALIZER_H +#warning \ + "The header file sst/core/serialization/impl/ser_buffer_accessor.h should not be directly included as it is not part of the stable public API. The file is included in sst/core/serialization/serializer.h" +#endif #include "sst/core/warnmacros.h" @@ -92,4 +97,4 @@ class ser_buffer_accessor } // namespace Core } // namespace SST -#endif // SST_CORE_SERIALIZATION_SERIALIZE_BUFFER_ACCESSOR_H +#endif // SST_CORE_SERIALIZATION_IMPL_SER_BUFFER_ACCESSOR_H diff --git a/src/sst/core/serialization/serialize_array.h b/src/sst/core/serialization/impl/serialize_array.h similarity index 92% rename from src/sst/core/serialization/serialize_array.h rename to src/sst/core/serialization/impl/serialize_array.h index 13d95bf7b..d4a85f155 100644 --- a/src/sst/core/serialization/serialize_array.h +++ b/src/sst/core/serialization/impl/serialize_array.h @@ -9,8 +9,13 @@ // information, see the LICENSE file in the top level directory of the // distribution. -#ifndef SST_CORE_SERIALIZATION_SERIALIZE_ARRAY_H -#define SST_CORE_SERIALIZATION_SERIALIZE_ARRAY_H +#ifndef SST_CORE_SERIALIZATION_IMPL_SERIALIZE_ARRAY_H +#define SST_CORE_SERIALIZATION_IMPL_SERIALIZE_ARRAY_H + +#ifndef SST_INCLUDING_SERIALIZE_H +#warning \ + "The header file sst/core/serialization/impl/serialize_array.h should not be directly included as it is not part of the stable public API. The file is included in sst/core/serialization/serialize.h" +#endif #include "sst/core/serialization/serializer.h" @@ -193,4 +198,4 @@ operator&(serializer& ser, pvt::raw_ptr_wrapper ptr) } // namespace Core } // namespace SST -#endif // SST_CORE_SERIALIZATION_SERIALIZE_ARRAY_H +#endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_ARRAY_H diff --git a/src/sst/core/serialization/serialize_atomic.h b/src/sst/core/serialization/impl/serialize_atomic.h similarity index 73% rename from src/sst/core/serialization/serialize_atomic.h rename to src/sst/core/serialization/impl/serialize_atomic.h index d6bc42bc2..bc6aae1e7 100644 --- a/src/sst/core/serialization/serialize_atomic.h +++ b/src/sst/core/serialization/impl/serialize_atomic.h @@ -9,8 +9,13 @@ // information, see the LICENSE file in the top level directory of the // distribution. -#ifndef SST_CORE_SERIALIZATION_SERIALIZE_ATOMIC_H -#define SST_CORE_SERIALIZATION_SERIALIZE_ATOMIC_H +#ifndef SST_CORE_SERIALIZATION_IMPL_SERIALIZE_ATOMIC_H +#define SST_CORE_SERIALIZATION_IMPL_SERIALIZE_ATOMIC_H + +#ifndef SST_INCLUDING_SERIALIZE_H +#warning \ + "The header file sst/core/serialization/impl/serialize_atomic.h should not be directly included as it is not part of the stable public API. The file is included in sst/core/serialization/serialize.h" +#endif #include "sst/core/serialization/serializer.h" @@ -57,4 +62,4 @@ class serialize> } // namespace Core } // namespace SST -#endif // SST_CORE_SERIALIZATION_SERIALIZE_VECTOR_H +#endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_VECTOR_H diff --git a/src/sst/core/serialization/serialize_deque.h b/src/sst/core/serialization/impl/serialize_deque.h similarity index 79% rename from src/sst/core/serialization/serialize_deque.h rename to src/sst/core/serialization/impl/serialize_deque.h index fc9f38bd5..e457cb266 100644 --- a/src/sst/core/serialization/serialize_deque.h +++ b/src/sst/core/serialization/impl/serialize_deque.h @@ -9,8 +9,13 @@ // information, see the LICENSE file in the top level directory of the // distribution. -#ifndef SST_CORE_SERIALIZATION_SERIALIZE_DEQUE_H -#define SST_CORE_SERIALIZATION_SERIALIZE_DEQUE_H +#ifndef SST_CORE_SERIALIZATION_IMPL_SERIALIZE_DEQUE_H +#define SST_CORE_SERIALIZATION_IMPL_SERIALIZE_DEQUE_H + +#ifndef SST_INCLUDING_SERIALIZE_H +#warning \ + "The header file sst/core/serialization/impl/serialize_deque.h should not be directly included as it is not part of the stable public API. The file is included in sst/core/serialization/serialize.h" +#endif #include "sst/core/serialization/serializer.h" @@ -68,4 +73,4 @@ class serialize> } // namespace Core } // namespace SST -#endif // SST_CORE_SERIALIZATION_SERIALIZE_DEQUE_H +#endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_DEQUE_H diff --git a/src/sst/core/serialization/serialize_list.h b/src/sst/core/serialization/impl/serialize_list.h similarity index 80% rename from src/sst/core/serialization/serialize_list.h rename to src/sst/core/serialization/impl/serialize_list.h index 4133e9c25..13559e800 100644 --- a/src/sst/core/serialization/serialize_list.h +++ b/src/sst/core/serialization/impl/serialize_list.h @@ -9,8 +9,13 @@ // information, see the LICENSE file in the top level directory of the // distribution. -#ifndef SST_CORE_SERIALIZATION_SERIALIZE_LIST_H -#define SST_CORE_SERIALIZATION_SERIALIZE_LIST_H +#ifndef SST_CORE_SERIALIZATION_IMPL_SERIALIZE_LIST_H +#define SST_CORE_SERIALIZATION_IMPL_SERIALIZE_LIST_H + +#ifndef SST_INCLUDING_SERIALIZE_H +#warning \ + "The header file sst/core/serialization/impl/serialize_list.h should not be directly included as it is not part of the stable public API. The file is included in sst/core/serialization/serialize.h" +#endif #include "sst/core/serialization/serializer.h" @@ -71,4 +76,4 @@ class serialize> } // namespace Core } // namespace SST -#endif // SST_CORE_SERIALIZATION_SERIALIZE_LIST_H +#endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_LIST_H diff --git a/src/sst/core/serialization/serialize_map.h b/src/sst/core/serialization/impl/serialize_map.h similarity index 88% rename from src/sst/core/serialization/serialize_map.h rename to src/sst/core/serialization/impl/serialize_map.h index 5e5246b2a..dd1d2eecc 100644 --- a/src/sst/core/serialization/serialize_map.h +++ b/src/sst/core/serialization/impl/serialize_map.h @@ -9,8 +9,13 @@ // information, see the LICENSE file in the top level directory of the // distribution. -#ifndef SST_CORE_SERIALIZATION_SERIALIZE_MAP_H -#define SST_CORE_SERIALIZATION_SERIALIZE_MAP_H +#ifndef SST_CORE_SERIALIZATION_IMPL_SERIALIZE_MAP_H +#define SST_CORE_SERIALIZATION_IMPL_SERIALIZE_MAP_H + +#ifndef SST_INCLUDING_SERIALIZE_H +#warning \ + "The header file sst/core/serialization/impl/serialize_map.h should not be directly included as it is not part of the stable public API. The file is included in sst/core/serialization/serialize.h" +#endif #include "sst/core/serialization/serializer.h" @@ -127,4 +132,4 @@ class serialize> } // namespace Core } // namespace SST -#endif // SST_CORE_SERIALIZATION_SERIALIZE_MAP_H +#endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_MAP_H diff --git a/src/sst/core/serialization/serialize_multiset.h b/src/sst/core/serialization/impl/serialize_multiset.h similarity index 87% rename from src/sst/core/serialization/serialize_multiset.h rename to src/sst/core/serialization/impl/serialize_multiset.h index 919d4a48d..3b956b646 100644 --- a/src/sst/core/serialization/serialize_multiset.h +++ b/src/sst/core/serialization/impl/serialize_multiset.h @@ -9,8 +9,13 @@ // information, see the LICENSE file in the top level directory of the // distribution. -#ifndef SST_CORE_SERIALIZATION_SERIALIZE_MULTISET_H -#define SST_CORE_SERIALIZATION_SERIALIZE_MULTISET_H +#ifndef SST_CORE_SERIALIZATION_IMPL_SERIALIZE_MULTISET_H +#define SST_CORE_SERIALIZATION_IMPL_SERIALIZE_MULTISET_H + +#ifndef SST_INCLUDING_SERIALIZE_H +#warning \ + "The header file sst/core/serialization/impl/serialize_multiset.h should not be directly included as it is not part of the stable public API. The file is included in sst/core/serialization/serialize.h" +#endif #include "sst/core/serialization/serializer.h" @@ -119,4 +124,4 @@ class serialize> } // namespace Core } // namespace SST -#endif // SST_CORE_SERIALIZATION_SERIALIZE_MULTISET_H +#endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_MULTISET_H diff --git a/src/sst/core/serialization/serialize_priority_queue.h b/src/sst/core/serialization/impl/serialize_priority_queue.h similarity index 82% rename from src/sst/core/serialization/serialize_priority_queue.h rename to src/sst/core/serialization/impl/serialize_priority_queue.h index 53cb49e7e..f4abd17a6 100644 --- a/src/sst/core/serialization/serialize_priority_queue.h +++ b/src/sst/core/serialization/impl/serialize_priority_queue.h @@ -9,8 +9,13 @@ // information, see the LICENSE file in the top level directory of the // distribution. -#ifndef SST_CORE_SERIALIZATION_SERIALIZE_PRIORITY_QUEUE_H -#define SST_CORE_SERIALIZATION_SERIALIZE_PRIORITY_QUEUE_H +#ifndef SST_CORE_SERIALIZATION_IMPL_SERIALIZE_PRIORITY_QUEUE_H +#define SST_CORE_SERIALIZATION_IMPL_SERIALIZE_PRIORITY_QUEUE_H + +#ifndef SST_INCLUDING_SERIALIZE_H +#warning \ + "The header file sst/core/serialization/impl/serialize_priority_queue.h should not be directly included as it is not part of the stable public API. The file is included in sst/core/serialization/serialize.h" +#endif #include "sst/core/serialization/serializer.h" @@ -82,4 +87,4 @@ class serialize> } // namespace Core } // namespace SST -#endif // SST_CORE_SERIALIZATION_SERIALIZE_PRIORITY_QUEUE_H +#endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_PRIORITY_QUEUE_H diff --git a/src/sst/core/serialization/serialize_set.h b/src/sst/core/serialization/impl/serialize_set.h similarity index 87% rename from src/sst/core/serialization/serialize_set.h rename to src/sst/core/serialization/impl/serialize_set.h index 3daefc638..1b23ba33f 100644 --- a/src/sst/core/serialization/serialize_set.h +++ b/src/sst/core/serialization/impl/serialize_set.h @@ -9,8 +9,13 @@ // information, see the LICENSE file in the top level directory of the // distribution. -#ifndef SST_CORE_SERIALIZATION_SERIALIZE_SET_H -#define SST_CORE_SERIALIZATION_SERIALIZE_SET_H +#ifndef SST_CORE_SERIALIZATION_IMPL_SERIALIZE_SET_H +#define SST_CORE_SERIALIZATION_IMPL_SERIALIZE_SET_H + +#ifndef SST_INCLUDING_SERIALIZE_H +#warning \ + "The header file sst/core/serialization/impl/serialize_set.h should not be directly included as it is not part of the stable public API. The file is included in sst/core/serialization/serialize.h" +#endif #include "sst/core/serialization/serializer.h" @@ -119,4 +124,4 @@ class serialize> } // namespace Core } // namespace SST -#endif // SST_CORE_SERIALIZATION_SERIALIZE_SET_H +#endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_SET_H diff --git a/src/sst/core/serialization/serialize_string.h b/src/sst/core/serialization/impl/serialize_string.h similarity index 61% rename from src/sst/core/serialization/serialize_string.h rename to src/sst/core/serialization/impl/serialize_string.h index f815f128e..a0f6c04b3 100644 --- a/src/sst/core/serialization/serialize_string.h +++ b/src/sst/core/serialization/impl/serialize_string.h @@ -9,8 +9,13 @@ // information, see the LICENSE file in the top level directory of the // distribution. -#ifndef SST_CORE_SERIALIZATION_SERIALIZE_STRING_H -#define SST_CORE_SERIALIZATION_SERIALIZE_STRING_H +#ifndef SST_CORE_SERIALIZATION_IMPL_SERIALIZE_STRING_H +#define SST_CORE_SERIALIZATION_IMPL_SERIALIZE_STRING_H + +#ifndef SST_INCLUDING_SERIALIZE_H +#warning \ + "The header file sst/core/serialization/impl/serialize_string.h should not be directly included as it is not part of the stable public API. The file is included in sst/core/serialization/serialize.h" +#endif #include "sst/core/serialization/serializer.h" @@ -29,4 +34,4 @@ class serialize_impl } // namespace Core } // namespace SST -#endif // SST_CORE_SERIALIZATION_SERIALIZE_STRING_H +#endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_STRING_H diff --git a/src/sst/core/serialization/serialize_vector.h b/src/sst/core/serialization/impl/serialize_vector.h similarity index 84% rename from src/sst/core/serialization/serialize_vector.h rename to src/sst/core/serialization/impl/serialize_vector.h index 172322252..132de0a84 100644 --- a/src/sst/core/serialization/serialize_vector.h +++ b/src/sst/core/serialization/impl/serialize_vector.h @@ -9,8 +9,13 @@ // information, see the LICENSE file in the top level directory of the // distribution. -#ifndef SST_CORE_SERIALIZATION_SERIALIZE_VECTOR_H -#define SST_CORE_SERIALIZATION_SERIALIZE_VECTOR_H +#ifndef SST_CORE_SERIALIZATION_IMPL_SERIALIZE_VECTOR_H +#define SST_CORE_SERIALIZATION_IMPL_SERIALIZE_VECTOR_H + +#ifndef SST_INCLUDING_SERIALIZE_H +#warning \ + "The header file sst/core/serialization/impl/serialize_vector.h should not be directly included as it is not part of the stable public API. The file is included in sst/core/serialization/serialize.h" +#endif #include "sst/core/serialization/serializer.h" @@ -107,4 +112,4 @@ class serialize> } // namespace Core } // namespace SST -#endif // SST_CORE_SERIALIZATION_SERIALIZE_VECTOR_H +#endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_VECTOR_H diff --git a/src/sst/core/serialization/serialize_sizer.h b/src/sst/core/serialization/impl/sizer.h similarity index 70% rename from src/sst/core/serialization/serialize_sizer.h rename to src/sst/core/serialization/impl/sizer.h index 889302e67..6bebbc812 100644 --- a/src/sst/core/serialization/serialize_sizer.h +++ b/src/sst/core/serialization/impl/sizer.h @@ -9,8 +9,13 @@ // information, see the LICENSE file in the top level directory of the // distribution. -#ifndef SST_CORE_SERIALIZATION_SERIALIZE_SIZER_H -#define SST_CORE_SERIALIZATION_SERIALIZE_SIZER_H +#ifndef SST_CORE_SERIALIZATION_IMPL_SIZER_H +#define SST_CORE_SERIALIZATION_IMPL_SIZER_H + +#ifndef SST_INCLUDING_SERIALIZER_H +#warning \ + "The header file sst/core/serialization/impl/sizer.h should not be directly included as it is not part of the stable public API. The file is included in sst/core/serialization/serializer.h" +#endif #include "sst/core/warnmacros.h" @@ -47,4 +52,4 @@ class ser_sizer } // namespace Core } // namespace SST -#endif // SST_CORE_SERIALIZATION_SERIALIZE_SIZER_H +#endif // SST_CORE_SERIALIZATION_IMPL_SIZER_H diff --git a/src/sst/core/serialization/serialize_unpacker.h b/src/sst/core/serialization/impl/unpacker.h similarity index 67% rename from src/sst/core/serialization/serialize_unpacker.h rename to src/sst/core/serialization/impl/unpacker.h index 4aade6b6f..da1a32dfd 100644 --- a/src/sst/core/serialization/serialize_unpacker.h +++ b/src/sst/core/serialization/impl/unpacker.h @@ -9,10 +9,15 @@ // information, see the LICENSE file in the top level directory of the // distribution. -#ifndef SST_CORE_SERIALIZATION_SERIALIZE_UNPACKER_H -#define SST_CORE_SERIALIZATION_SERIALIZE_UNPACKER_H +#ifndef SST_CORE_SERIALIZATION_IMPL_UNPACKER_H +#define SST_CORE_SERIALIZATION_IMPL_UNPACKER_H -#include "sst/core/serialization/serialize_buffer_accessor.h" +#ifndef SST_INCLUDING_SERIALIZER_H +#warning \ + "The header file sst/core/serialization/impl/unpacker.h should not be directly included as it is not part of the stable public API. The file is included in sst/core/serialization/serializer.h" +#endif + +#include "sst/core/serialization/impl/ser_buffer_accessor.h" namespace SST { namespace Core { @@ -44,4 +49,4 @@ class ser_unpacker : public ser_buffer_accessor } // namespace Core } // namespace SST -#endif // SST_CORE_SERIALIZATION_SERIALIZE_UNPACKER_H +#endif // SST_CORE_SERIALIZATION_IMPL_UNPACKER_H diff --git a/src/sst/core/serialization/serialize_serializable.cc b/src/sst/core/serialization/serializable.cc similarity index 95% rename from src/sst/core/serialization/serialize_serializable.cc rename to src/sst/core/serialization/serializable.cc index da9d17abf..0523773db 100644 --- a/src/sst/core/serialization/serialize_serializable.cc +++ b/src/sst/core/serialization/serializable.cc @@ -11,7 +11,7 @@ #include "sst_config.h" -#include "sst/core/serialization/serialize_serializable.h" +#include "sst/core/serialization/serializable.h" #include diff --git a/src/sst/core/serialization/serializable.h b/src/sst/core/serialization/serializable.h index 4cdcbb9df..db084f96c 100644 --- a/src/sst/core/serialization/serializable.h +++ b/src/sst/core/serialization/serializable.h @@ -13,6 +13,7 @@ #define SST_CORE_SERIALIZATION_SERIALIZABLE_H #include "sst/core/serialization/serializable_base.h" +#include "sst/core/serialization/serialize.h" namespace SST { @@ -35,10 +36,80 @@ class serializable : public serializable_base virtual ~serializable() {} }; +namespace pvt { + +void size_serializable(serializable_base* s, serializer& ser); + +void pack_serializable(serializable_base* s, serializer& ser); + +void unpack_serializable(serializable_base*& s, serializer& ser); + +} // namespace pvt + + +template +class serialize_impl< + T*, typename std::enable_if::value>::type> +{ + + template + friend class serialize; + void operator()(T*& s, serializer& ser) + { + serializable_base* sp = static_cast(s); + switch ( ser.mode() ) { + case serializer::SIZER: + pvt::size_serializable(sp, ser); + break; + case serializer::PACK: + pvt::pack_serializable(sp, ser); + break; + case serializer::UNPACK: + pvt::unpack_serializable(sp, ser); + break; + } + s = static_cast(sp); + } +}; + +template +void +serialize_intrusive_ptr(T*& t, serializer& ser) +{ + serializable_base* s = t; + switch ( ser.mode() ) { + case serializer::SIZER: + pvt::size_serializable(s, ser); + break; + case serializer::PACK: + pvt::pack_serializable(s, ser); + break; + case serializer::UNPACK: + pvt::unpack_serializable(s, ser); + t = dynamic_cast(s); + break; + } +} + +template +class serialize_impl< + T, typename std::enable_if::value>::type> +{ + template + friend class serialize; + inline void operator()(T& t, serializer& ser) + { + // T* tmp = &t; + // serialize_intrusive_ptr(tmp, ser); + t.serialize_order(ser); + } +}; + + } // namespace Serialization } // namespace Core } // namespace SST -#include "sst/core/serialization/serialize_serializable.h" +//#include "sst/core/serialization/serialize_serializable.h" #endif diff --git a/src/sst/core/serialization/serializable_fwd.h b/src/sst/core/serialization/serializable_fwd.h deleted file mode 100644 index 34f3a83b5..000000000 --- a/src/sst/core/serialization/serializable_fwd.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2009-2024 NTESS. Under the terms -// of Contract DE-NA0003525 with NTESS, the U.S. -// Government retains certain rights in this software. -// -// Copyright (c) 2009-2024, NTESS -// All rights reserved. -// -// This file is part of the SST software package. For license -// information, see the LICENSE file in the top level directory of the -// distribution. - -#ifndef SST_CORE_SERIALIZATION_SERIALIZABLE_FWD_H -#define SST_CORE_SERIALIZATION_SERIALIZABLE_FWD_H - -namespace SST { -namespace Core { -namespace Serialization { - -class serializable; - -} // namespace Serialization -} // namespace Core -} // namespace SST - -#endif // SST_CORE_SERIALIZATION_SERIALIZABLE_FWD_H diff --git a/src/sst/core/serialization/serialize.h b/src/sst/core/serialization/serialize.h index 04f734d07..95d21adcf 100644 --- a/src/sst/core/serialization/serialize.h +++ b/src/sst/core/serialization/serialize.h @@ -332,14 +332,16 @@ operator|(serializer& ser, T& t) } // namespace Core } // namespace SST -#include "sst/core/serialization/serialize_array.h" -#include "sst/core/serialization/serialize_atomic.h" -#include "sst/core/serialization/serialize_deque.h" -#include "sst/core/serialization/serialize_list.h" -#include "sst/core/serialization/serialize_map.h" -#include "sst/core/serialization/serialize_priority_queue.h" -#include "sst/core/serialization/serialize_set.h" -#include "sst/core/serialization/serialize_string.h" -#include "sst/core/serialization/serialize_vector.h" +#define SST_INCLUDING_SERIALIZE_H +#include "sst/core/serialization/impl/serialize_array.h" +#include "sst/core/serialization/impl/serialize_atomic.h" +#include "sst/core/serialization/impl/serialize_deque.h" +#include "sst/core/serialization/impl/serialize_list.h" +#include "sst/core/serialization/impl/serialize_map.h" +#include "sst/core/serialization/impl/serialize_priority_queue.h" +#include "sst/core/serialization/impl/serialize_set.h" +#include "sst/core/serialization/impl/serialize_string.h" +#include "sst/core/serialization/impl/serialize_vector.h" +#undef SST_INCLUDING_SERIALIZE_H #endif // SST_CORE_SERIALIZATION_SERIALIZE_H diff --git a/src/sst/core/serialization/serialize_serializable.h b/src/sst/core/serialization/serialize_serializable.h index d2c8d50c8..f9fc0b053 100644 --- a/src/sst/core/serialization/serialize_serializable.h +++ b/src/sst/core/serialization/serialize_serializable.h @@ -12,87 +12,7 @@ #ifndef SST_CORE_SERIALIZATION_SERIALIZE_SERIALIZABLE_H #define SST_CORE_SERIALIZATION_SERIALIZE_SERIALIZABLE_H -#include "sst/core/serialization/serializable.h" -#include "sst/core/serialization/serialize.h" -#include "sst/core/serialization/serializer.h" - -#include - -namespace SST { -namespace Core { -namespace Serialization { - -namespace pvt { - -void size_serializable(serializable_base* s, serializer& ser); - -void pack_serializable(serializable_base* s, serializer& ser); - -void unpack_serializable(serializable_base*& s, serializer& ser); - -} // namespace pvt - - -template -class serialize_impl< - T*, typename std::enable_if::value>::type> -{ - - template - friend class serialize; - void operator()(T*& s, serializer& ser) - { - serializable_base* sp = static_cast(s); - switch ( ser.mode() ) { - case serializer::SIZER: - pvt::size_serializable(sp, ser); - break; - case serializer::PACK: - pvt::pack_serializable(sp, ser); - break; - case serializer::UNPACK: - pvt::unpack_serializable(sp, ser); - break; - } - s = static_cast(sp); - } -}; - -template -void -serialize_intrusive_ptr(T*& t, serializer& ser) -{ - serializable_base* s = t; - switch ( ser.mode() ) { - case serializer::SIZER: - pvt::size_serializable(s, ser); - break; - case serializer::PACK: - pvt::pack_serializable(s, ser); - break; - case serializer::UNPACK: - pvt::unpack_serializable(s, ser); - t = dynamic_cast(s); - break; - } -} - -template -class serialize_impl< - T, typename std::enable_if::value>::type> -{ - template - friend class serialize; - inline void operator()(T& t, serializer& ser) - { - // T* tmp = &t; - // serialize_intrusive_ptr(tmp, ser); - t.serialize_order(ser); - } -}; - -} // namespace Serialization -} // namespace Core -} // namespace SST +#warning \ + "File serialize_serializable.h is deprecated and will be removed in SST 15. The functionality is now found in serializable.h" #endif // SST_CORE_SERIALIZATION_SERIALIZE_SERIALIZABLE_H diff --git a/src/sst/core/serialization/serializer.h b/src/sst/core/serialization/serializer.h index c3cf88d84..3d0ad0470 100644 --- a/src/sst/core/serialization/serializer.h +++ b/src/sst/core/serialization/serializer.h @@ -12,9 +12,11 @@ #ifndef SST_CORE_SERIALIZATION_SERIALIZER_H #define SST_CORE_SERIALIZATION_SERIALIZER_H -#include "sst/core/serialization/serialize_packer.h" -#include "sst/core/serialization/serialize_sizer.h" -#include "sst/core/serialization/serialize_unpacker.h" +#define SST_INCLUDING_SERIALIZER_H +#include "sst/core/serialization/impl/packer.h" +#include "sst/core/serialization/impl/sizer.h" +#include "sst/core/serialization/impl/unpacker.h" +#undef SST_INCLUDING_SERIALIZER_H #include #include