Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize serialization code in preparation for larger changes. #1107

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions src/sst/core/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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 \
Expand Down
1 change: 1 addition & 0 deletions src/sst/core/baseComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
24 changes: 5 additions & 19 deletions src/sst/core/serialization/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
36 changes: 36 additions & 0 deletions src/sst/core/serialization/impl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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 <string>

Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -193,4 +198,4 @@ operator&(serializer& ser, pvt::raw_ptr_wrapper<TPtr> ptr)
} // namespace Core
} // namespace SST

#endif // SST_CORE_SERIALIZATION_SERIALIZE_ARRAY_H
#endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_ARRAY_H
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -57,4 +62,4 @@ class serialize<std::atomic<T>>
} // namespace Core
} // namespace SST

#endif // SST_CORE_SERIALIZATION_SERIALIZE_VECTOR_H
#endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_VECTOR_H
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -68,4 +73,4 @@ class serialize<std::deque<T>>
} // namespace Core
} // namespace SST

#endif // SST_CORE_SERIALIZATION_SERIALIZE_DEQUE_H
#endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_DEQUE_H
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -71,4 +76,4 @@ class serialize<std::list<T>>
} // namespace Core
} // namespace SST

#endif // SST_CORE_SERIALIZATION_SERIALIZE_LIST_H
#endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_LIST_H
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -127,4 +132,4 @@ class serialize<std::unordered_map<Key, Value>>
} // namespace Core
} // namespace SST

#endif // SST_CORE_SERIALIZATION_SERIALIZE_MAP_H
#endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_MAP_H
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -119,4 +124,4 @@ class serialize<std::unordered_multiset<T>>
} // namespace Core
} // namespace SST

#endif // SST_CORE_SERIALIZATION_SERIALIZE_MULTISET_H
#endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_MULTISET_H
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -82,4 +87,4 @@ class serialize<std::priority_queue<T, S, C>>
} // namespace Core
} // namespace SST

#endif // SST_CORE_SERIALIZATION_SERIALIZE_PRIORITY_QUEUE_H
#endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_PRIORITY_QUEUE_H
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -119,4 +124,4 @@ class serialize<std::unordered_set<T>>
} // namespace Core
} // namespace SST

#endif // SST_CORE_SERIALIZATION_SERIALIZE_SET_H
#endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_SET_H
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -29,4 +34,4 @@ class serialize_impl<std::string>
} // namespace Core
} // namespace SST

#endif // SST_CORE_SERIALIZATION_SERIALIZE_STRING_H
#endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_STRING_H
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -107,4 +112,4 @@ class serialize<std::vector<bool>>
} // namespace Core
} // namespace SST

#endif // SST_CORE_SERIALIZATION_SERIALIZE_VECTOR_H
#endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_VECTOR_H
Loading
Loading