|
SST 16.1.0
Structural Simulation Toolkit
|
Public Types | |
| using | IntVariant = std::variant<int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, uint64_t> |
| Public Types inherited from SST::Core::Serialization::ObjTreeCont | |
| enum class | NodeKind { Generic , Integer , Float , String , Bool , Component , Container , FRef , GenericVal } |
Public Member Functions | |
| template<typename T> | |
| IntegerObj (T v, void *addr) | |
| IntegerObj (std::function< int64_t()> getter, std::function< void(int64_t)> setter) | |
| IntegerObj (const IntegerObj &rhs) | |
| IntegerObj & | operator= (const IntegerObj &rhs) |
| ObjTreeCont * | clone () const override |
| template<typename T> | |
| T | getVal () const |
| template<typename T> | |
| void | setVal (T v) |
| template<typename T> | |
| void | setSimVal (T v) |
| virtual void | syncFromSim () override |
| This function will update the local stored node value with the live value in the sst simulation. | |
| virtual bool | hasChanged () override |
| This function will compare the stored the node value with the live simulation value. | |
| template<typename Visitor> | |
| auto | visit (Visitor &&visitor) |
| template<typename Visitor> | |
| auto | visit (Visitor &&visitor) const |
| void | apply () override |
| void | Dump (const int verbosity, std::ios_base::fmtflags base=std::ios_base::dec, std::ostream &os=std::cout) override |
| Print the contents of the node to the stream specified by os. | |
| bool | setFromString (const std::string &value) override |
| Set the value stored in the node from a string. | |
| Public Member Functions inherited from SST::Core::Serialization::ObjTree< IntegerObj > | |
| ObjTree< IntegerObj > & | operator= (const ObjTree< IntegerObj > &other) |
| void | BuildTree (const ComponentInfoMap &compMap) |
| Each time we break into the debugger we rebuild the ObjectTree based on the current ComponentInfoMap. | |
| IntegerObj & | getObj () |
| void | applyRecursiveByType (Func &&func) |
| std::string | getTypeName () const override |
| bool | isEmpty () |
| void | Dump (const int verbosity, std::ios_base::fmtflags base=std::ios_base::dec, std::ostream &os=std::cout) override |
| Print the contents of the node to the stream specified by os. | |
| void | clear () override |
| Clears the entire Object Tree and frees all nodes. | |
| Public Member Functions inherited from SST::Core::Serialization::ObjTreeCont | |
| ObjTreeCont (const std::string &name, const std::string &type, NodeKind kind=NodeKind::Generic) | |
| ObjTreeCont (const ObjTreeCont &rhs) | |
| ObjTreeCont & | operator= (const ObjTreeCont &rhs) |
| void | addChildObj (ObjTreeCont *obj) |
| Adds a child node to the current node. | |
| void | setParent (ObjTreeCont *p) |
| ObjTreeCont * | getParent () const |
| const std::vector< std::unique_ptr< ObjTreeCont > > & | getChildren () const |
| const std::string & | getObjName () const |
| const std::string & | getType () const |
| void | setName (const std::string &name) |
| void | setType (const std::string &type) |
| Set the type of the node - this comes from ObjectMap/Serialization. | |
| bool | isRoot () |
| Returns true if this is the top of the tree - determined by the parent pointer being nullptr. | |
| void | makeReadOnly () |
| Function that will be called if during conversion from ObjectMap the node has been marked as ReadOnly. | |
| bool | isReadOnly () |
| template<typename Func> | |
| void | applyRecursive (Func &&func) |
| Apply a function to all children of this node regardless of type, etc. | |
| template<typename ObjectType, typename Func> | |
| void | applyRecursiveByType (Func &&func) |
| Apply a function to all children of this node of a specific type. | |
| template<typename ObjectType, typename Func> | |
| ObjectType * | findByType (Func &&predicate) |
| Find the first instance of a particular type in this node's children_ that matches criteria set by predicate. | |
| ObjTreeCont * | findByName (const std::string name) |
| Find the first instance of a child with name_ matching name. | |
| NodeKind | getKind () const |
| bool | isComponent () const |
| bool | isLeaf () const |
Additional Inherited Members | |
| Static Protected Member Functions inherited from SST::Core::Serialization::ObjTreeCont | |
| static void | replaceAll (std::string &s, std::string_view from, std::string_view to) |
| static std::string | prettifyType (std::string t) |
| Protected Attributes inherited from SST::Core::Serialization::ObjTree< IntegerObj > | |
| std::vector< std::unique_ptr< ObjTreeCont > > | objects_ |
| Protected Attributes inherited from SST::Core::Serialization::ObjTreeCont | |
| ObjTreeCont * | parent_ = nullptr |
| std::vector< std::unique_ptr< ObjTreeCont > > | children_ |
| std::string | name_ = "uninit" |
| std::string | type_ = "uninit" |
| NodeKind | kind_ = NodeKind::Generic |
| bool | readOnly_ = false |
|
inlineoverridevirtual |
Reimplemented from SST::Core::Serialization::ObjTreeCont.
|
inlineoverridevirtual |
Reimplemented from SST::Core::Serialization::ObjTreeCont.
|
inlineoverridevirtual |
Print the contents of the node to the stream specified by os.
Verbosity Level 0 will only print "/" - applicable to the root node only. Any higher Verbosity will trigger a call to Dump() to all children.
| verbosity | - Level 0: Print this node only, which for the base class is "/" Level > 0: Call Dump on all children_ |
| base | - Control the base (dec, hex, oct) to print numerical values in. Default dec. |
| os | - Stream to send the output. Default std::cout |
Reimplemented from SST::Core::Serialization::ObjTreeCont.
|
inlineoverridevirtual |
This function will compare the stored the node value with the live simulation value.
This function will NOT modify the stored value - an independent call to syncFromSim() is required.
Reimplemented from SST::Core::Serialization::ObjTreeCont.
|
inlineoverridevirtual |
Set the value stored in the node from a string.
This function will be called when the user wants to update the live value in the SST simulation. The function will convert value into the correct type based on the tree node type.
| value | - string representing the value you want to wrtie to the live sim |
Reimplemented from SST::Core::Serialization::ObjTreeCont.
|
inlineoverridevirtual |
This function will update the local stored node value with the live value in the sst simulation.
Reimplemented from SST::Core::Serialization::ObjTreeCont.