SST 15.0
Structural Simulation Toolkit
SST::Core::Serialization::ObjectMapDeferred< T > Class Template Reference

ObjectMap version that will delay building the internal data structures until the object is "selected". More...

#include <objectMapDeferred.h>

Inheritance diagram for SST::Core::Serialization::ObjectMapDeferred< T >:
SST::Core::Serialization::ObjectMap

Public Member Functions

std::string getType () override
 Returns type of the deferred object.
 
void * getAddr () override
 Returns nullptr since there is no underlying object being represented.
 
const std::multimap< std::string, ObjectMap * > & getVariables () override
 Get the list of child variables contained in this ObjectMap.
 
void addVariable (const std::string &name, ObjectMap *obj) override
 For the Deferred Build, the only variable that gets added will be the "real" ObjectMap.
 
 ObjectMapDeferred (T *addr, const std::string &type)
 
- Public Member Functions inherited from SST::Core::Serialization::ObjectMap
 ObjectMap ()=default
 Default constructor primarily used for the "top" object in the hierarchy.
 
bool isReadOnly ()
 Check to see if this object is read-only.
 
void setReadOnly (bool state=true)
 Set the read-only state of the object.
 
std::string getName ()
 Get the name of the variable represented by this ObjectMap.
 
std::string getFullName ()
 Get the full hierarchical name of the variable represented by this ObjectMap, based on the path taken to get to this object.
 
void incRefCount ()
 Increment the reference counter for this ObjectMap.
 
void decRefCount ()
 Decrement the reference counter for this ObjectMap.
 
int32_t getRefCount ()
 Get the current reference count.
 
virtual ObjectMapComparisongetComparison (const std::string &UNUSED(name), ObjectMapComparison::Op UNUSED(op), const std::string &UNUSED(value))
 Get a watch point for this object.
 
ObjectMapselectParent ()
 Get the parent for this ObjectMap.
 
ObjectMapselectVariable (std::string name, bool &loop_detected)
 Get the ObjectMap for the specified variable.
 
virtual void addVariable (const std::string &UNUSED(name), ObjectMap *UNUSED(obj))
 Adds a variable to this ObjectMap.
 
virtual std::string get ()
 Get the value of the variable as a string.
 
void set (const std::string &value)
 Sets the value of the variable represented by the ObjectMap to the specified value, which is represented as a string.
 
virtual std::string get (const std::string &var)
 Gets the value of the specified variable as a string.
 
virtual void set (const std::string &var, const std::string &value, bool &found, bool &read_only)
 Sets the value of the specified variable to the specified value, which is represented as a string.
 
virtual bool isFundamental ()
 Check to see if this ObjectMap represents a fundamental or a class treated as a fundamental.
 
virtual bool isContainer ()
 Check to see if this ObjectMap represents a container.
 
virtual ~ObjectMap ()=default
 Destructor.
 
 ObjectMap (const ObjectMap &)=delete
 Disallow copying and assignment.
 
ObjectMapoperator= (const ObjectMap &)=delete
 
virtual std::string listVariable (std::string name, bool &found, int recurse=0)
 Create a string that lists information for the specified variable.
 
virtual std::string list (int recurse=0)
 Create a string that lists information for the current object.
 
virtual ObjectMapfindVariable (const std::string &name)
 Find a variable in this object map.
 

Protected Member Functions

void activate_callback () override
 Function that will get called when this object is selected.
 
void deactivate_callback () override
 Function that will get called when this object is deactivated (i.e selectParent() is called)
 
- Protected Member Functions inherited from SST::Core::Serialization::ObjectMap
virtual void set_impl (const std::string &UNUSED(value))
 Function implemented by derived classes to implement set().
 

Additional Inherited Members

- Static Public Member Functions inherited from SST::Core::Serialization::ObjectMap
static std::string demangle_name (const char *name)
 Static function to demangle type names returned from typeid(T).name()
 
- Protected Attributes inherited from SST::Core::Serialization::ObjectMap
ObjectMapMetaDatamdata_ = nullptr
 Metadata object for walking the object hierarchy.
 
bool read_only_ = false
 Indicates whether or not the variable is read-only.
 
- Static Protected Attributes inherited from SST::Core::Serialization::ObjectMap
static const std::multimap< std::string, ObjectMap * > emptyVars
 Static empty variable map for use by versions that don't have variables (i.e.
 

Detailed Description

template<typename T>
class SST::Core::Serialization::ObjectMapDeferred< T >

ObjectMap version that will delay building the internal data structures until the object is "selected".

Also, once the object's parent is selected, the internal data will be deleted.

Member Function Documentation

◆ activate_callback()

template<typename T>
void SST::Core::Serialization::ObjectMapDeferred< T >::activate_callback ( )
inlineoverrideprotectedvirtual

Function that will get called when this object is selected.

Reimplemented from SST::Core::Serialization::ObjectMap.

◆ addVariable()

template<typename T>
void SST::Core::Serialization::ObjectMapDeferred< T >::addVariable ( const std::string & name,
ObjectMap * obj )
inlineoverride

For the Deferred Build, the only variable that gets added will be the "real" ObjectMap.

Parameters
nameName of the object
objObjectMap to add as a variable

References SST::Core::Serialization::ObjectMap::ObjectMap().

◆ deactivate_callback()

template<typename T>
void SST::Core::Serialization::ObjectMapDeferred< T >::deactivate_callback ( )
inlineoverrideprotectedvirtual

Function that will get called when this object is deactivated (i.e selectParent() is called)

Reimplemented from SST::Core::Serialization::ObjectMap.

◆ getAddr()

template<typename T>
void * SST::Core::Serialization::ObjectMapDeferred< T >::getAddr ( )
inlineoverridevirtual

Returns nullptr since there is no underlying object being represented.

Returns
nullptr

Implements SST::Core::Serialization::ObjectMap.

◆ getType()

template<typename T>
std::string SST::Core::Serialization::ObjectMapDeferred< T >::getType ( )
inlineoverridevirtual

Returns type of the deferred object.

Returns
empty type of object

Implements SST::Core::Serialization::ObjectMap.

◆ getVariables()

template<typename T>
const std::multimap< std::string, ObjectMap * > & SST::Core::Serialization::ObjectMapDeferred< T >::getVariables ( )
inlineoverridevirtual

Get the list of child variables contained in this ObjectMap.

Returns
Reference to map containing ObjectMaps for this ObjectMap's child variables. pair.first is the name of the variable in the context of this object.

Reimplemented from SST::Core::Serialization::ObjectMap.


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