10#include "sparta/utils/Utils.hpp"
14#include "sparta/utils/StringManager.hpp"
87 PhasedObject(PhasedObject&&) =
default;
89 virtual ~PhasedObject()
103 virtual const std::string&
getName()
const = 0;
Helpers for printing and populating vectors.
Set of macros for Sparta assertions. Caught by the framework.
Exception class for all of Sparta.
Object having a specific phase in the sparta construction paradigm.
virtual bool isBuilding() const
Is this node (and thus the entire tree above and below it) currently in the TREE_BUILDING phase.
virtual std::string getLocation() const =0
Returns the location of this node in device tree which can be used to navigate the device tree in met...
void setPhase_(TreePhase phase)
Sets the current phase.
virtual const std::string & getName() const =0
Gets the name of this node.
virtual bool isFinalizing() const
Is this node (and thus the entire tree above it) "finalized".
virtual bool isConfigured() const
Is this node (and thus the entire tree above it) "configured". Checks that getPhase has passed TREE_C...
virtual bool isTearingDown() const
Is this node (and thus the entire tree above it) in the "teardown" phase.
virtual bool isBuilt() const
Is this node (and thus the entire tree above it) "built". Checks that getPhase has passed TREE_BUILDI...
virtual bool isFinalized() const
Is this node (and thus the entire tree above it) "finalized".
TreePhase getPhase() const
Gets the trees current phase.
virtual bool isConfiguring() const
Is this node (and thus the entire tree above it) currently in the TREE_CONFIGURING phase.
TreePhase
Current phase of tree construction (applies to node and entire tree).
@ TREE_FINALIZING
Tree is being finalized, but has not completed (maybe errors?)
@ TREE_CONFIGURING
Setting parameters, ports, and other pre-instantiation attributes. Hierarchy cannot be modified.
@ TREE_TEARDOWN
Simulation is complete. Tree and all resources are now allowed to be deleted (phase does not imply th...
@ TREE_BUILDING
Setting up tree hierarchy only (initial state)
@ TREE_FINALIZED
Tree and all resources have been instantiated. No more configuration/connection allowed.
Macros for handling exponential backoff.