The Sparta Modeling Framework
|
Basic Node framework in sparta device tree composite pattern. More...
#include <cstddef>
#include <cstdint>
#include <iostream>
#include <fstream>
#include <string>
#include <ostream>
#include <vector>
#include <sstream>
#include <set>
#include <map>
#include <unordered_map>
#include <regex>
#include <functional>
#include <memory>
#include <type_traits>
#include <typeinfo>
#include <utility>
#include "sparta/utils/StaticInit.hpp"
#include "sparta/simulation/ResourceContainer.hpp"
#include "sparta/functional/ArchDataContainer.hpp"
#include "sparta/utils/Utils.hpp"
#include "sparta/utils/SpartaException.hpp"
#include "sparta/utils/SpartaAssert.hpp"
#include "sparta/utils/Printing.hpp"
#include "sparta/utils/StringManager.hpp"
#include "sparta/kernel/PhasedObject.hpp"
Go to the source code of this file.
Classes | |
class | sparta::TreeNode |
Node in a composite tree representing a sparta Tree item. More... | |
struct | sparta::TreeNode::ANY_TYPE |
Type for indicating that ANY notification source type should be included in a search performed by locateNotificationSources. More... | |
class | sparta::TreeNode::ExtensionsBase |
Base class used to extend TreeNode parameter sets. More... | |
class | sparta::TreeNode::delegate |
Temporary delegate for notificaiton invokation until the implementation is working. This will then be merged with sparta::SpartaHandler. More... | |
class | sparta::TreeNode::type_info_container |
Container for std::type_info. More... | |
struct | sparta::TreeNode::NotificationInfo |
Notification type/name information. More... | |
Namespaces | |
namespace | sparta |
Macros for handling exponential backoff. | |
namespace | sparta::app |
Sparta Application framework. | |
Macros | |
#define | ALPHANUM_CHARS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890_" |
Enables tracing of TreeNode lifetimes in a set of output txt files. | |
#define | DIGIT_CHARS "0123456789" |
Digit characters (for valid TreeNode groups) | |
#define | RESERVED_WORDS |
Reserved words in Python language, Python builtins, and other reservations. TreeNode names and groups are note allowed to exactly match any of these (case sensitive) | |
#define | REGISTER_FOR_NOTIFICATION(func, datat, name) |
Convenience macro for registering for a notification on a TreeNode. | |
#define | DEREGISTER_FOR_NOTIFICATION(func, datat, name) |
Convenience macro for deregistering for a notification on a TreeNode. | |
#define | NOTIFY(func, datat, name) \ |
Typedefs | |
typedef std::vector< std::unique_ptr< ExtensionDescriptor > > | sparta::ExtensionDescriptorVec |
Functions | |
template<class Ch , class Tr > | |
std::basic_ostream< Ch, Tr > & | sparta::operator<< (std::basic_ostream< Ch, Tr > &out, sparta::TreeNode const &tn) |
TreeNode stream operator. | |
std::ostream & | sparta::operator<< (std::ostream &out, sparta::TreeNode const *tn) |
TreeNode stream operator. | |
Basic Node framework in sparta device tree composite pattern.
Definition in file TreeNode.hpp.
#define ALPHANUM_CHARS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890_" |
Enables tracing of TreeNode lifetimes in a set of output txt files.
This can be used along with the tools/check_treenode_dtors.py script. Generates construction.txt and destruction.txt files. Delete these files before running the simulator again since they are always appended to and never overwritten
Alphanumeric characters (valid for TreeNode names and groups)
Definition at line 57 of file TreeNode.hpp.
#define DEREGISTER_FOR_NOTIFICATION | ( | func, | |
datat, | |||
name | |||
) |
Convenience macro for deregistering for a notification on a TreeNode.
Definition at line 158 of file TreeNode.hpp.
#define DIGIT_CHARS "0123456789" |
Digit characters (for valid TreeNode groups)
Definition at line 61 of file TreeNode.hpp.
#define NOTIFY | ( | func, | |
datat, | |||
name | |||
) | \ |
Definition at line 163 of file TreeNode.hpp.
#define REGISTER_FOR_NOTIFICATION | ( | func, | |
datat, | |||
name | |||
) |
Convenience macro for registering for a notification on a TreeNode.
func | Name of class member function that will be called when the specified notification is posted. This function must have one of the following signatures:
|
datat | type of notification data for which this notification will register. See sparta::TreeNode::registerForNotification for information on how these types can be found in the tree. |
name | Name of the notification to register for. If "", will receive all notifications from the subtree matching datat. See sparta::TreeNode::registerForNotification for more details about the name parameter. |
SpartaException | if a registration is made on a datat/name combination that cannot be posted by this the node's subtree (since there are no ancestor NotificationSource nodes matching datat/name). |
This macro must be used within the class instance for which the callback function is being registered. This macro uses the this pointer to determine the observer class.
This macro resolves to a function call to "registerForNotification" which is should be used in a context such that it refers to sparta::TreeNode::registerForNotification.
Example
Definition at line 148 of file TreeNode.hpp.
#define RESERVED_WORDS |
Reserved words in Python language, Python builtins, and other reservations. TreeNode names and groups are note allowed to exactly match any of these (case sensitive)
Definition at line 68 of file TreeNode.hpp.