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

CArrayP: Memory-Managed C Array Wrapper Supporting Proxies. More...

#include <CArrayP.hh>

Collaboration diagram for ObjexxFCL::CArrayP< 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

 CArrayP ()
 Default constructor.
 CArrayP (CArrayP const &a)
 Copy constructor.
 CArrayP (CArrayP &a)
 Non-Const Copy constructor.
template<typename U >
 CArrayP (CArrayP< U > const &a)
 Copy constructor template.
 CArrayP (T const *const p, size_type const size_a)
 Pointer + size constructor.
template<typename U >
 CArrayP (U const *const p, size_type const size_a)
 Pointer + size constructor template.
template<typename InputIterator >
 CArrayP (InputIterator const beg, InputIterator const end)
 Iterator range constructor template.
 CArrayP (size_type const size_a)
 Size constructor.
 CArrayP (size_type const size_a, T const &t)
 Size + uniform value constructor.
 ~CArrayP ()
 Destructor.
 operator bool () const
 Active?
CArrayPoperator= (CArrayP const &a)
 Copy assignment.
template<typename U >
CArrayPoperator= (CArrayP< U > const &a)
 Copy assignment template.
CArrayPoperator= (T const &t)
 Uniform value assignment.
CArrayPassign (T const *const p, size_type const size_a)
 Pointer + size assignment.
template<typename U >
CArrayPassign (U const *const p, size_type const size_a)
 Pointer + size assignment template.
template<typename InputIterator >
CArrayPassign (InputIterator const beg, InputIterator const end)
 Iterator range assignment template.
CArrayPassign (size_type const size_a, T const &value)
 Size + value assignment.
template<typename U >
CArrayPoperator+= (CArrayP< U > const &a)
 += CArrayP
template<typename U >
CArrayPoperator-= (CArrayP< U > const &a)
 -= CArrayP
CArrayPoperator+= (T const &t)
 += value
CArrayPoperator-= (T const &t)
 -= value
CArrayPoperator*= (T const &t)
 *= value
CArrayPoperator/= (T const &t)
 /= value
bool active () const
 Active?
bool empty () const
 Empty?
bool owner () const
 Owner?
bool proxy () const
 Proxy?
size_type size () const
 Size.
size_type l () const
 Lower index.
size_type u () const
 Upper index.
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.
CArrayPsize (size_type const size_a)
 Resize: Values not preserved.
CArrayPresize (size_type const size_a, T const &fill=T())
 Resize to size with fill value: Values preserved.
void swap (CArrayP &a)
 Swap.
CArrayPclear ()
 Clear.
CArrayPnormalize ()
 Normalize to unit length.
CArrayPattach (CArrayP const &a)
 Attach as proxy to a const CArrayP.
CArrayPattach (CArrayP &a)
 Attach as proxy to a CArrayP.
CArrayPdetach ()
 Detach as proxy to a CArrayP.
T const & operator[] (size_type const i) const
 CArrayP[ i ] const: 0-based indexing.
T & operator[] (size_type const i)
 CArrayP[ 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.

Static Public Member Functions

static CArrayP Proxy (CArrayP const &a)
 Proxy const copy named constructor.
static CArrayP Proxy (CArrayP &a)
 Proxy copy named constructor.
static CArrayP Proxy (CArrayP const &a, size_type const size_a)
 Proxy const copy + size named constructor.
static CArrayP Proxy (CArrayP &a, size_type const size_a)
 Proxy copy + size named constructor.

Friends

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

Detailed Description

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

CArrayP: Memory-Managed C Array Wrapper Supporting Proxies.

Note:
Proxy CArrayPs are invalidated if the underlying (owning) array data is deleted
Proxy CPArras can be created at construction with the Proxy named constructors
CArrayPs can become proxies with the attach() member function
CArrayPs can stop being proxies with the detach() member function

Member Typedef Documentation

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

Constructor & Destructor Documentation

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

Default constructor.

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

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

Copy constructor.

References color_pdb::i.

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

Non-Const Copy constructor.

References color_pdb::i.

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

Copy constructor template.

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

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

Pointer + size constructor.

References color_pdb::i.

template<typename T>
template<typename U >
ObjexxFCL::CArrayP< T >::CArrayP ( 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::CArrayP< T >::CArrayP ( InputIterator const  beg,
InputIterator const  end 
) [inline]

Iterator range constructor template.

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

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

Size constructor.

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

Size + uniform value constructor.

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

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

Destructor.


Member Function Documentation

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

Active?

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

Pointer + size assignment.

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

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

Pointer + size assignment template.

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

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

Iterator range assignment template.

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

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

Size + value assignment.

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

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

Attach as proxy to a const CArrayP.

template<typename T>
CArrayP& ObjexxFCL::CArrayP< T >::attach ( CArrayP< T > &  a) [inline]

Attach as proxy to a CArrayP.

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

Last element.

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

Last element.

References proxy_const_assert.

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

const_iterator to beginning of array

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

iterator to beginning of array

References proxy_const_assert.

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

Clear.

Referenced by ObjexxFCL::CArrayP< T >::detach().

template<typename T>
CArrayP& ObjexxFCL::CArrayP< T >::detach ( ) [inline]

Detach as proxy to a CArrayP.

References ObjexxFCL::CArrayP< T >::clear().

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

Empty?

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

const_iterator to element past end of array

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

iterator to element past end of array

References proxy_const_assert.

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

First element.

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

First element.

References proxy_const_assert.

template<typename T>
size_type ObjexxFCL::CArrayP< T >::l ( ) const [inline]

Lower index.

References ObjexxFCL::CArrayP< T >::u().

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

Length squared.

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

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

Active?

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

C array non-const accessor.

References proxy_const_assert.

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

C array const accessor.

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

*= value

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

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

+= value

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

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

-= value

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

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

Uniform value assignment.

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

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

Copy assignment.

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

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

Copy assignment template.

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

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

CArrayP[ i ] const: 0-based indexing.

References color_pdb::i.

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

CArrayP[ i ]: 0-based indexing.

References color_pdb::i, and proxy_const_assert.

template<typename T>
bool ObjexxFCL::CArrayP< T >::owner ( ) const [inline]

Owner?

template<typename T>
static CArrayP ObjexxFCL::CArrayP< T >::Proxy ( CArrayP< T > &  a,
size_type const  size_a 
) [inline, static]

Proxy copy + size named constructor.

References docking::p.

template<typename T>
static CArrayP ObjexxFCL::CArrayP< T >::Proxy ( CArrayP< T > const &  a,
size_type const  size_a 
) [inline, static]

Proxy const copy + size named constructor.

References docking::p.

template<typename T>
bool ObjexxFCL::CArrayP< T >::proxy ( ) const [inline]

Proxy?

template<typename T>
static CArrayP ObjexxFCL::CArrayP< T >::Proxy ( CArrayP< T > const &  a) [inline, static]

Proxy const copy named constructor.

References docking::p.

template<typename T>
static CArrayP ObjexxFCL::CArrayP< T >::Proxy ( CArrayP< T > &  a) [inline, static]

Proxy copy named constructor.

References docking::p.

template<typename T>
CArrayP& ObjexxFCL::CArrayP< 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::CArrayP< T >::swap().

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

Resize: Values not preserved.

Note:
Built-in values are uninitialized if size changes

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

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

Upper index.

Referenced by ObjexxFCL::CArrayP< T >::l().


Friends And Related Function Documentation

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

Are two CArrayPs comparable?

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

Distance.

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

Distance squared.

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

Dot product.

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

Dot product.

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

T != CArrayP.

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

CArrayP != T.

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

CArrayP * Value.

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

Value * CArrayP.

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

Value + CArrayP.

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

CArrayP + Value.

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

-CArrayP

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

CArrayP - Value.

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

Value - CArrayP.

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

CArrayP / Value.

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

T < CArrayP.

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

CArrayP < T.

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

T <= CArrayP.

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

CArrayP <= T.

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

CArrayP == T.

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

T == CArrayP.

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

CArrayP > T.

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

T > CArrayP.

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

T >= CArrayP.

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

CArrayP >= T.

template<typename T>
bool operator>= ( CArrayP< T > const &  a,
CArrayP< T > const &  b 
) [friend]
template<typename T>
void swap ( CArrayP< T > &  a,
CArrayP< 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