Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions

LibGeoDecomp::GridBase< CELL, DIMENSIONS > Class Template Reference

This is an abstract base class for all grid classes. More...

#include <gridbase.h>

Collaboration diagram for LibGeoDecomp::GridBase< CELL, DIMENSIONS >:
Collaboration graph
[legend]

List of all members.

Classes

class  ConstIterator
 Convenice class for reading multiple cells. More...
class  Iterator
 Convenice class for reading/writing multiple cells. More...

Public Types

typedef CELL CellType

Public Member Functions

virtual ~GridBase ()
virtual void set (const Coord< DIM > &, const CELL &)=0
virtual void set (const Streak< DIM > &, const CELL *)=0
virtual CELL get (const Coord< DIM > &) const =0
virtual void get (const Streak< DIM > &, CELL *) const =0
virtual void setEdge (const CELL &)=0
virtual const CELL & getEdge () const =0
virtual CoordBox< DIMboundingBox () const =0
ConstIterator at (const Coord< DIM > &coord) const
Iterator at (const Coord< DIM > &coord)
Coord< DIMdimensions () const
bool operator== (const GridBase< CELL, DIMENSIONS > &other) const
bool operator!= (const GridBase< CELL, DIMENSIONS > &other) const
template<typename MEMBER >
void saveMember (MEMBER *target, const Selector< CELL > &selector, const Region< DIM > &region) const
 Allows the user to extract a single member variable of all cells within the given region.
void saveMemberUnchecked (char *target, const Selector< CELL > &selector, const Region< DIM > &region) const
 Same as saveMember(), but sans the type checking.
template<typename MEMBER >
void loadMember (const MEMBER *source, const Selector< CELL > &selector, const Region< DIM > &region)
 Used for bulk-setting of single member variables.

Static Public Attributes

static const int DIM = DIMENSIONS

Protected Member Functions

virtual void saveMemberImplementation (char *target, const Selector< CELL > &selector, const Region< DIM > &region) const =0
virtual void loadMemberImplementation (const char *source, const Selector< CELL > &selector, const Region< DIM > &region)=0

Detailed Description

template<typename CELL, int DIMENSIONS>
class LibGeoDecomp::GridBase< CELL, DIMENSIONS >

This is an abstract base class for all grid classes.

It's generic because all methods are virtual, but not very efficient -- for the same reason.


Member Typedef Documentation

template<typename CELL, int DIMENSIONS>
typedef CELL LibGeoDecomp::GridBase< CELL, DIMENSIONS >::CellType

Constructor & Destructor Documentation

template<typename CELL, int DIMENSIONS>
virtual LibGeoDecomp::GridBase< CELL, DIMENSIONS >::~GridBase (  )  [inline, virtual]

Member Function Documentation

template<typename CELL, int DIMENSIONS>
ConstIterator LibGeoDecomp::GridBase< CELL, DIMENSIONS >::at ( const Coord< DIM > &  coord  )  const [inline]
template<typename CELL, int DIMENSIONS>
Iterator LibGeoDecomp::GridBase< CELL, DIMENSIONS >::at ( const Coord< DIM > &  coord  )  [inline]
template<typename CELL, int DIMENSIONS>
virtual CoordBox<DIM> LibGeoDecomp::GridBase< CELL, DIMENSIONS >::boundingBox (  )  const [pure virtual]
template<typename CELL, int DIMENSIONS>
Coord<DIM> LibGeoDecomp::GridBase< CELL, DIMENSIONS >::dimensions (  )  const [inline]
template<typename CELL, int DIMENSIONS>
virtual void LibGeoDecomp::GridBase< CELL, DIMENSIONS >::get ( const Streak< DIM > &  ,
CELL *   
) const [pure virtual]
template<typename CELL, int DIMENSIONS>
virtual CELL LibGeoDecomp::GridBase< CELL, DIMENSIONS >::get ( const Coord< DIM > &   )  const [pure virtual]
template<typename CELL, int DIMENSIONS>
virtual const CELL& LibGeoDecomp::GridBase< CELL, DIMENSIONS >::getEdge (  )  const [pure virtual]
template<typename CELL, int DIMENSIONS>
template<typename MEMBER >
void LibGeoDecomp::GridBase< CELL, DIMENSIONS >::loadMember ( const MEMBER *  source,
const Selector< CELL > &  selector,
const Region< DIM > &  region 
) [inline]

Used for bulk-setting of single member variables.

Assumes that source contains as many instances of the member as region contains coordinates.

template<typename CELL, int DIMENSIONS>
virtual void LibGeoDecomp::GridBase< CELL, DIMENSIONS >::loadMemberImplementation ( const char *  source,
const Selector< CELL > &  selector,
const Region< DIM > &  region 
) [protected, pure virtual]
template<typename CELL, int DIMENSIONS>
bool LibGeoDecomp::GridBase< CELL, DIMENSIONS >::operator!= ( const GridBase< CELL, DIMENSIONS > &  other  )  const [inline]
template<typename CELL, int DIMENSIONS>
bool LibGeoDecomp::GridBase< CELL, DIMENSIONS >::operator== ( const GridBase< CELL, DIMENSIONS > &  other  )  const [inline]
template<typename CELL, int DIMENSIONS>
template<typename MEMBER >
void LibGeoDecomp::GridBase< CELL, DIMENSIONS >::saveMember ( MEMBER *  target,
const Selector< CELL > &  selector,
const Region< DIM > &  region 
) const [inline]

Allows the user to extract a single member variable of all cells within the given region.

Assumes that target points to an area with sufficient space.

template<typename CELL, int DIMENSIONS>
virtual void LibGeoDecomp::GridBase< CELL, DIMENSIONS >::saveMemberImplementation ( char *  target,
const Selector< CELL > &  selector,
const Region< DIM > &  region 
) const [protected, pure virtual]
template<typename CELL, int DIMENSIONS>
void LibGeoDecomp::GridBase< CELL, DIMENSIONS >::saveMemberUnchecked ( char *  target,
const Selector< CELL > &  selector,
const Region< DIM > &  region 
) const [inline]

Same as saveMember(), but sans the type checking.

Useful in Writers and other components that might not know about the variable's type.

template<typename CELL, int DIMENSIONS>
virtual void LibGeoDecomp::GridBase< CELL, DIMENSIONS >::set ( const Coord< DIM > &  ,
const CELL &   
) [pure virtual]
template<typename CELL, int DIMENSIONS>
virtual void LibGeoDecomp::GridBase< CELL, DIMENSIONS >::set ( const Streak< DIM > &  ,
const CELL *   
) [pure virtual]
template<typename CELL, int DIMENSIONS>
virtual void LibGeoDecomp::GridBase< CELL, DIMENSIONS >::setEdge ( const CELL &   )  [pure virtual]

Member Data Documentation

template<typename CELL, int DIMENSIONS>
const int LibGeoDecomp::GridBase< CELL, DIMENSIONS >::DIM = DIMENSIONS [static]

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