Sacado Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Sacado_TemplateManagerImp.hpp
Go to the documentation of this file.
1// $Id$
2// $Source$
3// @HEADER
4// ***********************************************************************
5//
6// Sacado Package
7// Copyright (2006) Sandia Corporation
8//
9// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
10// the U.S. Government retains certain rights in this software.
11//
12// This library is free software; you can redistribute it and/or modify
13// it under the terms of the GNU Lesser General Public License as
14// published by the Free Software Foundation; either version 2.1 of the
15// License, or (at your option) any later version.
16//
17// This library is distributed in the hope that it will be useful, but
18// WITHOUT ANY WARRANTY; without even the implied warranty of
19// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20// Lesser General Public License for more details.
21//
22// You should have received a copy of the GNU Lesser General Public
23// License along with this library; if not, write to the Free Software
24// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
25// USA
26// Questions? Contact David M. Gay (dmgay@sandia.gov) or Eric T. Phipps
27// (etphipp@sandia.gov).
28//
29// ***********************************************************************
30// @HEADER
31
32template <typename TypeSeq, typename BaseT, typename ObjectT>
35{
36 // Determine number of types
38 objects.resize(sz);
39}
40
41template <typename TypeSeq, typename BaseT, typename ObjectT>
46
47template <typename TypeSeq, typename BaseT, typename ObjectT>
48template <typename BuilderOpT>
49void
55
56template <typename TypeSeq, typename BaseT, typename ObjectT>
57void
64
65template <typename TypeSeq, typename BaseT, typename ObjectT>
66template<typename ScalarT>
67Teuchos::RCP<BaseT>
74
75template <typename TypeSeq, typename BaseT, typename ObjectT>
76template<typename ScalarT>
77Teuchos::RCP<const BaseT>
83
84template <typename TypeSeq, typename BaseT, typename ObjectT>
85template<typename ScalarT>
86Teuchos::RCP< typename Sacado::mpl::apply<ObjectT,ScalarT>::type >
89{
91 return Teuchos::rcp_dynamic_cast< typename Sacado::mpl::apply<ObjectT,ScalarT>::type >(objects[idx], true);
92}
93
94template <typename TypeSeq, typename BaseT, typename ObjectT>
95template<typename ScalarT>
96Teuchos::RCP< const typename Sacado::mpl::apply<ObjectT,ScalarT>::type >
98getAsObject() const
99{
101 return Teuchos::rcp_dynamic_cast< const typename Sacado::mpl::apply<ObjectT,ScalarT>::type >(objects[idx], true);
102}
103
104template <typename TypeSeq, typename BaseT, typename ObjectT>
111
112template <typename TypeSeq, typename BaseT, typename ObjectT>
119
120template <typename TypeSeq, typename BaseT, typename ObjectT>
127
128template <typename TypeSeq, typename BaseT, typename ObjectT>
Teuchos::RCP< typename Sacado::mpl::apply< ObjectT, ScalarT >::type > getAsObject()
Get RCP to object corrensponding to ScalarT as ObjectT<ScalarT>.
Sacado::TemplateManager< TypeSeq, BaseT, ObjectT >::iterator end()
Return an iterator that points one past the last type object.
TemplateManager()
Default constructor.
void buildObjects(const BuilderOpT &builder)
Build objects for each ScalarT.
Sacado::TemplateManager< TypeSeq, BaseT, ObjectT >::iterator begin()
Return an iterator that points to the first type object.
TemplateIterator< BaseT > iterator
Typedef for iterator.
ConstTemplateIterator< BaseT > const_iterator
Typedef for const_iterator.
std::vector< Teuchos::RCP< BaseT > > objects
Stores array of rcp's to objects of each type.
Teuchos::RCP< BaseT > getAsBase()
Get RCP to object corrensponding to ScalarT as BaseT.
void buildObjects()
Build objects for each ScalarT using default builder.
The default builder class for building objects for each ScalarT.
static const int value