phot::LibraryDataValidatorStruct< Cont, typename > Struct Template Reference

Trait for determining the validity of library data in a container. More...

#include <OpDetVisibilityData.h>

Inheritance diagram for phot::LibraryDataValidatorStruct< Cont, typename >:

Detailed Description

template<typename Cont, typename>
struct phot::LibraryDataValidatorStruct< Cont, typename >

Trait for determining the validity of library data in a container.

Template Parameters
Conttype of container being tested
Enabledummy type for std::enable_if_t hooks

This class is expected to be specialized to provide specific behavior for custom classes. The required interface consists of the single static method:

For example:

template <typename T, std::size_t N>
struct MyArray;
template <typename T, std::size_t N>
struct LibraryDataValidatorStruct<MyArray<T, N>, void> {
static bool isValid(Cont const&) { return N > 0U; }
};

or

template <typename T>
struct MyVector;
template <typename T>
struct LibraryDataValidatorStruct
<T, std::enable_if_t<util::is_instance_of<MyVector, T>>>
{
static bool isValid(Cont const& cont) { return !cont.isInvalid(); }
};

Definition at line 60 of file OpDetVisibilityData.h.


The documentation for this struct was generated from the following file: