Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Teuchos::ArrayView< const T > Class Template Reference

Partial specialization of ArrayView for const T. More...

#include <Teuchos_ArrayViewDecl.hpp>

Public Types

typedef Teuchos_Ordinal Ordinal
 
typedef Ordinal size_type
 
typedef Ordinal difference_type
 
typedef const T value_type
 
typedef const T * pointer
 
typedef const T * const_pointer
 
typedef const T & reference
 
typedef const T & const_reference
 
typedef pointer iterator
 
typedef const_pointer const_iterator
 

Public Member Functions

 ArrayView (ENull null_arg=null)
 
 ArrayView (const T *p, size_type size, const ERCPNodeLookup rcpNodeLookup=RCP_ENABLE_NODE_LOOKUP)
 
 ArrayView (const ArrayView< const T > &array)
 
 ArrayView (std::vector< typename std::remove_const_t< T >> &vec)
 
 ArrayView (const std::vector< typename std::remove_const_t< T >> &vec)
 
ArrayView< const T > & operator= (const ArrayView< const T > &array)
 
 ~ArrayView ()
 
bool is_null () const
 
size_type size () const
 
std::string toString () const
 
const T * getRawPtr () const
 
const T * data () const
 
const T & operator[] (size_type i) const
 
const T & front () const
 
const T & back () const
 
ArrayView< const T > view (size_type offset, size_type size) const
 
ArrayView< const T > operator() (size_type offset, size_type size) const
 
const ArrayView< const T > & operator() () const
 
ArrayView< const T > getConst () const
 Return a const view of *this. More...
 
iterator begin () const
 
iterator end () const
 
const ArrayView< const T > & assert_not_null () const
 
const ArrayView< const T > & assert_in_range (size_type offset, size_type size) const
 
const T * access_private_ptr () const
 

Private Member Functions

void setUpIterators (const ERCPNodeLookup rcpNodeLookup=RCP_ENABLE_NODE_LOOKUP)
 
void debug_assert_not_null () const
 
void debug_assert_in_range (size_type offset, size_type size_in) const
 
void debug_assert_valid_ptr () const
 

Private Attributes

const T * ptr_
 
size_type size_
 

Detailed Description

template<class T>
class Teuchos::ArrayView< const T >

Partial specialization of ArrayView for const T.

The main documentation for ArrayView explains why this class needs a partial specialization for const types.

Definition at line 400 of file Teuchos_ArrayViewDecl.hpp.

Member Typedef Documentation

template<class T >
typedef Teuchos_Ordinal Teuchos::ArrayView< const T >::Ordinal

Definition at line 402 of file Teuchos_ArrayViewDecl.hpp.

template<class T >
typedef Ordinal Teuchos::ArrayView< const T >::size_type

Definition at line 403 of file Teuchos_ArrayViewDecl.hpp.

template<class T >
typedef Ordinal Teuchos::ArrayView< const T >::difference_type

Definition at line 404 of file Teuchos_ArrayViewDecl.hpp.

template<class T >
typedef const T Teuchos::ArrayView< const T >::value_type

Definition at line 405 of file Teuchos_ArrayViewDecl.hpp.

template<class T >
typedef const T* Teuchos::ArrayView< const T >::pointer

Definition at line 406 of file Teuchos_ArrayViewDecl.hpp.

template<class T >
typedef const T* Teuchos::ArrayView< const T >::const_pointer

Definition at line 407 of file Teuchos_ArrayViewDecl.hpp.

template<class T >
typedef const T& Teuchos::ArrayView< const T >::reference

Definition at line 408 of file Teuchos_ArrayViewDecl.hpp.

template<class T >
typedef const T& Teuchos::ArrayView< const T >::const_reference

Definition at line 409 of file Teuchos_ArrayViewDecl.hpp.

template<class T >
typedef pointer Teuchos::ArrayView< const T >::iterator

Definition at line 415 of file Teuchos_ArrayViewDecl.hpp.

template<class T >
typedef const_pointer Teuchos::ArrayView< const T >::const_iterator

Definition at line 416 of file Teuchos_ArrayViewDecl.hpp.

Constructor & Destructor Documentation

template<class T >
Teuchos::ArrayView< const T >::ArrayView ( ENull  null_arg = null)
inline

Definition at line 33 of file Teuchos_ArrayView.hpp.

template<class T >
Teuchos::ArrayView< const T >::ArrayView ( const T *  p,
size_type  size,
const ERCPNodeLookup  rcpNodeLookup = RCP_ENABLE_NODE_LOOKUP 
)
inline

Definition at line 66 of file Teuchos_ArrayView.hpp.

template<class T >
Teuchos::ArrayView< const T >::ArrayView ( const ArrayView< const T > &  array)
inline

Definition at line 99 of file Teuchos_ArrayView.hpp.

template<class T >
Teuchos::ArrayView< const T >::ArrayView ( std::vector< typename std::remove_const_t< T >> &  vec)
inline

Definition at line 117 of file Teuchos_ArrayView.hpp.

template<class T >
Teuchos::ArrayView< const T >::ArrayView ( const std::vector< typename std::remove_const_t< T >> &  vec)
inline

Definition at line 136 of file Teuchos_ArrayView.hpp.

template<class T >
Teuchos::ArrayView< const T >::~ArrayView ( )
inline

Definition at line 173 of file Teuchos_ArrayView.hpp.

Member Function Documentation

template<class T >
ArrayView< const T > & Teuchos::ArrayView< const T >::operator= ( const ArrayView< const T > &  array)
inline

Definition at line 157 of file Teuchos_ArrayView.hpp.

template<class T >
bool Teuchos::ArrayView< const T >::is_null ( ) const
inline

Definition at line 189 of file Teuchos_ArrayView.hpp.

template<class T >
ArrayView< const T >::size_type Teuchos::ArrayView< const T >::size ( ) const
inline

Definition at line 203 of file Teuchos_ArrayView.hpp.

template<typename T >
std::string Teuchos::ArrayView< const T >::toString ( ) const

Definition at line 231 of file Teuchos_ArrayView.hpp.

template<class T >
const T * Teuchos::ArrayView< const T >::getRawPtr ( ) const
inline

Definition at line 294 of file Teuchos_ArrayView.hpp.

template<class T >
const T * Teuchos::ArrayView< const T >::data ( ) const
inline

Definition at line 301 of file Teuchos_ArrayView.hpp.

template<class T >
const T & Teuchos::ArrayView< const T >::operator[] ( size_type  i) const
inline

Definition at line 316 of file Teuchos_ArrayView.hpp.

template<class T >
const T & Teuchos::ArrayView< const T >::front ( ) const
inline

Definition at line 333 of file Teuchos_ArrayView.hpp.

template<class T >
const T & Teuchos::ArrayView< const T >::back ( ) const
inline

Definition at line 349 of file Teuchos_ArrayView.hpp.

template<class T >
ArrayView< const T > Teuchos::ArrayView< const T >::view ( size_type  offset,
size_type  size 
) const
inline

Definition at line 377 of file Teuchos_ArrayView.hpp.

template<class T >
ArrayView< const T > Teuchos::ArrayView< const T >::operator() ( size_type  offset,
size_type  size 
) const
inline

Definition at line 400 of file Teuchos_ArrayView.hpp.

template<class T >
const ArrayView< const T > & Teuchos::ArrayView< const T >::operator() ( ) const
inline

Definition at line 414 of file Teuchos_ArrayView.hpp.

template<class T >
ArrayView< const T > Teuchos::ArrayView< const T >::getConst ( ) const
inline

Return a const view of *this.

This object is already const (this is a specialization for const T), so this method is trivial; it just returns *this.

Definition at line 433 of file Teuchos_ArrayView.hpp.

template<class T >
ArrayView< const T >::iterator Teuchos::ArrayView< const T >::begin ( ) const

Definition at line 477 of file Teuchos_ArrayView.hpp.

template<class T >
ArrayView< const T >::iterator Teuchos::ArrayView< const T >::end ( ) const

Definition at line 500 of file Teuchos_ArrayView.hpp.

template<class T >
const ArrayView< const T > & Teuchos::ArrayView< const T >::assert_not_null ( ) const

Definition at line 523 of file Teuchos_ArrayView.hpp.

template<class T >
const ArrayView< const T > & Teuchos::ArrayView< const T >::assert_in_range ( size_type  offset,
size_type  size 
) const

Definition at line 554 of file Teuchos_ArrayView.hpp.

template<class T >
void Teuchos::ArrayView< const T >::setUpIterators ( const ERCPNodeLookup  rcpNodeLookup = RCP_ENABLE_NODE_LOOKUP)
private

Definition at line 617 of file Teuchos_ArrayView.hpp.

template<class T >
void Teuchos::ArrayView< const T >::debug_assert_not_null ( ) const
inlineprivate

Definition at line 492 of file Teuchos_ArrayViewDecl.hpp.

template<class T >
void Teuchos::ArrayView< const T >::debug_assert_in_range ( size_type  offset,
size_type  size_in 
) const
inlineprivate

Definition at line 498 of file Teuchos_ArrayViewDecl.hpp.

template<class T >
void Teuchos::ArrayView< const T >::debug_assert_valid_ptr ( ) const
inlineprivate

Definition at line 505 of file Teuchos_ArrayViewDecl.hpp.

template<class T >
const T* Teuchos::ArrayView< const T >::access_private_ptr ( ) const
inline

Definition at line 515 of file Teuchos_ArrayViewDecl.hpp.

Member Data Documentation

template<class T >
const T* Teuchos::ArrayView< const T >::ptr_
private

Definition at line 484 of file Teuchos_ArrayViewDecl.hpp.

template<class T >
size_type Teuchos::ArrayView< const T >::size_
private

Definition at line 485 of file Teuchos_ArrayViewDecl.hpp.


The documentation for this class was generated from the following files: