The ControllableParameter class is simply a set of ControllableItem objects. More...
#include <ControllableParameter.h>
Public Member Functions | |
ControllableParameter ()=default | |
virtual | ~ControllableParameter ()=default |
ControllableParameter (ControllableParameter &&)=default | |
ControllableParameter (const ControllableParameter &)=delete | |
ControllableParameter & | operator= (const ControllableParameter &)=delete |
ControllableParameter & | operator= (ControllableParameter &&)=delete |
bool | empty () |
Return true if the container is empty. More... | |
std::string | dump () const |
Return a string that lists the parameters stored by this object. More... | |
template<typename T > | |
void | set (const T &value, bool type_check=true) |
Set the value(s) of the controlled parameters stored in this class. More... | |
template<typename T > | |
std::vector< T > | get (bool type_check=true, bool warn_when_values_difffer=false) const |
Return a copy of the values of the given type. More... | |
template<typename T > | |
bool | check () |
Check size() and the type of the stored items, i.e., there must be items with the given type. More... | |
void | checkExecuteOnType (const ExecFlagType ¤t) const |
Check the execute flags. More... | |
void | add (ControllableItem *item) |
Adds the supplied item with the other items within this object. More... | |
Private Attributes | |
std::vector< ControllableItem * > | _items |
Storage for the ControllableItems, these are stored as pointers to avoid copies. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const ControllableParameter &obj) |
Allows this to be used with std:: cout. More... | |
The ControllableParameter class is simply a set of ControllableItem objects.
This object is what is used from within a Control for setting input parameter values. These objects are made on demand by the Control objects.
This class is needed to allow for multiple parameters to be set with a single interface.
Definition at line 26 of file ControllableParameter.h.
|
default |
|
virtualdefault |
|
default |
|
delete |
void ControllableParameter::add | ( | ControllableItem * | item | ) |
Adds the supplied item with the other items within this object.
Definition at line 14 of file ControllableParameter.C.
Referenced by InputParameterWarehouse::getControllableParameter().
bool ControllableParameter::check | ( | ) |
Check size() and the type of the stored items, i.e., there must be items with the given type.
Definition at line 129 of file ControllableParameter.h.
void ControllableParameter::checkExecuteOnType | ( | const ExecFlagType & | current | ) | const |
Check the execute flags.
Definition at line 29 of file ControllableParameter.C.
std::string ControllableParameter::dump | ( | ) | const |
Return a string that lists the parameters stored by this object.
This is used by ControlInterface::getControlParamByName for error reporting.
Definition at line 20 of file ControllableParameter.C.
Referenced by get(), and operator<<().
|
inline |
Return true if the container is empty.
Definition at line 40 of file ControllableParameter.h.
Referenced by check(), and Control::hasControllableParameterByName().
std::vector< T > ControllableParameter::get | ( | bool | type_check = true , |
bool | warn_when_values_difffer = false |
||
) | const |
Return a copy of the values of the given type.
Definition at line 96 of file ControllableParameter.h.
Referenced by InputParameterWarehouse::getControllableParameterValues(), and Control::getControllableValueByName().
|
delete |
|
delete |
void ControllableParameter::set | ( | const T & | value, |
bool | type_check = true |
||
) |
Set the value(s) of the controlled parameters stored in this class.
value | The value to change the parameters to. |
Definition at line 88 of file ControllableParameter.h.
Referenced by Control::setControllableValueByName().
|
friend |
Allows this to be used with std:: cout.
Definition at line 46 of file ControllableParameter.C.
|
private |
Storage for the ControllableItems, these are stored as pointers to avoid copies.
Definition at line 83 of file ControllableParameter.h.
Referenced by add(), check(), checkExecuteOnType(), dump(), empty(), get(), and set().