Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
ObjexxFCL::CArray< typename > Class Template Reference

CArray: Memory-Managed C Array Wrapper. More...

#include <CArray.hh>

Public Types

typedef T value_type
 
typedef Treference
 
typedef T const & const_reference
 
typedef Tpointer
 
typedef T const * const_pointer
 
typedef Titerator
 
typedef T const * const_iterator
 
typedef std::size_t size_type
 
typedef std::ptrdiff_t difference_type
 
typedef T Value
 
typedef TReference
 
typedef T const & ConstReference
 
typedef TPointer
 
typedef T const * ConstPointer
 
typedef TIterator
 
typedef T const * ConstIterator
 
typedef std::size_t Size
 
typedef std::ptrdiff_t Difference
 
typedef void iterator_category
 

Public Member Functions

 CArray ()
 Default constructor. More...
 
 CArray (CArray const &a)
 Copy constructor. More...
 
template<typename U >
 CArray (CArray< U > const &a)
 Copy constructor template. More...
 
 CArray (T const *const p, size_type const size_a)
 Pointer + size constructor. More...
 
template<typename U >
 CArray (U const *const p, size_type const size_a)
 Pointer + size constructor template. More...
 
template<typename InputIterator >
 CArray (InputIterator const beg, InputIterator const end)
 Iterator range constructor template. More...
 
 CArray (size_type const size_a)
 Size constructor. More...
 
 CArray (size_type const size_a, T const &t)
 Size + uniform value constructor. More...
 
 ~CArray ()
 Destructor. More...
 
 operator bool () const
 Active? More...
 
CArrayoperator= (CArray const &a)
 Copy assignment. More...
 
template<typename U >
CArrayoperator= (CArray< U > const &a)
 Copy assignment template. More...
 
CArrayoperator= (T const &t)
 Uniform value assignment. More...
 
CArrayassign (T const *const p, size_type const size_a)
 Pointer + size assignment. More...
 
template<typename U >
CArrayassign (U const *const p, size_type const size_a)
 Pointer + size assignment template. More...
 
template<typename InputIterator >
CArrayassign (InputIterator const beg, InputIterator const end)
 Iterator range assignment template. More...
 
CArrayassign (size_type const size_a, T const &value)
 Size + value assignment. More...
 
template<typename U >
CArrayoperator+= (CArray< U > const &a)
 += CArray More...
 
template<typename U >
CArrayoperator-= (CArray< U > const &a)
 -= CArray More...
 
CArrayoperator+= (T const &t)
 += value More...
 
CArrayoperator-= (T const &t)
 -= value More...
 
CArrayoperator*= (T const &t)
 *= value More...
 
CArrayoperator/= (T const &t)
 /= value More...
 
bool active () const
 Active? More...
 
bool empty () const
 Empty? More...
 
size_type size () const
 Size. More...
 
T const & front () const
 First element. More...
 
T const & back () const
 Last element. More...
 
T length () const
 Length. More...
 
T length_squared () const
 Length squared. More...
 
Tfront ()
 First element. More...
 
Tback ()
 Last element. More...
 
CArraysize (size_type const size_a)
 Resize: Values not preserved. More...
 
CArrayresize (size_type const size_a, T const &fill=T())
 Resize to size with fill value: Values preserved. More...
 
void swap (CArray &a)
 Swap. More...
 
CArrayclear ()
 Clear. More...
 
CArraynormalize ()
 Normalize to unit length. More...
 
T const & operator[] (size_type const i) const
 CArray[ i ] const: 0-based indexing. More...
 
Toperator[] (size_type const i)
 CArray[ i ]: 0-based indexing. More...
 
const_iterator begin () const
 const_iterator to beginning of array More...
 
iterator begin ()
 iterator to beginning of array More...
 
const_iterator end () const
 const_iterator to element past end of array More...
 
iterator end ()
 iterator to element past end of array More...
 
T const & operator() () const
 C array const accessor. More...
 
Toperator() ()
 C array non-const accessor. More...
 

Static Private Member Functions

static T square (T const &x)
 square( x ) == x^2 More...
 

Private Attributes

size_type size_
 Number of array elements. More...
 
Tarray_
 C array. More...
 

Friends

template<typename >
class CArray
 
bool comparable (CArray const &a, CArray const &b)
 Are two CArrays comparable? More...
 
bool operator== (CArray const &a, CArray const &b)
 CArray == CArray. More...
 
bool operator!= (CArray const &a, CArray const &b)
 CArray != CArray. More...
 
bool operator< (CArray const &a, CArray const &b)
 CArray < CArray. More...
 
bool operator<= (CArray const &a, CArray const &b)
 CArray <= CArray. More...
 
bool operator>= (CArray const &a, CArray const &b)
 CArray >= CArray. More...
 
bool operator> (CArray const &a, CArray const &b)
 CArray > CArray. More...
 
bool operator== (CArray const &a, T const &t)
 CArray == T. More...
 
bool operator!= (CArray const &a, T const &t)
 CArray != T. More...
 
bool operator< (CArray const &a, T const &t)
 CArray < T. More...
 
bool operator<= (CArray const &a, T const &t)
 CArray <= T. More...
 
bool operator>= (CArray const &a, T const &t)
 CArray >= T. More...
 
bool operator> (CArray const &a, T const &t)
 CArray > T. More...
 
bool operator== (T const &t, CArray const &a)
 T == CArray. More...
 
bool operator!= (T const &t, CArray const &a)
 T != CArray. More...
 
bool operator< (T const &t, CArray const &a)
 T < CArray. More...
 
bool operator<= (T const &t, CArray const &a)
 T <= CArray. More...
 
bool operator>= (T const &t, CArray const &a)
 T >= CArray. More...
 
bool operator> (T const &t, CArray const &a)
 T > CArray. More...
 
CArray operator- (CArray const &a)
 -CArray More...
 
CArray operator+ (CArray const &a, CArray const &b)
 CArray + CArray. More...
 
CArray operator- (CArray const &a, CArray const &b)
 CArray - CArray. More...
 
CArray operator+ (CArray const &a, T const &t)
 CArray + Value. More...
 
CArray operator+ (T const &t, CArray const &a)
 Value + CArray. More...
 
CArray operator- (CArray const &a, T const &t)
 CArray - Value. More...
 
CArray operator- (T const &t, CArray const &a)
 Value - CArray. More...
 
CArray operator* (CArray const &a, T const &t)
 CArray * Value. More...
 
CArray operator* (T const &t, CArray const &a)
 Value * CArray. More...
 
CArray operator/ (CArray const &a, T const &t)
 CArray / Value. More...
 
T dot_product (CArray const &a, CArray const &b)
 Dot product. More...
 
T dot (CArray const &a, CArray const &b)
 Dot product. More...
 
T distance (CArray const &a, CArray const &b)
 Distance. More...
 
T distance_squared (CArray const &a, CArray const &b)
 Distance squared. More...
 
void swap (CArray &a, CArray &b)
 Swap. More...
 

Detailed Description

template<typename>
class ObjexxFCL::CArray< typename >

CArray: Memory-Managed C Array Wrapper.

Member Typedef Documentation

template<typename >
typedef T const* ObjexxFCL::CArray< typename >::const_iterator
template<typename >
typedef T const* ObjexxFCL::CArray< typename >::const_pointer
template<typename >
typedef T const& ObjexxFCL::CArray< typename >::const_reference
template<typename >
typedef T const* ObjexxFCL::CArray< typename >::ConstIterator
template<typename >
typedef T const* ObjexxFCL::CArray< typename >::ConstPointer
template<typename >
typedef T const& ObjexxFCL::CArray< typename >::ConstReference
template<typename >
typedef std::ptrdiff_t ObjexxFCL::CArray< typename >::Difference
template<typename >
typedef std::ptrdiff_t ObjexxFCL::CArray< typename >::difference_type
template<typename >
typedef T* ObjexxFCL::CArray< typename >::iterator
template<typename >
typedef T* ObjexxFCL::CArray< typename >::Iterator
template<typename >
typedef void ObjexxFCL::CArray< typename >::iterator_category
template<typename >
typedef T* ObjexxFCL::CArray< typename >::pointer
template<typename >
typedef T* ObjexxFCL::CArray< typename >::Pointer
template<typename >
typedef T& ObjexxFCL::CArray< typename >::reference
template<typename >
typedef T& ObjexxFCL::CArray< typename >::Reference
template<typename >
typedef std::size_t ObjexxFCL::CArray< typename >::Size
template<typename >
typedef std::size_t ObjexxFCL::CArray< typename >::size_type
template<typename >
typedef T ObjexxFCL::CArray< typename >::Value
template<typename >
typedef T ObjexxFCL::CArray< typename >::value_type

Constructor & Destructor Documentation

template<typename >
ObjexxFCL::CArray< typename >::CArray ( )
inline
template<typename >
ObjexxFCL::CArray< typename >::CArray ( CArray< typename > const &  a)
inline
template<typename >
template<typename U >
ObjexxFCL::CArray< typename >::CArray ( CArray< U > const &  a)
inline
template<typename >
ObjexxFCL::CArray< typename >::CArray ( T const *const  p,
size_type const  size_a 
)
inline
template<typename >
template<typename U >
ObjexxFCL::CArray< typename >::CArray ( U const *const  p,
size_type const  size_a 
)
inline
template<typename >
template<typename InputIterator >
ObjexxFCL::CArray< typename >::CArray ( InputIterator const  beg,
InputIterator const  end 
)
inline
template<typename >
ObjexxFCL::CArray< typename >::CArray ( size_type const  size_a)
inlineexplicit

Size constructor.

Note
Built-in value types are not initialized
template<typename >
ObjexxFCL::CArray< typename >::CArray ( size_type const  size_a,
T const &  t 
)
inline
template<typename >
ObjexxFCL::CArray< typename >::~CArray ( )
inline

Destructor.

References ObjexxFCL::CArray< typename >::array_.

Member Function Documentation

template<typename >
bool ObjexxFCL::CArray< typename >::active ( ) const
inline
template<typename >
CArray& ObjexxFCL::CArray< typename >::assign ( T const *const  p,
size_type const  size_a 
)
inline
template<typename >
template<typename U >
CArray& ObjexxFCL::CArray< typename >::assign ( U const *const  p,
size_type const  size_a 
)
inline
template<typename >
template<typename InputIterator >
CArray& ObjexxFCL::CArray< typename >::assign ( InputIterator const  beg,
InputIterator const  end 
)
inline
template<typename >
CArray& ObjexxFCL::CArray< typename >::assign ( size_type const  size_a,
T const &  value 
)
inline
template<typename >
T const& ObjexxFCL::CArray< typename >::back ( ) const
inline
template<typename >
T& ObjexxFCL::CArray< typename >::back ( )
inline
template<typename >
const_iterator ObjexxFCL::CArray< typename >::begin ( ) const
inline

const_iterator to beginning of array

References ObjexxFCL::CArray< typename >::array_.

template<typename >
iterator ObjexxFCL::CArray< typename >::begin ( )
inline

iterator to beginning of array

References ObjexxFCL::CArray< typename >::array_.

template<typename >
CArray& ObjexxFCL::CArray< typename >::clear ( )
inline
template<typename >
bool ObjexxFCL::CArray< typename >::empty ( ) const
inline
template<typename >
const_iterator ObjexxFCL::CArray< typename >::end ( ) const
inline

const_iterator to element past end of array

References ObjexxFCL::CArray< typename >::array_, and ObjexxFCL::CArray< typename >::size_.

template<typename >
iterator ObjexxFCL::CArray< typename >::end ( )
inline

iterator to element past end of array

References ObjexxFCL::CArray< typename >::array_, and ObjexxFCL::CArray< typename >::size_.

template<typename >
T const& ObjexxFCL::CArray< typename >::front ( ) const
inline
template<typename >
T& ObjexxFCL::CArray< typename >::front ( )
inline
template<typename >
T ObjexxFCL::CArray< typename >::length ( ) const
inline
template<typename >
T ObjexxFCL::CArray< typename >::length_squared ( ) const
inline
template<typename >
CArray& ObjexxFCL::CArray< typename >::normalize ( )
inline
template<typename >
ObjexxFCL::CArray< typename >::operator bool ( ) const
inline
template<typename >
T const& ObjexxFCL::CArray< typename >::operator() ( ) const
inline

C array const accessor.

References ObjexxFCL::CArray< typename >::array_.

template<typename >
T& ObjexxFCL::CArray< typename >::operator() ( )
inline

C array non-const accessor.

References ObjexxFCL::CArray< typename >::array_.

template<typename >
CArray& ObjexxFCL::CArray< typename >::operator*= ( T const &  t)
inline
template<typename >
template<typename U >
CArray& ObjexxFCL::CArray< typename >::operator+= ( CArray< U > const &  a)
inline
template<typename >
CArray& ObjexxFCL::CArray< typename >::operator+= ( T const &  t)
inline
template<typename >
template<typename U >
CArray& ObjexxFCL::CArray< typename >::operator-= ( CArray< U > const &  a)
inline
template<typename >
CArray& ObjexxFCL::CArray< typename >::operator-= ( T const &  t)
inline
template<typename >
CArray& ObjexxFCL::CArray< typename >::operator/= ( T const &  t)
inline
template<typename >
CArray& ObjexxFCL::CArray< typename >::operator= ( CArray< typename > const &  a)
inline
template<typename >
template<typename U >
CArray& ObjexxFCL::CArray< typename >::operator= ( CArray< U > const &  a)
inline
template<typename >
CArray& ObjexxFCL::CArray< typename >::operator= ( T const &  t)
inline
template<typename >
T const& ObjexxFCL::CArray< typename >::operator[] ( size_type const  i) const
inline
template<typename >
T& ObjexxFCL::CArray< typename >::operator[] ( size_type const  i)
inline
template<typename >
CArray& ObjexxFCL::CArray< typename >::resize ( size_type const  size_a,
T const &  fill = T() 
)
inline
template<typename >
size_type ObjexxFCL::CArray< typename >::size ( ) const
inline
template<typename >
CArray& ObjexxFCL::CArray< typename >::size ( size_type const  size_a)
inline

Resize: Values not preserved.

Note
Built-in values are uninitialized if size changes

References ObjexxFCL::CArray< typename >::CArray(), and ObjexxFCL::CArray< typename >::size_.

template<typename >
static T ObjexxFCL::CArray< typename >::square ( T const &  x)
inlinestaticprivate
template<typename >
void ObjexxFCL::CArray< typename >::swap ( CArray< typename > &  a)
inline

Friends And Related Function Documentation

template<typename >
template<typename >
friend class CArray
friend
template<typename >
bool comparable ( CArray< typename > const &  a,
CArray< typename > const &  b 
)
friend

Are two CArrays comparable?

template<typename >
T distance ( CArray< typename > const &  a,
CArray< typename > const &  b 
)
friend

Distance.

template<typename >
T distance_squared ( CArray< typename > const &  a,
CArray< typename > const &  b 
)
friend

Distance squared.

template<typename >
T dot ( CArray< typename > const &  a,
CArray< typename > const &  b 
)
friend

Dot product.

template<typename >
T dot_product ( CArray< typename > const &  a,
CArray< typename > const &  b 
)
friend

Dot product.

template<typename >
bool operator!= ( CArray< typename > const &  a,
CArray< typename > const &  b 
)
friend
template<typename >
bool operator!= ( CArray< typename > const &  a,
T const &  t 
)
friend

CArray != T.

template<typename >
bool operator!= ( T const &  t,
CArray< typename > const &  a 
)
friend

T != CArray.

template<typename >
CArray operator* ( CArray< typename > const &  a,
T const &  t 
)
friend

CArray * Value.

template<typename >
CArray operator* ( T const &  t,
CArray< typename > const &  a 
)
friend

Value * CArray.

template<typename >
CArray operator+ ( CArray< typename > const &  a,
CArray< typename > const &  b 
)
friend
template<typename >
CArray operator+ ( CArray< typename > const &  a,
T const &  t 
)
friend

CArray + Value.

template<typename >
CArray operator+ ( T const &  t,
CArray< typename > const &  a 
)
friend

Value + CArray.

template<typename >
CArray operator- ( CArray< typename > const &  a)
friend

-CArray

template<typename >
CArray operator- ( CArray< typename > const &  a,
CArray< typename > const &  b 
)
friend
template<typename >
CArray operator- ( CArray< typename > const &  a,
T const &  t 
)
friend

CArray - Value.

template<typename >
CArray operator- ( T const &  t,
CArray< typename > const &  a 
)
friend

Value - CArray.

template<typename >
CArray operator/ ( CArray< typename > const &  a,
T const &  t 
)
friend

CArray / Value.

template<typename >
bool operator< ( CArray< typename > const &  a,
CArray< typename > const &  b 
)
friend
template<typename >
bool operator< ( CArray< typename > const &  a,
T const &  t 
)
friend

CArray < T.

template<typename >
bool operator< ( T const &  t,
CArray< typename > const &  a 
)
friend

T < CArray.

template<typename >
bool operator<= ( CArray< typename > const &  a,
CArray< typename > const &  b 
)
friend
template<typename >
bool operator<= ( CArray< typename > const &  a,
T const &  t 
)
friend

CArray <= T.

template<typename >
bool operator<= ( T const &  t,
CArray< typename > const &  a 
)
friend

T <= CArray.

template<typename >
bool operator== ( CArray< typename > const &  a,
CArray< typename > const &  b 
)
friend
template<typename >
bool operator== ( CArray< typename > const &  a,
T const &  t 
)
friend

CArray == T.

template<typename >
bool operator== ( T const &  t,
CArray< typename > const &  a 
)
friend

T == CArray.

template<typename >
bool operator> ( CArray< typename > const &  a,
CArray< typename > const &  b 
)
friend
template<typename >
bool operator> ( CArray< typename > const &  a,
T const &  t 
)
friend

CArray > T.

template<typename >
bool operator> ( T const &  t,
CArray< typename > const &  a 
)
friend

T > CArray.

template<typename >
bool operator>= ( CArray< typename > const &  a,
CArray< typename > const &  b 
)
friend
template<typename >
bool operator>= ( CArray< typename > const &  a,
T const &  t 
)
friend

CArray >= T.

template<typename >
bool operator>= ( T const &  t,
CArray< typename > const &  a 
)
friend

T >= CArray.

template<typename >
void swap ( CArray< typename > &  a,
CArray< typename > &  b 
)
friend

Swap.

Member Data Documentation

template<typename >
T* ObjexxFCL::CArray< typename >::array_
private
template<typename >
size_type ObjexxFCL::CArray< typename >::size_
private

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