12#ifndef SST_CORE_SERIALIZATION_OBJECTMAPDEFERRED_H
13#define SST_CORE_SERIALIZATION_OBJECTMAPDEFERRED_H
15#include "sst/core/baseComponent.h"
16#include "sst/core/serialization/serializer.h"
22namespace SST::Core::Serialization {
38 std::string
getType() const final
override {
return type_; }
46 void*
getAddr() const final
override {
return addr_; }
56 const ObjectMultimap&
getVariables() const final
override {
return obj_->getVariables(); }
71 if ( name ==
"!proxy!" ) {
75 printf(
"WARNING:: ObjectMapDeferred not built properly. No mapping will be available\n");
85 if constexpr ( std::is_base_of_v<BaseComponent, T> || std::is_base_of_v<SubComponent, T> ) {
86 setCategory(ObjectCategory::Component);
99 ser.enable_pointer_tracking();
100 ser.start_mapping(
this);
102 SST_SER_NAME(addr_,
"!proxy!");
128 std::string type_ =
"";
131class ComponentSerializer :
public ObjectMapDeferred<BaseComponent>
135 ObjectMapDeferred<BaseComponent>(comp,
typeid(*comp).name())
142 bool hasSerialized()
const
Main component object for the simulation.
Definition baseComponent.h:98
ObjectMap version that will delay building the internal data structures until the object is "selected...
Definition objectMapDeferred.h:31
void deactivate_callback() final override
Function that will get called when this object is deactivated (i.e selectParent() is called).
Definition objectMapDeferred.h:105
const ObjectMultimap & getVariables() const final override
Get the list of child variables contained in this ObjectMap.
Definition objectMapDeferred.h:56
std::string getType() const final override
Returns type of the deferred object.
Definition objectMapDeferred.h:38
void addVariable(const std::string &name, ObjectMap *obj) final override
For the Deferred Build, the only variable that gets added will be the "real" ObjectMap.
Definition objectMapDeferred.h:65
void * getAddr() const final override
Returns nullptr since there is no underlying object being represented.
Definition objectMapDeferred.h:46
void activate_callback() final override
Function that will get called when this object is selected.
Definition objectMapDeferred.h:93
Base class for objects created by the serializer mapping mode used to map the variables for objects.
Definition objectMap.h:189
ObjectMap()=default
Default constructor primarily used for the "top" object in the hierarchy.
static std::string demangle_name(const char *name)
Static function to demangle type names returned from typeid(T).name().
Definition objectMap.cc:152
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition serializer.h:43