30#ifndef SACADO_TEMPLATE_CONTAINER_HPP
31#define SACADO_TEMPLATE_CONTAINER_HPP
54 template <
typename TypeSeq,
56 typename Iter1 =
typename mpl::begin<TypeSeq>::type,
57 typename Iter2 =
typename mpl::end<TypeSeq>::type>
64 typename Iter1 =
typename mpl::begin<TypeSeq>::type,
65 typename Iter2 =
typename mpl::end<TypeSeq>::type,
66 typename Enabled =
void>
95 template <
typename TypeSeq,
typename ObjectT>
102 template <
typename BuilderOpT>
107 const BuilderOpT& builder_) :
149 template <
typename BuilderOpT = DefaultBuilderOp>
150 void build(
const BuilderOpT& builder) {
164 template <
typename TypeSeq,
typename ObjectT,
typename FunctorT>
166 const FunctorT& op) {
173 template <
typename TypeSeq,
typename ObjectT,
typename FunctorT>
175 const FunctorT& op) {
184 template <
typename TypeSeq,
typename ObjectT>
189 template <
typename TypeSeq,
typename ObjectT>
199 template <
typename TypeSeq,
204 TupleSeq<TypeSeq, ObjectT, typename mpl::next<Iter1>::type, Iter2>
211 template <
typename TypeSeq,
214 struct TupleSeq<TypeSeq, ObjectT, Iter1, Iter1> {};
217 template <
typename T,
225 template <
typename T,
235 typename
mpl::enable_if_c<
236 std::is_same< T, typename mpl::deref<Iter1>::type
250 template <
typename T,
260 typename
mpl::enable_if_c<
261 !std::is_same< T, typename mpl::deref<Iter1>::type
264 GetTupleSeq< T, TypeSeq, ObjectT, typename mpl::next<Iter1>::type, Iter2>
267 template <
typename T,
Container class to manager template instantiations of a template class.
tuple_type objects
Stores type of objects of each type.
void build(const BuilderOpT &builder)
Build objects for each type T.
const Sacado::mpl::apply< ObjectT, T >::type & get() const
Get object corrensponding ObjectT<T>.
Impl::TupleSeq< TypeSeq, ObjectT > tuple_type
Our container for storing each object.
TypeSeq types
Type sequence containing template types.
TemplateContainer()
Default constructor.
Sacado::mpl::apply< ObjectT, T >::type & get()
Get object corrensponding ObjectT<T>.
~TemplateContainer()
Destructor.
void container_for_each_no_kokkos(TemplateContainer< TypeSeq, ObjectT > &container, const FunctorT &op)
void container_for_each(TemplateContainer< TypeSeq, ObjectT > &container, const FunctorT &op)
static TupleSeq< TypeSeq, ObjectT, Iter1, Iter2 >::type & apply(TupleSeq< TypeSeq, ObjectT, Iter1, Iter2 > &t)
static const TupleSeq< TypeSeq, ObjectT, Iter1, Iter2 >::type & apply(const TupleSeq< TypeSeq, ObjectT, Iter1, Iter2 > &t)
mpl::apply< ObjectT, typenamempl::deref< Iter1 >::type >::type type
Helper class for building objects in container.
const BuilderOpT & builder
BuildObject(tuple_type &objects_, const BuilderOpT &builder_)
void operator()(T x) const
The default builder class for building objects for each ScalarT.
Sacado::mpl::apply< ObjectT, T >::type operator()(T) const
Returns a new object of type ObjectT<ScalarT>.
F::template apply< mpl::none, mpl::none, mpl::none, mpl::none, mpl::none >::type type
begin< TypeSeq >::type type
end< TypeSeq >::type type