The Sparta Modeling Framework
|
Base class for applying parameters or configuration files to the simulator device tree. Contains a parameter or configuration file "action" to be applied to a tree. More...
#include <ConfigApplicators.hpp>
Classes | |
struct | ApplyFilter |
Represents a filter for applying parameters based on tree location. More... | |
Public Types | |
enum class | ApplySuccessCondition { ASC_DEFER = 0 , ASC_MUST_ASSIGN = 1 , ASC_IGNORE = 2 , MAX_ASC } |
Type for dictating how tryApply should behave. More... | |
enum class | LocationFilter { ALL = 0 , AT_OR_BELOW_NODE , MAX_AF } |
Type for dictating how to filter the parameter application. (i.e. only apply to certain parts of the tree) More... | |
Public Member Functions | |
virtual | ~ConfigApplicator () |
Virtual destructor. | |
virtual void | applyUnbound (sparta::ParameterTree &ptree, bool verbose=false) const =0 |
Apply the parameter contained in this object to the unbound (virtual) parameter tree ptree. | |
void | apply (sparta::TreeNode *root, ApplyFilter filter=ApplyFilter(), bool verbose=false) |
Apply the parameter contained in this object to the tree starting at root. | |
virtual void | tryApply (sparta::TreeNode *root, ApplySuccessCondition required, ApplyFilter filter=ApplyFilter(), bool verbose=false) const =0 |
Apply the parameter contained in this object to the tree starting at root. | |
virtual std::string | stringize () const =0 |
Render this parameter action as a string. | |
Base class for applying parameters or configuration files to the simulator device tree. Contains a parameter or configuration file "action" to be applied to a tree.
This base class exists for app types of simulator configuration so that they can be ordered in a single vector.
Definition at line 35 of file ConfigApplicators.hpp.
|
strong |
Type for dictating how tryApply should behave.
Definition at line 46 of file ConfigApplicators.hpp.
|
strong |
Type for dictating how to filter the parameter application. (i.e. only apply to certain parts of the tree)
Enumerator | |
---|---|
ALL | Apply configuration to any nodes that match pattern and type (typical) |
AT_OR_BELOW_NODE | Apply configuration to any nodes that are or are below a given filter node. Typically, this is used with ApplySuccessCondition::ASC_IGNORE to re-apply parameters to a part of the tree. |
MAX_AF | Apply configuration only to a given filter node if applicable. (unimplemented) Apply configuration to any nodes that are below a given filter node, excluding the filter node itself. (unimplemneted) Enum maximum (invalid) |
Definition at line 57 of file ConfigApplicators.hpp.
|
inlinevirtual |
Virtual destructor.
Definition at line 41 of file ConfigApplicators.hpp.
|
inline |
Apply the parameter contained in this object to the tree starting at root.
root | Root of tree to apply parameter(s) too |
If | parameter can not be set |
Definition at line 202 of file ConfigApplicators.hpp.
|
pure virtual |
Apply the parameter contained in this object to the unbound (virtual) parameter tree ptree.
Implemented in sparta::app::ParameterApplicator, sparta::app::ParameterDefaultApplicator, sparta::app::NodeConfigFileApplicator, and sparta::app::ArchNodeConfigFileApplicator.
|
pure virtual |
Render this parameter action as a string.
Implemented in sparta::app::ParameterApplicator, sparta::app::ParameterDefaultApplicator, sparta::app::NodeConfigFileApplicator, and sparta::app::ArchNodeConfigFileApplicator.
|
pure virtual |
Apply the parameter contained in this object to the tree starting at root.
root | Root of tree to apply parameter(s) too |
Implemented in sparta::app::NodeConfigFileApplicator, sparta::app::ArchNodeConfigFileApplicator, sparta::app::ParameterApplicator, and sparta::app::ParameterDefaultApplicator.