![]() |
This is Unofficial EPICS BASE Doxygen Site
|
Validation methods for NT types. More...
#include "validator.h"
Classes | |
struct | Error |
Public Types | |
enum | result_t { Pass, Fail } |
Public Member Functions | |
Result (const epics::pvData::FieldConstPtr &field, const std::string &path=std::string()) | |
Result () | |
Result & | operator|= (const Result &other) |
bool | valid (void) const |
template<typename T > | |
Result & | is (void) |
template<typename T > | |
Result & | is (const std::string &id) |
template<Result &(*)(Result &) fn> | |
Result & | has (const std::string &name) |
template<Result &(*)(Result &) fn> | |
Result & | maybeHas (const std::string &name) |
template<Result &(*)(Result &) fn, typename T > | |
Result & | has (const std::string &name) |
template<Result &(*)(Result &) fn, typename T > | |
Result & | maybeHas (const std::string &name) |
template<typename T > | |
Result & | has (const std::string &name) |
template<typename T > | |
Result & | maybeHas (const std::string &name) |
std::ostream & | dump (std::ostream &os) const |
Public Attributes | |
epics::pvData::FieldConstPtr | field |
std::string | path |
std::vector< Error > | errors |
enum epics::nt::Result::result_t | result |
Validation methods for NT types.
Definition at line 23 of file validator.h.
Enumerator | |
---|---|
Pass | |
Fail |
Definition at line 56 of file validator.h.
|
inline |
Definition at line 61 of file validator.h.
|
inline |
Definition at line 64 of file validator.h.
|
inline |
Definition at line 220 of file validator.h.
|
inline |
Test that this Result's field has a subfield with name 'name' and apply the function 'fn' to the subfield.
Appends an Error::Type::IncorrectType if the field is not one of Structure, StructureArray, Union, UnionArray. Appends an Error::Type::MissingField if the subfield is not present.
Definition at line 132 of file validator.h.
|
inline |
Test that this Result's field has a subfield with name 'name', apply the function 'fn' to the subfield and test that the subfield is of type 'T'.
Appends an Error::Type::IncorrectType if the field is not one of Structure, StructureArray, Union, UnionArray. Appends an Error::Type::IncorrectType if the subfield is not of type 'T'. Appends an Error::Type::MissingField if the subfield is not present.
Definition at line 165 of file validator.h.
|
inline |
Test that this Result's field has a subfield with name 'name' and test that the subfield is of type 'T'.
Appends an Error::Type::IncorrectType if the field is not one of Structure, StructureArray, Union, UnionArray. Appends an Error::Type::IncorrectType if the subfield is not of type 'T'. Appends an Error::Type::MissingField if the subfield is not present.
Definition at line 200 of file validator.h.
|
inline |
Test that this Result's field is of a particular type 'T'.
Appends an Error::Type::IncorrectType if the field is not of type 'T'.
Definition at line 89 of file validator.h.
|
inline |
Test that this Result's field is of a particular type 'T' and has an ID equal to 'id'.
Appends an Error::Type::IncorrectType if the field is not of type 'T'. Appends an Error::Type::IncorrectId if the field does not have an ID equal to 'id'.
Definition at line 108 of file validator.h.
|
inline |
Test that this Result's field has an optional subfield with name 'name' and, if it has, apply the function 'fn' to the subfield.
Appends an Error::Type::IncorrectType if the field is not one of Structure, StructureArray, Union, UnionArray.
Definition at line 146 of file validator.h.
|
inline |
Test that this Result's field has an optional subfield with name 'name' and, if it has, apply the function 'fn' to the subfield and test that the subfield is of type 'T'.
Appends an Error::Type::IncorrectType if the field is not one of Structure, StructureArray, Union, UnionArray. Appends an Error::Type::IncorrectType if the subfield exists and is not of type 'T'.
Definition at line 182 of file validator.h.
|
inline |
Test that this Result's field has an optional subfield with name 'name' and, if it has, test that the subfield is of type 'T'.
Appends an Error::Type::IncorrectType if the field is not one of Structure, StructureArray, Union, UnionArray. Appends an Error::Type::IncorrectType if the subfield exists and is not of type 'T'.
Definition at line 216 of file validator.h.
Definition at line 66 of file validator.h.
|
inline |
Returns whether this Result is valid.
Definition at line 77 of file validator.h.
std::vector<Error> epics::nt::Result::errors |
Definition at line 54 of file validator.h.
epics::pvData::FieldConstPtr epics::nt::Result::field |
Definition at line 52 of file validator.h.
std::string epics::nt::Result::path |
Definition at line 53 of file validator.h.
enum epics::nt::Result::result_t epics::nt::Result::result |