10 #ifndef SACADO_TEMPLATE_CONTAINER_HPP
11 #define SACADO_TEMPLATE_CONTAINER_HPP
13 #include <type_traits>
34 template <
typename TypeSeq,
36 typename Iter1 =
typename mpl::begin<TypeSeq>::type,
37 typename Iter2 =
typename mpl::end<TypeSeq>::type>
46 typename Enabled =
void>
75 template <
typename TypeSeq,
typename ObjectT>
82 template <
typename BuilderOpT>
87 const BuilderOpT& builder_) :
129 template <
typename BuilderOpT = DefaultBuilderOp>
130 void build(
const BuilderOpT& builder) {
144 template <
typename TypeSeq,
typename ObjectT,
typename FunctorT>
146 const FunctorT& op) {
153 template <
typename TypeSeq,
typename ObjectT,
typename FunctorT>
155 const FunctorT& op) {
164 template <
typename TypeSeq,
typename ObjectT>
169 template <
typename TypeSeq,
typename ObjectT>
179 template <
typename TypeSeq,
184 TupleSeq<TypeSeq, ObjectT, typename mpl::next<Iter1>::type, Iter2>
191 template <
typename TypeSeq,
194 struct TupleSeq<TypeSeq, ObjectT, Iter1, Iter1> {};
197 template <
typename T,
205 template <
typename T,
215 typename mpl::enable_if_c<
216 std::is_same< T, typename mpl::deref<Iter1>::type
230 template <
typename T,
240 typename mpl::enable_if_c<
241 !std::is_same< T, typename mpl::deref<Iter1>::type
244 GetTupleSeq< T, TypeSeq, ObjectT, typename mpl::next<Iter1>::type, Iter2>
247 template <
typename T,
Impl::TupleSeq< TypeSeq, ObjectT > tuple_type
Our container for storing each object.
Container class to manager template instantiations of a template class.
void container_for_each(TemplateContainer< TypeSeq, ObjectT > &container, const FunctorT &op)
const BuilderOpT & builder
tuple_type objects
Stores type of objects of each type.
static TupleSeq< TypeSeq, ObjectT, Iter1, Iter2 >::type & apply(TupleSeq< TypeSeq, ObjectT, Iter1, Iter2 > &t)
F::template apply< A1, A2, A3, A4, A5 >::type type
The default builder class for building objects for each ScalarT.
void container_for_each_no_kokkos(TemplateContainer< TypeSeq, ObjectT > &container, const FunctorT &op)
static const TupleSeq< TypeSeq, ObjectT, Iter1, Iter2 >::type & apply(const TupleSeq< TypeSeq, ObjectT, Iter1, Iter2 > &t)
BuildObject(tuple_type &objects_, const BuilderOpT &builder_)
Helper class for building objects in container.
TemplateContainer()
Default constructor.
TypeSeq types
Type sequence containing template types.
Sacado::mpl::apply< ObjectT, T >::type operator()(T) const
Returns a new object of type ObjectT<ScalarT>
void operator()(T x) const
end< TypeSeq >::type type
~TemplateContainer()
Destructor.
void build(const BuilderOpT &builder)
Build objects for each type T.
mpl::apply< ObjectT, typename mpl::deref< typename mpl::begin< TypeSeq >::type >::type >::type type
begin< TypeSeq >::type type