12 #ifndef SST_CORE_SERIALIZATION_IMPL_SERIALIZE_VECTOR_H 13 #define SST_CORE_SERIALIZATION_IMPL_SERIALIZE_VECTOR_H 15 #ifndef SST_INCLUDING_SERIALIZE_H 17 "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" 20 #include "sst/core/serialization/serializer.h" 27 namespace Serialization {
37 std::vector<T>* addr_;
44 void*
getAddr()
override {
return addr_; }
58 typedef std::vector<T> Vector;
62 switch ( ser.mode() ) {
63 case serializer::SIZER:
65 size_t size = v.size();
69 case serializer::PACK:
71 size_t size = v.size();
75 case serializer::UNPACK:
89 for (
size_t i = 0; i < v.size(); ++i ) {
94 void operator()(Vector& v,
serializer& ser,
const char* name)
96 if ( ser.mode() != serializer::MAP )
return operator()(v, ser);
99 ser.mapper().map_hierarchy_start(name, obj_map);
100 for (
size_t i = 0; i < v.size(); ++i ) {
101 sst_map_object(ser, v[i], std::to_string(i).c_str());
103 ser.mapper().map_hierarchy_end();
113 typedef std::vector<bool> Vector;
117 switch ( ser.mode() ) {
118 case serializer::SIZER:
120 size_t size = v.size();
123 for (
auto it = v.begin(); it != v.end(); it++ ) {
129 case serializer::PACK:
131 size_t size = v.size();
133 for (
auto it = v.begin(); it != v.end(); it++ ) {
139 case serializer::UNPACK:
144 for (
size_t i = 0; i < v.size(); i++ ) {
151 case serializer::MAP:
169 #endif // SST_CORE_SERIALIZATION_IMPL_SERIALIZE_VECTOR_H This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:43
Class used to map std::vectors.
Definition: serialize_vector.h:34
Base serialize class.
Definition: serialize.h:45
Serialization "gateway" object.
Definition: serialize.h:133
ObjectMap object for non-fundamental, non-container types.
Definition: objectMap.h:377
static std::string demangle_name(const char *name)
Static function to demangle type names returned from typeid<T>.name()
Definition: objectMap.cc:139
bool isContainer() override
Check to see if this ObjectMap represents a container.
Definition: serialize_vector.h:40
std::string getType() override
Get the type of the variable represented by the ObjectMap.
Definition: serialize_vector.h:42
void * getAddr() override
Get the address of the variable represented by the ObjectMap.
Definition: serialize_vector.h:44