Chombo + EB  3.0
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
LayoutData< T > Class Template Reference

Data that maintains a one-to-one mapping of T to the boxes in a BoxLayout. More...

#include <LayoutData.H>

Inheritance diagram for LayoutData< T >:
Inheritance graph
[legend]

Public Member Functions

 LayoutData ()
 
 LayoutData (const BoxLayout &a_dp)
 
virtual ~LayoutData ()
 
virtual void define (const BoxLayout &a_dp)
 
DataIterator dataIterator () const
 
TimedDataIterator timedDataIterator () const
 
const T & operator[] (const DataIndex &a_index) const
 const accessor function More...
 
const T & operator[] (const DataIterator &a_iterator) const
 const accessor function More...
 
T & operator[] (const DataIndex &a_index)
 non-const accessor function More...
 
T & operator[] (const DataIterator &a_iterator)
 non-const accessor function More...
 
Box box (const DataIndex &a_index) const
 
Box box (const DataIterator &a_iterator) const
 
const BoxLayoutboxLayout () const
 

Protected Attributes

BoxLayout m_boxLayout
 
Vector< T * > m_vector
 
bool m_callDelete
 

Private Member Functions

LayoutData< T > & operator= (const LayoutData< T > &a_rhs)
 
 LayoutData (const LayoutData &a_rhs)
 
void allocate ()
 

Detailed Description

template<class T>
class LayoutData< T >

Data that maintains a one-to-one mapping of T to the boxes in a BoxLayout.

A collection of Box-oriented objects. The arrangement of the T objects is given by the underlying BoxLayout object. LayoutData does not attempt to prevent users from manipulating the template class T to become out of synch with the boxes in the BoxLayout. Caveat emptor.

Non-local (off-processor access) to a LayoutData index is an error. You can assure that access to the data stored in a LayoutData is local to your processor by using the DataIterator object for indexing.

Data in a LayoutData CANNOT be communicated to other processors using the API presented in LevelData.

class T must provide the following methods:

{
  T()
}

This class is useful for processor-local data that needs to be indexable along with a BoxLayoutData. Auxillary data objects, etc.

Constructor & Destructor Documentation

◆ LayoutData() [1/3]

template<class T >
LayoutData< T >::LayoutData ( )
inline

◆ LayoutData() [2/3]

template<class T >
LayoutData< T >::LayoutData ( const BoxLayout a_dp)
inline

constructor. allocates a T object for every box in the BoxLayout a_dp using the T null constructor. a_dp must be closed.

◆ ~LayoutData()

template<class T >
LayoutData< T >::~LayoutData ( )
inlinevirtual

◆ LayoutData() [3/3]

template<class T>
LayoutData< T >::LayoutData ( const LayoutData< T > &  a_rhs)
private

Member Function Documentation

◆ define()

template<class T >
void LayoutData< T >::define ( const BoxLayout a_dp)
inlinevirtual

◆ dataIterator()

template<class T >
DataIterator LayoutData< T >::dataIterator ( ) const
inline

◆ timedDataIterator()

template<class T >
TimedDataIterator LayoutData< T >::timedDataIterator ( ) const
inline

◆ operator[]() [1/4]

template<class T >
const T & LayoutData< T >::operator[] ( const DataIndex a_index) const
inline

const accessor function

◆ operator[]() [2/4]

template<class T >
const T & LayoutData< T >::operator[] ( const DataIterator a_iterator) const
inline

const accessor function

Returns member for which DataIterator is currently indexed to. Equivalent to layout[a_iterator()]

◆ operator[]() [3/4]

template<class T >
T & LayoutData< T >::operator[] ( const DataIndex a_index)
inline

non-const accessor function

◆ operator[]() [4/4]

template<class T >
T & LayoutData< T >::operator[] ( const DataIterator a_iterator)
inline

non-const accessor function

◆ box() [1/2]

template<class T >
Box LayoutData< T >::box ( const DataIndex a_index) const
inline

◆ box() [2/2]

template<class T >
Box LayoutData< T >::box ( const DataIterator a_iterator) const
inline

◆ boxLayout()

template<class T>
const BoxLayout& LayoutData< T >::boxLayout ( ) const
inline

◆ operator=()

template<class T>
LayoutData<T>& LayoutData< T >::operator= ( const LayoutData< T > &  a_rhs)
private

◆ allocate()

template<class T >
void LayoutData< T >::allocate ( )
inlineprivate

Member Data Documentation

◆ m_boxLayout

template<class T>
BoxLayout LayoutData< T >::m_boxLayout
protected

◆ m_vector

template<class T>
Vector<T*> LayoutData< T >::m_vector
protected

◆ m_callDelete

template<class T>
bool LayoutData< T >::m_callDelete
protected

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