The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::TreeNodePrivateAttorney Class Reference

#include <TreeNodePrivateAttorney.hpp>

Static Public Member Functions

static const TreeNode::ChildrenVectorgetAllChildren (const TreeNode &node)
 
static const TreeNode::ChildrenVectorgetAllChildren (const TreeNode *node)
 
static TreeNodegetChild (TreeNode *node, const std::string &path, const bool must_exist=false)
 
static uint32_t findChildren (TreeNode *node, const std::string &pattern, std::vector< TreeNode * > &results)
 
static bool hasChild (const TreeNode *node, const std::string &path)
 
template<typename DataT , typename T , void(T::*)(const DataT &) TMethod>
static void registerForNotification (TreeNode *node, T *obj, const std::string &name, bool ensure_possible=true)
 
template<typename DataT , typename T , void(T::*)(const TreeNode &, const TreeNode &, const DataT &) TMethod>
static void registerForNotification (TreeNode *node, T *obj, const std::string &name, bool ensure_possible=true)
 
template<typename DataT , typename T , void(T::*)(const DataT &) TMethod>
static void deregisterForNotification (TreeNode *node, T *obj, const std::string &name)
 
template<typename DataT , typename T , void(T::*)(const TreeNode &, const TreeNode &, const DataT &) TMethod>
static void deregisterForNotification (TreeNode *node, T *obj, const std::string &name)
 

Detailed Description

Follows the attorney client pattern to expose accessors to get at all children in the tree reguardless of methods related to visibility with the private subtrees.

This is mainly to be used by internal sparta things like Reports, Pipeout generation, etc that needs to see the entire device tree for processing.

It should NOT be used by simulation developers.

Definition at line 19 of file TreeNodePrivateAttorney.hpp.

Member Function Documentation

◆ deregisterForNotification() [1/2]

template<typename DataT , typename T , void(T::*)(const DataT &) TMethod>
static void sparta::TreeNodePrivateAttorney::deregisterForNotification ( TreeNode node,
T *  obj,
const std::string &  name 
)
inlinestatic

Definition at line 85 of file TreeNodePrivateAttorney.hpp.

◆ deregisterForNotification() [2/2]

template<typename DataT , typename T , void(T::*)(const TreeNode &, const TreeNode &, const DataT &) TMethod>
static void sparta::TreeNodePrivateAttorney::deregisterForNotification ( TreeNode node,
T *  obj,
const std::string &  name 
)
inlinestatic

Definition at line 95 of file TreeNodePrivateAttorney.hpp.

◆ findChildren()

static uint32_t sparta::TreeNodePrivateAttorney::findChildren ( TreeNode node,
const std::string &  pattern,
std::vector< TreeNode * > &  results 
)
inlinestatic

Definition at line 50 of file TreeNodePrivateAttorney.hpp.

◆ getAllChildren() [1/2]

static const TreeNode::ChildrenVector & sparta::TreeNodePrivateAttorney::getAllChildren ( const TreeNode node)
inlinestatic

Access to a list of all of the nodes children both public and private.

Definition at line 25 of file TreeNodePrivateAttorney.hpp.

◆ getAllChildren() [2/2]

static const TreeNode::ChildrenVector & sparta::TreeNodePrivateAttorney::getAllChildren ( const TreeNode node)
inlinestatic

Access to a list of all of the nodes children both public and private.

Definition at line 33 of file TreeNodePrivateAttorney.hpp.

Here is the call graph for this function:

◆ getChild()

static TreeNode * sparta::TreeNodePrivateAttorney::getChild ( TreeNode node,
const std::string &  path,
const bool  must_exist = false 
)
inlinestatic

Grab a child by name, this will return the child even if it is private. Throws an exception if must_exist = true and the child was not found. If must_exist = false, this will return a nullptr to denote not found.

Definition at line 44 of file TreeNodePrivateAttorney.hpp.

◆ hasChild()

static bool sparta::TreeNodePrivateAttorney::hasChild ( const TreeNode node,
const std::string &  path 
)
inlinestatic

const qualified version.

Definition at line 59 of file TreeNodePrivateAttorney.hpp.

◆ registerForNotification() [1/2]

template<typename DataT , typename T , void(T::*)(const DataT &) TMethod>
static void sparta::TreeNodePrivateAttorney::registerForNotification ( TreeNode node,
T *  obj,
const std::string &  name,
bool  ensure_possible = true 
)
inlinestatic

Definition at line 65 of file TreeNodePrivateAttorney.hpp.

◆ registerForNotification() [2/2]

template<typename DataT , typename T , void(T::*)(const TreeNode &, const TreeNode &, const DataT &) TMethod>
static void sparta::TreeNodePrivateAttorney::registerForNotification ( TreeNode node,
T *  obj,
const std::string &  name,
bool  ensure_possible = true 
)
inlinestatic

Definition at line 74 of file TreeNodePrivateAttorney.hpp.


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