The Sparta Modeling Framework
Loading...
Searching...
No Matches
TreeNodeExtensions.hpp
Go to the documentation of this file.
1// <TreeNodeExtensions.h> -*- C++ -*-
2
8#pragma once
9
10#include <memory>
11#include <string>
12
14
15namespace sparta {
16
17class ParameterSet;
18
24{
25public:
26 explicit ExtensionsParamsOnly();
27 virtual ~ExtensionsParamsOnly();
28 virtual void setParameters(std::unique_ptr<ParameterSet> params) override final;
29 virtual ParameterSet * getParameters() override final;
30 virtual ParameterSet * getYamlOnlyParameters() override final;
31
32private:
33 class Impl;
34
35 std::shared_ptr<Impl> impl_;
36};
37
43{
44public:
47
48 void setNodeLocation(const std::string & location);
49
50 void setName(const std::string & name);
51
52 void addParameterAsString(const std::string & prm_name,
53 const std::string & prm_value);
54
55 const std::string & getNodeLocation() const;
56
57 const std::string & getName() const;
58
59 std::unique_ptr<ParameterSet> cloneParameters() const;
60
61private:
62 class Impl;
63 std::shared_ptr<Impl> impl_;
64};
65
71 const std::string & def_file,
72 TreeNode * context);
73
79 const std::string & def_string,
80 TreeNode * context);
81
82}
83
Basic Node framework in sparta device tree composite pattern.
Descriptor class which provides basic information about an extended tree node: device tree location,...
Helper class used to trivially extend TreeNode parameter sets (but not any additional functionality b...
Generic container of Parameters.
Base class used to extend TreeNode parameter sets.
Node in a composite tree representing a sparta Tree item.
Definition TreeNode.hpp:205
Macros for handling exponential backoff.
ExtensionDescriptorVec createExtensionDescriptorsFromFile(const std::string &def_file, TreeNode *context)
Given a tree node extension YAML file, parse it out into individual descriptors, one for each extensi...
ExtensionDescriptorVec createExtensionDescriptorsFromDefinitionString(const std::string &def_string, TreeNode *context)
Given a tree node extension definition string, parse it out into individual descriptors.