12 #ifndef SST_CORE_SERIALIZATION_IMPL_MAPPER_H 13 #define SST_CORE_SERIALIZATION_IMPL_MAPPER_H 15 #ifndef SST_INCLUDING_SERIALIZER_H 17 "The header file sst/core/serialization/impl/mapper.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" 20 #include "sst/core/serialization/objectMap.h" 28 namespace Serialization {
33 std::vector<ObjectMap*> obj_;
34 bool next_item_read_only =
false;
37 void map_primitive(
const std::string& name,
ObjectMap* map)
39 obj_.back()->addVariable(name, map);
40 if ( next_item_read_only ) {
41 next_item_read_only =
false;
46 void map_container(
const std::string& name,
ObjectMap* map)
48 obj_.back()->addVariable(name, map);
49 if ( next_item_read_only ) { next_item_read_only =
false; }
52 void map_existing_object(
const std::string& name,
ObjectMap* map)
55 obj_.back()->addVariable(name, map);
56 if ( next_item_read_only ) { next_item_read_only =
false; }
59 void map_hierarchy_start(
const std::string& name,
ObjectMap* map)
61 obj_.back()->addVariable(name, map);
65 if ( next_item_read_only ) { next_item_read_only =
false; }
68 void map_hierarchy_end()
74 void init(
ObjectMap*
object) { obj_.push_back(
object); }
76 void reset() { obj_.clear(); }
85 void setNextObjectReadOnly() { next_item_read_only =
true; }
96 #endif // SST_CORE_SERIALIZATION_IMPL_MAPPER_H
Class created by the serializer mapping mode used to map the variables for objects.
Definition: objectMap.h:61
void incRefCount()
Increament the reference counter for this object map.
Definition: objectMap.h:167
void map_buffer(void *buf, int size)
pack_buffer