SST 16.1.0
Structural Simulation Toolkit
SST::Core::Serialization::ObjectMapToTree Class Reference

Static Public Member Functions

static ObjTreeCont * convert (const std::string &name, ObjectMap *objMap, bool recursive=true)
static void addChildrenFromMap (ObjTreeCont *parent, const ObjectMultimap &variables)
static void addChildrenFromMapRecursive (ObjTreeCont *parent, const ObjectMultimap &variables)
static std::unique_ptr< ObjTreeCont > convertTree (const std::string &rootName, ObjectMap *objMap)
static bool serializeComponent (ComponentObj *compNode, bool recursive=false)
 Takes a ComponentObj, serializes its BaseComponent via ObjectMapDeferred, and populates the ComponentObj's children with the serialized variables.
static void serializeAllComponents (ObjTreeCont *parent, bool recursive=false)
 Serialize all ComponentObj children of a given node.
static std::unique_ptr< ObjTreeCont > convertAndSerialize (const std::string &rootName, ObjectMap *objMap, bool recursive=true)
 Full pipeline: convert an ObjectMap tree, then serialize any ComponentObj nodes found in the result.

Member Function Documentation

◆ convertAndSerialize()

std::unique_ptr< ObjTreeCont > SST::Core::Serialization::ObjectMapToTree::convertAndSerialize ( const std::string & rootName,
ObjectMap * objMap,
bool recursive = true )
inlinestatic

Full pipeline: convert an ObjectMap tree, then serialize any ComponentObj nodes found in the result.

Parameters
rootNameName for the root node
objMapSource ObjectMap to convert
recursiveIf true, fully expand all levels
Returns
Root of the converted and serialized tree

References serializeAllComponents().

◆ serializeAllComponents()

void SST::Core::Serialization::ObjectMapToTree::serializeAllComponents ( ObjTreeCont * parent,
bool recursive = false )
inlinestatic

Serialize all ComponentObj children of a given node.

Parameters
parentThe parent node whose ComponentObj children to expand
recursiveIf true, recursively convert all grandchildren

References SST::Core::Serialization::ObjTreeCont::applyRecursiveByType(), and serializeComponent().

Referenced by convertAndSerialize().

◆ serializeComponent()

bool SST::Core::Serialization::ObjectMapToTree::serializeComponent ( ComponentObj * compNode,
bool recursive = false )
inlinestatic

Takes a ComponentObj, serializes its BaseComponent via ObjectMapDeferred, and populates the ComponentObj's children with the serialized variables.

Parameters
compNodeThe ComponentObj node to expand
recursiveIf true, recursively convert all children
Returns
true if serialization succeeded

References SST::Core::Serialization::ObjTreeCont::addChildObj(), and SST::Core::Serialization::ObjectMap::getAddr().

Referenced by serializeAllComponents().


The documentation for this class was generated from the following file: