Rosetta 3.3
Public Types | Public Member Functions | Friends
ObjexxFCL::CArray< T > Class Template Reference

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

#include <CArray.hh>

Collaboration diagram for ObjexxFCL::CArray< T >:
Collaboration graph
[legend]

List of all members.

Public Types

typedefvalue_type
typedef T & reference
typedef T const & const_reference
typedef T * pointer
typedef T const * const_pointer
typedef T * iterator
typedef T const * const_iterator
typedef std::size_t size_type
typedef std::ptrdiff_t difference_type
typedefValue
typedef T & Reference
typedef T const & ConstReference
typedef T * Pointer
typedef T const * ConstPointer
typedef T * Iterator
typedef T const * ConstIterator
typedef std::size_t Size
typedef std::ptrdiff_t Difference
typedef void iterator_category

Public Member Functions

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

Friends

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

Detailed Description

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

CArray: Memory-Managed C Array Wrapper.


Member Typedef Documentation

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

Constructor & Destructor Documentation

template<typename T>
ObjexxFCL::CArray< T >::CArray ( ) [inline]

Default constructor.

Referenced by ObjexxFCL::CArray< T >::assign(), and ObjexxFCL::CArray< T >::size().

template<typename T>
ObjexxFCL::CArray< T >::CArray ( CArray< T > const &  a) [inline]

Copy constructor.

References color_pdb::i.

template<typename T>
template<typename U >
ObjexxFCL::CArray< T >::CArray ( CArray< U > const &  a) [inline]

Copy constructor template.

References color_pdb::i, and basic::T().

template<typename T>
ObjexxFCL::CArray< T >::CArray ( T const *const  p,
size_type const  size_a 
) [inline]

Pointer + size constructor.

References color_pdb::i.

template<typename T>
template<typename U >
ObjexxFCL::CArray< T >::CArray ( U const *const  p,
size_type const  size_a 
) [inline]

Pointer + size constructor template.

References color_pdb::i, and basic::T().

template<typename T>
template<typename InputIterator >
ObjexxFCL::CArray< T >::CArray ( InputIterator const  beg,
InputIterator const  end 
) [inline]

Iterator range constructor template.

References color_pdb::i, and basic::T().

template<typename T>
ObjexxFCL::CArray< T >::CArray ( size_type const  size_a) [inline, explicit]

Size constructor.

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

Size + uniform value constructor.

References color_pdb::i, and sd::t.

template<typename T>
ObjexxFCL::CArray< T >::~CArray ( ) [inline]

Destructor.


Member Function Documentation

template<typename T>
bool ObjexxFCL::CArray< T >::active ( ) const [inline]

Active?

template<typename T>
CArray& ObjexxFCL::CArray< T >::assign ( size_type const  size_a,
T const &  value 
) [inline]

Size + value assignment.

References ObjexxFCL::CArray< T >::CArray(), and value.

template<typename T>
CArray& ObjexxFCL::CArray< T >::assign ( T const *const  p,
size_type const  size_a 
) [inline]

Pointer + size assignment.

References color_pdb::i, and basic::T().

template<typename T>
template<typename U >
CArray& ObjexxFCL::CArray< T >::assign ( U const *const  p,
size_type const  size_a 
) [inline]

Pointer + size assignment template.

References color_pdb::i, and basic::T().

template<typename T>
template<typename InputIterator >
CArray& ObjexxFCL::CArray< T >::assign ( InputIterator const  beg,
InputIterator const  end 
) [inline]

Iterator range assignment template.

References color_pdb::i, and basic::T().

template<typename T>
T const& ObjexxFCL::CArray< T >::back ( ) const [inline]

Last element.

template<typename T>
T& ObjexxFCL::CArray< T >::back ( ) [inline]

Last element.

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

iterator to beginning of array

template<typename T>
const_iterator ObjexxFCL::CArray< T >::begin ( ) const [inline]

const_iterator to beginning of array

template<typename T>
CArray& ObjexxFCL::CArray< T >::clear ( ) [inline]

Clear.

template<typename T>
bool ObjexxFCL::CArray< T >::empty ( ) const [inline]

Empty?

template<typename T>
const_iterator ObjexxFCL::CArray< T >::end ( ) const [inline]

const_iterator to element past end of array

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

iterator to element past end of array

template<typename T>
T const& ObjexxFCL::CArray< T >::front ( ) const [inline]

First element.

template<typename T>
T& ObjexxFCL::CArray< T >::front ( ) [inline]

First element.

template<typename T>
T ObjexxFCL::CArray< T >::length ( ) const [inline]
template<typename T>
T ObjexxFCL::CArray< T >::length_squared ( ) const [inline]

Length squared.

References color_pdb::i, numeric::square(), and basic::T().

template<typename T>
CArray& ObjexxFCL::CArray< T >::normalize ( ) [inline]
template<typename T>
ObjexxFCL::CArray< T >::operator bool ( ) const [inline]

Active?

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

C array non-const accessor.

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

C array const accessor.

template<typename T>
CArray& ObjexxFCL::CArray< T >::operator*= ( T const &  t) [inline]

*= value

References color_pdb::i, and sd::t.

template<typename T>
CArray& ObjexxFCL::CArray< T >::operator+= ( T const &  t) [inline]

+= value

References color_pdb::i, and sd::t.

template<typename T>
template<typename U >
CArray& ObjexxFCL::CArray< T >::operator+= ( CArray< U > const &  a) [inline]

+= CArray

References color_pdb::i, and basic::T().

template<typename T>
template<typename U >
CArray& ObjexxFCL::CArray< T >::operator-= ( CArray< U > const &  a) [inline]

-= CArray

References color_pdb::i, and basic::T().

template<typename T>
CArray& ObjexxFCL::CArray< T >::operator-= ( T const &  t) [inline]

-= value

References color_pdb::i, and sd::t.

template<typename T>
CArray& ObjexxFCL::CArray< T >::operator/= ( T const &  t) [inline]

/= value

References color_pdb::i, sd::t, and basic::T().

Referenced by ObjexxFCL::CArray< T >::normalize().

template<typename T>
CArray& ObjexxFCL::CArray< T >::operator= ( T const &  t) [inline]

Uniform value assignment.

References color_pdb::i, and sd::t.

template<typename T>
CArray& ObjexxFCL::CArray< T >::operator= ( CArray< T > const &  a) [inline]

Copy assignment.

References color_pdb::i, and basic::T().

template<typename T>
template<typename U >
CArray& ObjexxFCL::CArray< T >::operator= ( CArray< U > const &  a) [inline]

Copy assignment template.

References color_pdb::i, and basic::T().

template<typename T>
T& ObjexxFCL::CArray< T >::operator[] ( size_type const  i) [inline]

CArray[ i ]: 0-based indexing.

References color_pdb::i.

template<typename T>
T const& ObjexxFCL::CArray< T >::operator[] ( size_type const  i) const [inline]

CArray[ i ] const: 0-based indexing.

References color_pdb::i.

template<typename T>
CArray& ObjexxFCL::CArray< T >::resize ( size_type const  size_a,
T const &  fill = T() 
) [inline]

Resize to size with fill value: Values preserved.

References color_pdb::i, and ObjexxFCL::CArray< T >::swap().

template<typename T>
CArray& ObjexxFCL::CArray< T >::size ( size_type const  size_a) [inline]

Resize: Values not preserved.

Note:
Built-in values are uninitialized if size changes

References ObjexxFCL::CArray< T >::CArray().

template<typename T>
size_type ObjexxFCL::CArray< T >::size ( ) const [inline]
template<typename T>
void ObjexxFCL::CArray< T >::swap ( CArray< T > &  a) [inline]

Friends And Related Function Documentation

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

Are two CArrays comparable?

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

Distance.

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

Distance squared.

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

Dot product.

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

Dot product.

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

T != CArray.

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

CArray != T.

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

CArray * Value.

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

Value * CArray.

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

Value + CArray.

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

CArray + Value.

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

-CArray

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

CArray - Value.

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

Value - CArray.

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

CArray / Value.

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

T < CArray.

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

CArray < T.

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

T <= CArray.

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

CArray <= T.

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

CArray == T.

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

T == CArray.

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

CArray > T.

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

T > CArray.

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

T >= CArray.

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

CArray >= T.

template<typename T>
bool operator>= ( CArray< T > const &  a,
CArray< T > const &  b 
) [friend]
template<typename T>
void swap ( CArray< T > &  a,
CArray< T > &  b 
) [friend]

Swap.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines