All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
phot::LibraryDataValidatorStruct< Cont, Enable > Struct Template Reference

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

#include <OpDetVisibilityData.h>

Inheritance diagram for phot::LibraryDataValidatorStruct< Cont, Enable >:
phot::details::LibraryDataValidatorStructStandardImpl< std::remove_reference_t< Cont > > phot::details::LibraryDataValidatorStructStandardImpl_pointer< std::remove_reference_t< Cont > > phot::details::LibraryDataValidatorStructStandardImpl_unique_ptr< std::remove_reference_t< Cont > > phot::details::LibraryDataValidatorStructStandardImpl_isValid< std::remove_reference_t< Cont > > phot::details::LibraryDataValidatorStructStandardImpl_is_valid< std::remove_reference_t< Cont > > phot::details::LibraryDataValidatorStructStandardImpl_empty< std::remove_reference_t< Cont > > phot::details::LibraryDataValidatorStructStandardImpl_size< std::remove_reference_t< Cont > >

Detailed Description

template<typename Cont, typename Enable = void>
struct phot::LibraryDataValidatorStruct< Cont, Enable >

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: