ATLAS Offline Software
Loading...
Searching...
No Matches
Array.h File Reference

Simple multidimensional arrays. More...

#include "CxxUtils/Arrayrep.h"
#include <iterator>
#include "CxxUtils/Array.icc"
Include dependency graph for Control/CxxUtils/CxxUtils/Array.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CxxUtils::ArrayIteratorChooser< N >
 Helper for defining iterators over Array's. More...
class  CxxUtils::ArrayIteratorChooser< 1 >
 Helper for defining iterators over Array's, specialized for N == 1. More...
class  CxxUtils::Array< N >
 Read-only multidimensional array. More...
class  CxxUtils::Array< 0 >
 Read-only multidimensional array, specialized for N=0. More...
class  CxxUtils::ArrayIterator< N >
 Iterator class for Array<N>. More...
class  CxxUtils::ArrayIterator< N >::pointer
 Proxy to return from operator>. More...
class  CxxUtils::WritableArray< N >
 Read-write multidimensional array. More...
class  CxxUtils::WritableArray< 0 >
class  CxxUtils::WritableArrayData< N >
class  CaloRec::Array< N >
 Read-only multidimensional array. More...
class  CaloRec::WritableArray< N >
 Read-write multidimensional array. More...
class  CaloRec::WritableArrayData< N >

Namespaces

namespace  CxxUtils
namespace  CaloRec
 Namespace for helper functions.

Concepts

concept  CxxUtils::FromArrayrep
 Concept testing whether a type may be used with FromArrayrep.

Functions

template<unsigned int N>
std::ostream & CxxUtils::operator<< (std::ostream &s, const Array< N > &a)
template<class T>
requires std::assignable_from<T&, float>
void CxxUtils::fromArrayrep (const CaloRec::Arrayrep &rep, T &x)
 Helper to convert from an @x Arrayrep to a scalar type.
template<unsigned int N>
void CxxUtils::fromArrayrep (const CaloRec::Arrayrep &rep, CxxUtils::Array< N > &x)
 Helper to convert from an @x Arrayrep to an Array.

Detailed Description

Simple multidimensional arrays.

Author
scott snyder snyde.nosp@m.r@bn.nosp@m.l.gov
Date
June, 2004

This file defines several families of templated classes that act like multidimensional arrays.

There are three families of classes:

  • Array<N> provides read-only access to an array. Indexing with [] returns an Array<N-1>. Array<0> is special; it doesn't support indexing, but does support implicit conversion to the element type, Arrayelt. The Array classes do not own their storage (and thus indexing does not require a complete copy). Rather, the complete data for the array are stored in an instance of Arrayrep. An Array holds a pointer to an Arrayrep and an offset into the data.
  • WritableArray is similar to Array, except that it may be written to as well. An Array may be initialized from a WritableArray, but not the other way around.
  • WritableArrayData is a WritableArray together with an Arrayrep. This is a convenient way of creating from scratch an array to which you can write.

Definition in file Control/CxxUtils/CxxUtils/Array.h.