48 class Factory :
public FactoryIF
52 std::string docstring_;
55 Factory(
const std::string& name,
const T& def_val,
const std::string& docstring)
72 std::shared_ptr<FactoryIF> fact_;
81 : fact_(new Factory<T>(name, def_val, docstring))
84 ParameterTemplate(
const std::string& name,
const char* def_val,
const std::string& docstring)
85 : fact_(new Factory<std::string>(name, def_val, docstring))
88 ParameterTemplate(
const ParameterTemplate&) =
default;
89 ParameterTemplate(ParameterTemplate&&) =
default;
91 ParameterTemplate& operator=(
const ParameterTemplate&) =
default;
105 std::vector<ParameterBase*> owned_params_;
115 for(
auto& pt: plist){
118 owned_params_.push_back(pb);
139 PARAMETER (std::string, architecture,
"NONE",
"Name of architecture being simulated")
140 PARAMETER (
bool, is_final_config,
false,
"True if this config was generated using --write-final-config. "
141 "This value is checked during --read-final-config to validate we are "
142 "loading a full config.")
155 :
RootTreeNode(
"meta",
"Meta-Data gloabl node", sim, search_scope),
A set of sparta::Parameters per sparta::ResourceTreeNode.
#define PARAMETER(type, name, def, doc)
Parameter declaration.
Individual Parameter interface base class, container class, and global helpers methods.
A simple time-based, event precedence based scheduler.
Basic Node framework in sparta device tree composite pattern.
TreeNode which represents some "global" namespace of the device tree, containing only RootTreeNodes,...
Non-templated base class for generic parameter access and iteration.
Generic container of Parameters.
ParameterSet()=delete
Default constructor disabled.
void addParameter_(sparta::ParameterBase *p)
Add a parameter to the parameter set. \temp This will be removed.
Parameter instance, templated to contain only a specific type.
TreeNode which represents the root ("top") of a device tree.
Node in a composite tree representing a sparta Tree item.
ParameterTemplate providing factory implementation for each data type.
ParameterBase * create() const
Crete an instance of the parameter base on this template using "new".
ParameterTemplate(const std::string &name, const T &def_val, const std::string &docstring)
Create the template. Specify the type of def_val explicitly when invoking this function.
Simulator which builds a sparta DeviceTree.
Macros for handling exponential backoff.