10 #ifndef TEUCHOS_ARRAY_CONVERSIONS_H
11 #define TEUCHOS_ARRAY_CONVERSIONS_H
17 #include "Teuchos_Ptr.hpp"
20 #include "Teuchos_Assert.hpp"
30 template<
class ArrayPtrT_in,
class T_out>
37 as<Teuchos_Ordinal>(a_out.size()));
39 for (Teuchos_Ordinal i = 0; i < as<Teuchos_Ordinal>(a_in.size()); ++i) {
40 a_out[i] = a_in[i].ptr();
48 template<
class ArrayPtrT_in,
class T_out>
55 as<Teuchos_Ordinal>(a_out.size()));
57 for (Teuchos_Ordinal i = 0; i < as<Teuchos_Ordinal>(a_in.size()); ++i) {
83 template<
class T_out,
class ArrayPtrT_in>
99 template<
class T_out,
class ArrayPtrT_in>
120 ArrayView<const Ptr<const T> >
138 ArrayView<const RCP<const T> >
148 #endif // TEUCHOS_ARRAY_CONVERSIONS_H
Array< RCP< T_out > > arrayRcpConv(const ArrayPtrT_in &a_in)
Utility function to convert any Array[View,RCP]<[const] RCP<T_in> > object to an Array<RCP<T_out> > o...
void arrayViewPtrConv(const ArrayPtrT_in &a_in, const ArrayView< Ptr< T_out > > &a_out)
Utility function to convert from an an input Array[View,RCP]<[const] PTR<T_in> > object to an output ...
void arrayViewRcpConv(const ArrayPtrT_in &a_in, const ArrayView< RCP< T_out > > &a_out)
Utility function to convert from an input Array[View,RCP]<[const] RCP<T_in> > object to an output Arr...
ArrayView< const RCP< const T > > arrayConstRcpConstCast(const ArrayView< const RCP< T > > &a_in)
Utility function that does a reinterpret case to convert an ArrayView<const RCP<T> > object to an Arr...
Templated array class derived from the STL std::vector.
Array< Ptr< T_out > > arrayPtrConv(const ArrayPtrT_in &a_in)
Utility function to convert an Array[View,RCP]<[const] PTR<T_in> > object to an Array<Ptr<T_out> > ob...
TypeTo as(const TypeFrom &t)
Convert from one value type to another.
Smart reference counting pointer class for automatic garbage collection.
ArrayView< const Ptr< const T > > arrayConstPtrConstCast(const ArrayView< const Ptr< T > > &a_in)
Utility function that does a reinterpret case to convert an ArrayView<const Ptr<T> > object to an Arr...
#define TEUCHOS_ASSERT_EQUALITY(val1, val2)
This macro is checks that to numbers are equal and if not then throws an exception with a good error ...
Reference-counted pointer class and non-member templated function implementations.
Simple wrapper class for raw pointers to single objects where no persisting relationship exists...
Replacement for std::vector that is compatible with the Teuchos Memory Management classes...