LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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 >:
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>
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:

  • static bool isValid(Cont const&) returning whether cont is valid

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 59 of file OpDetVisibilityData.h.


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