The Sparta Modeling Framework
|
Delegate for Parameter validation. More...
#include <Parameter.hpp>
Public Member Functions | |
ValidationCheckCallback (bool(*method)(ValueType &, const sparta::TreeNode *), const std::string &name) | |
Construct delegate with a class member pointer. | |
ValidationCheckCallback () | |
Construct with no functionality. | |
ValidationCheckCallback (const std::string &name) | |
Construct with no functionality and a name. | |
ValidationCheckCallback (const ValidationCheckCallback< ValueType > &rhp) | |
Copy Constructor. | |
void | operator= (const ValidationCheckCallback< ValueType > &rhp) |
std::string | getName () const |
bool | operator() (ValueType &val, const TreeNode *node) const |
Invoke callback to check given value at the indicated position in the device tree. | |
Static Public Member Functions | |
template<class T , bool(T::*)(ValueType &, const sparta::TreeNode *) TMethod> | |
static ValidationCheckCallback< ValueType > | from_method (T *obj, const std::string &name) |
static void | validateName (const std::string &nm) |
Delegate for Parameter validation.
Serves as a delegate to arbitrary class member, static member, or global method to perform tests on a given
Valid class member function and global/static functions must be of one of the forms:
Invoke the delegate using operator().
This class is copyable through construction, but not assignable.
Definition at line 988 of file Parameter.hpp.
|
inline |
Construct delegate with a class member pointer.
T | class type containing a member to which this delegate will point. |
TMethod | Member function of T which will be invoked by this delegate. |
obj | Object of templated class T on which this delegate will make its callback. |
name | Name of this validator. This should be an recognizable name in the context of a Parameter so that failure of this dependency are obvious. There are no name limitations except that it must not contain a comma. Construct with a static method or normal function pointer |
Definition at line 1033 of file Parameter.hpp.
|
inline |
Construct with no functionality.
Definition at line 1042 of file Parameter.hpp.
|
inline |
Construct with no functionality and a name.
Definition at line 1050 of file Parameter.hpp.
|
inline |
Copy Constructor.
Definition at line 1058 of file Parameter.hpp.
|
inlinestatic |
Definition at line 998 of file Parameter.hpp.
|
inline |
Definition at line 1071 of file Parameter.hpp.
|
inline |
Invoke callback to check given value at the indicated position in the device tree.
Definition at line 1077 of file Parameter.hpp.
|
inline |
Definition at line 1065 of file Parameter.hpp.
|
inlinestatic |
Validates the given name string for this ValidationCheckCallback
ParameterException | if the name is invalid. |
Definition at line 1084 of file Parameter.hpp.