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

FArray: Fortran-Compatible Array Hierarchy Abstract Base Class. More...

#include <FArraySection.hh>

Public Types

typedef FArray< TBase
 
typedef FArrayTraits< TTraits
 
typedef FArraySection< TSection
 
typedef IndexRange IR
 
typedef T value_type
 
typedef Treference
 
typedef T const & const_reference
 
typedef Tpointer
 
typedef T const * const_pointer
 
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 std::size_t Size
 
typedef std::ptrdiff_t Difference
 

Public Member Functions

virtual ~FArray ()
 Destructor. More...
 
FArrayoperator= (T const &t)
 = Value More...
 
FArrayoperator+= (T const &t)
 += Value More...
 
FArrayoperator-= (T const &t)
 -= Value More...
 
FArrayoperator*= (T const &t)
 *= Value More...
 
FArrayoperator/= (T const &t)
 /= Value More...
 
T const & operator[] (size_type const i) const
 array[ i ] const: Linear Subscript More...
 
Toperator[] (size_type const i)
 array[ i ]: Linear Subscript More...
 
virtual bool dimensions_initialized () const =0
 Dimensions Initialized? More...
 
virtual bool initializer_active () const =0
 Initializer Active? More...
 
bool active () const
 Active? More...
 
bool array_size_bounded () const
 Array Size Bounded? More...
 
bool array_size_unbounded () const
 Array Size Unbounded? More...
 
bool size_bounded () const
 Active Array Size Bounded? More...
 
bool size_unbounded () const
 Active Array Size Unbounded? More...
 
bool owner () const
 Owner? More...
 
bool proxy () const
 Proxy? More...
 
bool is_default () const
 All Elements Default Valued? More...
 
bool is_zero () const
 All Elements Zero? More...
 
bool is_uniform () const
 Uniform Valued? More...
 
bool is_uniform (T const &t) const
 Uniform Valued with Specified Value? More...
 
size_type array_size () const
 Array Size. More...
 
size_type size () const
 Active Array Size. More...
 
virtual FArrayclear ()
 Clear. More...
 
virtual FArrayto_default ()
 Assign Default Value to all Elements. More...
 
void zero ()
 Assign Zero to all Elements. More...
 
void to_zero ()
 Assign Zero to all Elements. More...
 

Static Public Attributes

static size_type const npos = static_cast< size_type >( -1 )
 Unbounded "size". More...
 
static size_type const max_size = npos - static_cast< size_type >( 1 )
 Max array size. More...
 

Protected Types

typedef
internal::InitializerSentinel 
InitializerSentinel
 
typedef internal::ProxySentinel ProxySentinel
 

Protected Member Functions

 FArray ()
 Default Constructor. More...
 
 FArray (FArray const &a)
 Copy Constructor. More...
 
 FArray (FArray const &a, T const &v)
 Filled Copy Constructor - use the other data from the array, but fill with the given value. More...
 
template<typename U >
 FArray (FArray< U > const &a)
 Copy Constructor Template. More...
 
 FArray (size_type const size_a)
 Size Constructor. More...
 
 FArray (size_type const size_a, InitializerSentinel const &)
 Size + InitializerSentinel Constructor. More...
 
 FArray (ProxySentinel const &)
 Default Proxy Constructor. More...
 
 FArray (FArray const &a, ProxySentinel const &)
 Array Proxy Constructor. More...
 
 FArray (FArray &a, ProxySentinel const &)
 Non-Const Array Proxy Constructor. More...
 
 FArray (Section const &s, ProxySentinel const &)
 Section Proxy Constructor. More...
 
 FArray (Section &s, ProxySentinel const &)
 Non-Const Section Proxy Constructor. More...
 
 FArray (T const &t, ProxySentinel const &)
 Value Proxy Constructor. More...
 
 FArray (T &t, ProxySentinel const &)
 Non-Const Value Proxy Constructor. More...
 
FArrayoperator= (FArray const &a)
 Copy Assignment. More...
 
template<typename U >
void operator= (FArray< U > const &a)
 Copy Assignment Template. More...
 
template<typename U >
void operator+= (FArray< U > const &a)
 += Array Template More...
 
template<typename U >
void operator-= (FArray< U > const &a)
 -= Array Template More...
 
void shift_set (int const shift_a)
 Shift Setup. More...
 
void size_set (size_type const size_a)
 Active Array Size Setup. More...
 
FArrayresize (size_type const size_a)
 Resize a Real Array. More...
 
void attach (FArray const &a)
 Attach Proxy/Argument Array to Const Array of Same Rank. More...
 
void attach (FArray &a)
 Attach Proxy/Argument Array to Array of Same Rank. More...
 
void attach (FArray const &a, int const shift_a)
 Attach Proxy/Argument Array to Const Array. More...
 
void attach (FArray &a, int const shift_a)
 Attach Proxy/Argument Array to Array. More...
 
void attach (Section const &s, int const shift_a)
 Attach Proxy/Argument Array to Const Section. More...
 
void attach (Section &s, int const shift_a)
 Attach Proxy/Argument Array to Section. More...
 
void attach (T const &t, int const shift_a)
 Attach Proxy/Argument Array to Const Value. More...
 
void attach (T &t, int const shift_a)
 Attach Proxy/Argument Array to Value. More...
 
void detach ()
 Detach Proxy/Argument Array. More...
 
void update_to (FArray const &a)
 Update Proxy Array Attachment to Const Array. More...
 
void update_to (FArray &a)
 Update Proxy Array Attachment to Array. More...
 
void swapB (FArray &v)
 Swap. More...
 

Static Protected Member Functions

static size_type size_of (size_type const s1)
 Array Size Product of Specified Bounded Dimensional Sizes. More...
 
static size_type size_of (size_type const s1, size_type const s2)
 Array Size Product of Specified Bounded Dimensional Sizes. More...
 
static size_type size_of (size_type const s1, size_type const s2, size_type const s3)
 Array Size Product of Specified Bounded Dimensional Sizes. More...
 
static size_type size_of (size_type const s1, size_type const s2, size_type const s3, size_type const s4)
 Array Size Product of Specified Bounded Dimensional Sizes. More...
 
static size_type size_of (size_type const s1, size_type const s2, size_type const s3, size_type const s4, size_type const s5)
 Array Size Product of Specified Bounded Dimensional Sizes. More...
 
static size_type size_of (size_type const s1, size_type const s2, size_type const s3, size_type const s4, size_type const s5, size_type const s6)
 Array Size Product of Specified Bounded Dimensional Sizes. More...
 
static size_type size_of (IR const &I1)
 Array Size Product of Specified Bounded IndexRanges. More...
 
static size_type size_of (IR const &I1, IR const &I2)
 Array Size Product of Specified Bounded IndexRanges. More...
 
static size_type size_of (IR const &I1, IR const &I2, IR const &I3)
 Array Size Product of Specified Bounded IndexRanges. More...
 
static size_type size_of (IR const &I1, IR const &I2, IR const &I3, IR const &I4)
 Array Size Product of Specified Bounded IndexRanges. More...
 
static size_type size_of (IR const &I1, IR const &I2, IR const &I3, IR const &I4, IR const &I5)
 Array Size Product of Specified Bounded IndexRanges. More...
 
static size_type size_of (IR const &I1, IR const &I2, IR const &I3, IR const &I4, IR const &I5, IR const &I6)
 Array Size Product of Specified Bounded IndexRanges. More...
 

Protected Attributes

size_type array_size_
 Size of data array. More...
 
Tarray_
 Pointer to data array. More...
 
size_type size_
 Size of active array. More...
 
bool const owner_
 Owner of data array? More...
 
int shift_
 Array shift. More...
 
Tsarray_
 Shifted pointer to data array. More...
 

Friends

template<typename >
class FArray
 
bool operator== (FArray const &a, FArray const &b)
 FArray == FArray. More...
 
bool operator!= (FArray const &a, FArray const &b)
 FArray != FArray. More...
 

Detailed Description

template<typename>
class ObjexxFCL::FArray< typename >

FArray: Fortran-Compatible Array Hierarchy Abstract Base Class.

Remarks
  • Can hold numeric or non-numeric values: Numeric operations on non-numeric values won't compile
  • Any meaningful array index ranges can be specified as in Fortran
  • Column-major storage order used as in Fortran
  • Zero-sized arrays are supported but have no valid indices
  • Argument/proxy arrays can have unbounded/unknown size
  • For efficiency constructors without initializer function or value do not initialize the array
  • For efficiency bounds checking is only active via asserts in debug builds

Member Typedef Documentation

template<typename >
typedef FArray< T > ObjexxFCL::FArray< typename >::Base
template<typename >
typedef T const* ObjexxFCL::FArray< typename >::const_pointer
template<typename >
typedef T const& ObjexxFCL::FArray< typename >::const_reference
template<typename >
typedef T const* ObjexxFCL::FArray< typename >::ConstPointer
template<typename >
typedef T const& ObjexxFCL::FArray< typename >::ConstReference
template<typename >
typedef std::ptrdiff_t ObjexxFCL::FArray< typename >::Difference
template<typename >
typedef std::ptrdiff_t ObjexxFCL::FArray< typename >::difference_type
template<typename >
typedef internal::InitializerSentinel ObjexxFCL::FArray< typename >::InitializerSentinel
protected
template<typename >
typedef IndexRange ObjexxFCL::FArray< typename >::IR
template<typename >
typedef T* ObjexxFCL::FArray< typename >::pointer
template<typename >
typedef T* ObjexxFCL::FArray< typename >::Pointer
template<typename >
typedef internal::ProxySentinel ObjexxFCL::FArray< typename >::ProxySentinel
protected
template<typename >
typedef T& ObjexxFCL::FArray< typename >::reference
template<typename >
typedef T& ObjexxFCL::FArray< typename >::Reference
template<typename >
typedef FArraySection< T > ObjexxFCL::FArray< typename >::Section
template<typename >
typedef std::size_t ObjexxFCL::FArray< typename >::Size
template<typename >
typedef std::size_t ObjexxFCL::FArray< typename >::size_type
template<typename >
typedef FArrayTraits< T > ObjexxFCL::FArray< typename >::Traits
template<typename >
typedef T ObjexxFCL::FArray< typename >::Value
template<typename >
typedef T ObjexxFCL::FArray< typename >::value_type

Constructor & Destructor Documentation

template<typename >
ObjexxFCL::FArray< typename >::FArray ( )
inlineprotected

Default Constructor.

template<typename >
ObjexxFCL::FArray< typename >::FArray ( FArray< typename > const &  a)
inlineprotected

Copy Constructor.

template<typename >
ObjexxFCL::FArray< typename >::FArray ( FArray< typename > const &  a,
T const &  v 
)
inlineprotected

Filled Copy Constructor - use the other data from the array, but fill with the given value.

template<typename >
template<typename U >
ObjexxFCL::FArray< typename >::FArray ( FArray< U > const &  a)
inlineexplicitprotected

Copy Constructor Template.

template<typename >
ObjexxFCL::FArray< typename >::FArray ( size_type const  size_a)
inlineexplicitprotected

Size Constructor.

template<typename >
ObjexxFCL::FArray< typename >::FArray ( size_type const  size_a,
InitializerSentinel const &   
)
inlineprotected

Size + InitializerSentinel Constructor.

template<typename >
ObjexxFCL::FArray< typename >::FArray ( ProxySentinel const &  )
inlineprotected

Default Proxy Constructor.

template<typename >
ObjexxFCL::FArray< typename >::FArray ( FArray< typename > const &  a,
ProxySentinel const &   
)
inlineprotected

Array Proxy Constructor.

template<typename >
ObjexxFCL::FArray< typename >::FArray ( FArray< typename > &  a,
ProxySentinel const &   
)
inlineprotected

Non-Const Array Proxy Constructor.

template<typename >
ObjexxFCL::FArray< typename >::FArray ( Section const &  s,
ProxySentinel const &   
)
inlineprotected

Section Proxy Constructor.

template<typename >
ObjexxFCL::FArray< typename >::FArray ( Section s,
ProxySentinel const &   
)
inlineprotected

Non-Const Section Proxy Constructor.

template<typename >
ObjexxFCL::FArray< typename >::FArray ( T const &  t,
ProxySentinel const &   
)
inlineprotected

Value Proxy Constructor.

template<typename >
ObjexxFCL::FArray< typename >::FArray ( T t,
ProxySentinel const &   
)
inlineprotected

Non-Const Value Proxy Constructor.

template<typename >
virtual ObjexxFCL::FArray< typename >::~FArray ( )
inlinevirtual

Destructor.

Member Function Documentation

template<typename >
bool ObjexxFCL::FArray< typename >::active ( ) const
inline

Active?

template<typename >
size_type ObjexxFCL::FArray< typename >::array_size ( ) const
inline

Array Size.

template<typename >
bool ObjexxFCL::FArray< typename >::array_size_bounded ( ) const
inline

Array Size Bounded?

template<typename >
bool ObjexxFCL::FArray< typename >::array_size_unbounded ( ) const
inline

Array Size Unbounded?

template<typename >
void ObjexxFCL::FArray< typename >::attach ( FArray< typename > const &  a)
inlineprotected

Attach Proxy/Argument Array to Const Array of Same Rank.

template<typename >
void ObjexxFCL::FArray< typename >::attach ( FArray< typename > &  a)
inlineprotected

Attach Proxy/Argument Array to Array of Same Rank.

template<typename >
void ObjexxFCL::FArray< typename >::attach ( FArray< typename > const &  a,
int const  shift_a 
)
inlineprotected

Attach Proxy/Argument Array to Const Array.

template<typename >
void ObjexxFCL::FArray< typename >::attach ( FArray< typename > &  a,
int const  shift_a 
)
inlineprotected

Attach Proxy/Argument Array to Array.

template<typename >
void ObjexxFCL::FArray< typename >::attach ( Section const &  s,
int const  shift_a 
)
inlineprotected

Attach Proxy/Argument Array to Const Section.

template<typename >
void ObjexxFCL::FArray< typename >::attach ( Section s,
int const  shift_a 
)
inlineprotected

Attach Proxy/Argument Array to Section.

template<typename >
void ObjexxFCL::FArray< typename >::attach ( T const &  t,
int const  shift_a 
)
inlineprotected

Attach Proxy/Argument Array to Const Value.

template<typename >
void ObjexxFCL::FArray< typename >::attach ( T t,
int const  shift_a 
)
inlineprotected

Attach Proxy/Argument Array to Value.

template<typename >
virtual FArray& ObjexxFCL::FArray< typename >::clear ( )
inlinevirtual
template<typename >
void ObjexxFCL::FArray< typename >::detach ( )
inlineprotected

Detach Proxy/Argument Array.

template<typename >
virtual bool ObjexxFCL::FArray< typename >::dimensions_initialized ( ) const
pure virtual
template<typename >
virtual bool ObjexxFCL::FArray< typename >::initializer_active ( ) const
pure virtual
template<typename >
bool ObjexxFCL::FArray< typename >::is_default ( ) const
inline

All Elements Default Valued?

template<typename >
bool ObjexxFCL::FArray< typename >::is_uniform ( ) const
inline

Uniform Valued?

template<typename >
bool ObjexxFCL::FArray< typename >::is_uniform ( T const &  t) const
inline

Uniform Valued with Specified Value?

template<typename >
bool ObjexxFCL::FArray< typename >::is_zero ( ) const
inline

All Elements Zero?

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

*= Value

template<typename >
template<typename U >
void ObjexxFCL::FArray< typename >::operator+= ( FArray< U > const &  a)
inlineprotected

+= Array Template

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

+= Value

template<typename >
template<typename U >
void ObjexxFCL::FArray< typename >::operator-= ( FArray< U > const &  a)
inlineprotected

-= Array Template

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

-= Value

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

/= Value

template<typename >
FArray& ObjexxFCL::FArray< typename >::operator= ( FArray< typename > const &  a)
inlineprotected

Copy Assignment.

template<typename >
template<typename U >
void ObjexxFCL::FArray< typename >::operator= ( FArray< U > const &  a)
inlineprotected

Copy Assignment Template.

template<typename >
FArray& ObjexxFCL::FArray< typename >::operator= ( T const &  t)
inline

= Value

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

array[ i ] const: Linear Subscript

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

array[ i ]: Linear Subscript

template<typename >
bool ObjexxFCL::FArray< typename >::owner ( ) const
inline

Owner?

template<typename >
bool ObjexxFCL::FArray< typename >::proxy ( ) const
inline

Proxy?

template<typename >
FArray& ObjexxFCL::FArray< typename >::resize ( size_type const  size_a)
inlineprotected

Resize a Real Array.

template<typename >
void ObjexxFCL::FArray< typename >::shift_set ( int const  shift_a)
inlineprotected

Shift Setup.

template<typename >
size_type ObjexxFCL::FArray< typename >::size ( ) const
inline
template<typename >
bool ObjexxFCL::FArray< typename >::size_bounded ( ) const
inline
template<typename >
static size_type ObjexxFCL::FArray< typename >::size_of ( size_type const  s1)
inlinestaticprotected

Array Size Product of Specified Bounded Dimensional Sizes.

Referenced by ObjexxFCL::FArray< T >::size_of().

template<typename >
static size_type ObjexxFCL::FArray< typename >::size_of ( size_type const  s1,
size_type const  s2 
)
inlinestaticprotected

Array Size Product of Specified Bounded Dimensional Sizes.

template<typename >
static size_type ObjexxFCL::FArray< typename >::size_of ( size_type const  s1,
size_type const  s2,
size_type const  s3 
)
inlinestaticprotected

Array Size Product of Specified Bounded Dimensional Sizes.

template<typename >
static size_type ObjexxFCL::FArray< typename >::size_of ( size_type const  s1,
size_type const  s2,
size_type const  s3,
size_type const  s4 
)
inlinestaticprotected

Array Size Product of Specified Bounded Dimensional Sizes.

template<typename >
static size_type ObjexxFCL::FArray< typename >::size_of ( size_type const  s1,
size_type const  s2,
size_type const  s3,
size_type const  s4,
size_type const  s5 
)
inlinestaticprotected

Array Size Product of Specified Bounded Dimensional Sizes.

template<typename >
static size_type ObjexxFCL::FArray< typename >::size_of ( size_type const  s1,
size_type const  s2,
size_type const  s3,
size_type const  s4,
size_type const  s5,
size_type const  s6 
)
inlinestaticprotected

Array Size Product of Specified Bounded Dimensional Sizes.

template<typename >
static size_type ObjexxFCL::FArray< typename >::size_of ( IR const &  I1)
inlinestaticprotected

Array Size Product of Specified Bounded IndexRanges.

template<typename >
static size_type ObjexxFCL::FArray< typename >::size_of ( IR const &  I1,
IR const &  I2 
)
inlinestaticprotected

Array Size Product of Specified Bounded IndexRanges.

template<typename >
static size_type ObjexxFCL::FArray< typename >::size_of ( IR const &  I1,
IR const &  I2,
IR const &  I3 
)
inlinestaticprotected

Array Size Product of Specified Bounded IndexRanges.

template<typename >
static size_type ObjexxFCL::FArray< typename >::size_of ( IR const &  I1,
IR const &  I2,
IR const &  I3,
IR const &  I4 
)
inlinestaticprotected

Array Size Product of Specified Bounded IndexRanges.

template<typename >
static size_type ObjexxFCL::FArray< typename >::size_of ( IR const &  I1,
IR const &  I2,
IR const &  I3,
IR const &  I4,
IR const &  I5 
)
inlinestaticprotected

Array Size Product of Specified Bounded IndexRanges.

template<typename >
static size_type ObjexxFCL::FArray< typename >::size_of ( IR const &  I1,
IR const &  I2,
IR const &  I3,
IR const &  I4,
IR const &  I5,
IR const &  I6 
)
inlinestaticprotected

Array Size Product of Specified Bounded IndexRanges.

template<typename >
void ObjexxFCL::FArray< typename >::size_set ( size_type const  size_a)
inlineprotected

Active Array Size Setup.

template<typename >
bool ObjexxFCL::FArray< typename >::size_unbounded ( ) const
inline

Active Array Size Unbounded?

template<typename >
void ObjexxFCL::FArray< typename >::swapB ( FArray< typename > &  v)
inlineprotected

Swap.

template<typename >
virtual FArray& ObjexxFCL::FArray< typename >::to_default ( )
inlinevirtual
template<typename >
void ObjexxFCL::FArray< typename >::to_zero ( )
inline

Assign Zero to all Elements.

Note
Can't be virtual (for covariant return) or will try to instantiate for all value types
template<typename >
void ObjexxFCL::FArray< typename >::update_to ( FArray< typename > const &  a)
inlineprotected

Update Proxy Array Attachment to Const Array.

template<typename >
void ObjexxFCL::FArray< typename >::update_to ( FArray< typename > &  a)
inlineprotected

Update Proxy Array Attachment to Array.

template<typename >
void ObjexxFCL::FArray< typename >::zero ( )
inline

Assign Zero to all Elements.

Note
Can't be virtual (for covariant return) or will try to instantiate for all value types

Friends And Related Function Documentation

template<typename >
template<typename >
friend class FArray
friend
template<typename >
bool operator!= ( FArray< typename > const &  a,
FArray< typename > const &  b 
)
friend
template<typename >
bool operator== ( FArray< typename > const &  a,
FArray< typename > const &  b 
)
friend

Member Data Documentation

template<typename >
T* ObjexxFCL::FArray< typename >::array_
protected
template<typename >
size_type ObjexxFCL::FArray< typename >::array_size_
protected
template<typename >
FArray< T >::size_type const ObjexxFCL::FArray< T >::max_size = npos - static_cast< size_type >( 1 )
static

Max array size.

Referenced by ObjexxFCL::FArray< T >::size_of().

template<typename >
FArray< T >::size_type const ObjexxFCL::FArray< T >::npos = static_cast< size_type >( -1 )
static
template<typename >
bool const ObjexxFCL::FArray< typename >::owner_
protected
template<typename >
T* ObjexxFCL::FArray< typename >::sarray_
protected
template<typename >
int ObjexxFCL::FArray< typename >::shift_
protected
template<typename >
size_type ObjexxFCL::FArray< typename >::size_
protected

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