The Sparta Modeling Framework
|
A set of sparta::Parameters per sparta::ResourceTreeNode. More...
#include <iostream>
#include <iomanip>
#include <string>
#include <ostream>
#include <vector>
#include <unordered_map>
#include "sparta/utils/Utils.hpp"
#include "sparta/simulation/TreeNode.hpp"
#include "sparta/simulation/Parameter.hpp"
Go to the source code of this file.
Classes | |
class | sparta::ParameterSet |
Generic container of Parameters. More... | |
class | sparta::ParameterSet::ParameterSetIterator< T > |
Non-const iterator for ParameterSet. More... | |
Namespaces | |
namespace | sparta |
Macros for handling exponential backoff. | |
Macros | |
#define | PARAMETER(type, name, def, doc) sparta::Parameter<type> name {#name, def, doc, __this_ps}; |
Parameter declaration. | |
#define | LOCKED_PARAMETER(type, name, def, doc) sparta::Parameter<type> name {#name, def, doc, sparta::Parameter<type>::ParameterAttribute::LOCKED, __this_ps}; |
#define | VOLATILE_LOCKED_PARAMETER(type, name, def, doc) sparta::Parameter<type> name {#name, def, doc, sparta::Parameter<type>::ParameterAttribute::LOCKED, __this_ps, true}; |
#define | HIDDEN_PARAMETER(type, name, def, doc) sparta::Parameter<type> name {#name, def, doc, sparta::Parameter<type>::ParameterAttribute::HIDDEN, __this_ps}; |
#define | VOLATILE_HIDDEN_PARAMETER(type, name, def, doc) sparta::Parameter<type> name {#name, def, doc, sparta::Parameter<type>::ParameterAttribute::HIDDEN, __this_ps, true}; |
#define | VOLATILE_PARAMETER(type, name, def, doc) sparta::Parameter<type> name {#name, def, doc, __this_ps, true}; |
Special-case PARAMETER declaration. | |
#define | PARAMETER_CTORDEFAULT(type, name, doc) |
Define a Parameter who will get its default from the constructor. | |
Functions | |
std::ostream & | operator<< (std::ostream &out, sparta::ParameterSet const &ps) |
ParameterSet Pretty-Printing stream operator. | |
std::ostream & | operator<< (std::ostream &out, sparta::ParameterSet const *ps) |
A set of sparta::Parameters per sparta::ResourceTreeNode.
Definition in file ParameterSet.hpp.
#define HIDDEN_PARAMETER | ( | type, | |
name, | |||
def, | |||
doc | |||
) | sparta::Parameter<type> name {#name, def, doc, sparta::Parameter<type>::ParameterAttribute::HIDDEN, __this_ps}; |
Definition at line 750 of file ParameterSet.hpp.
#define LOCKED_PARAMETER | ( | type, | |
name, | |||
def, | |||
doc | |||
) | sparta::Parameter<type> name {#name, def, doc, sparta::Parameter<type>::ParameterAttribute::LOCKED, __this_ps}; |
Definition at line 744 of file ParameterSet.hpp.
#define PARAMETER | ( | type, | |
name, | |||
def, | |||
doc | |||
) | sparta::Parameter<type> name {#name, def, doc, __this_ps}; |
Parameter declaration.
type | C++ type of the parameter. Must be an entry supported by sparta::Parameter |
name | Name of the parameter. This will be a member variable of the ParameterSet subclass in which this macro is used as well as a string in a table of parameters held by that class. |
def | Default value. Must be a valid construction of type which can be used to copy-construct an instance of type or assigned to an instance of type. |
doc | Description of this Parameter. It should include the semantics and allowed values. |
Definition at line 741 of file ParameterSet.hpp.
#define PARAMETER_CTORDEFAULT | ( | type, | |
name, | |||
doc | |||
) |
Define a Parameter who will get its default from the constructor.
Strictly speaking, this does not introduce any functionality that PARAMETER couldn't support. However, explicitly identifying parameters who get their default value from the ParameterSet subclass constructor may help reduce surpise default values - which would happen if the default for PARAMETER were allowed to be overridden in the ParameterSet initializer list
Definition at line 774 of file ParameterSet.hpp.
#define VOLATILE_HIDDEN_PARAMETER | ( | type, | |
name, | |||
def, | |||
doc | |||
) | sparta::Parameter<type> name {#name, def, doc, sparta::Parameter<type>::ParameterAttribute::HIDDEN, __this_ps, true}; |
Definition at line 753 of file ParameterSet.hpp.
#define VOLATILE_LOCKED_PARAMETER | ( | type, | |
name, | |||
def, | |||
doc | |||
) | sparta::Parameter<type> name {#name, def, doc, sparta::Parameter<type>::ParameterAttribute::LOCKED, __this_ps, true}; |
Definition at line 747 of file ParameterSet.hpp.
#define VOLATILE_PARAMETER | ( | type, | |
name, | |||
def, | |||
doc | |||
) | sparta::Parameter<type> name {#name, def, doc, __this_ps, true}; |
Special-case PARAMETER declaration.
Definition at line 761 of file ParameterSet.hpp.
|
inline |
ParameterSet Pretty-Printing stream operator.
Definition at line 799 of file ParameterSet.hpp.
|
inline |
Definition at line 804 of file ParameterSet.hpp.