42#ifndef TEUCHOS_ARRAY_CONVERSIONS_H
43#define TEUCHOS_ARRAY_CONVERSIONS_H
62template<
class ArrayPtrT_in,
class T_out>
69 as<Teuchos_Ordinal>(a_out.size()));
71 for (
Teuchos_Ordinal i = 0; i < as<Teuchos_Ordinal>(a_in.size()); ++i) {
72 a_out[i] = a_in[i].ptr();
80template<
class ArrayPtrT_in,
class T_out>
87 as<Teuchos_Ordinal>(a_out.size()));
89 for (
Teuchos_Ordinal i = 0; i < as<Teuchos_Ordinal>(a_in.size()); ++i) {
115template<
class T_out,
class ArrayPtrT_in>
131template<
class T_out,
class ArrayPtrT_in>
152ArrayView<const Ptr<const T> >
155 return av_reinterpret_cast<const Ptr<const T> >(a_in);
170ArrayView<const RCP<const T> >
173 return av_reinterpret_cast<const RCP<const T> >(a_in);
Templated array class derived from the STL std::vector.
TEUCHOS_ORDINAL_TYPE Teuchos_Ordinal
Reference-counted pointer class and non-member templated function implementations.
Replacement for std::vector that is compatible with the Teuchos Memory Management classes.
Simple wrapper class for raw pointers to single objects where no persisting relationship exists.
Smart reference counting pointer class for automatic garbage collection.
#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 ...
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 ...
TypeTo as(const TypeFrom &t)
Convert from one value type to another.
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...
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...
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...
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...
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...