ComponentAccess.h File Reference


Detailed Description

ComponentAccess<Container, Comp> is a general functor class that users can specialize to tell POOMA how to access components inside an object used as an element in expressions.

(For example, Vector, Tensor etc.)

This graph shows which files directly or indirectly include this file:


Classes

class  ComponentWrapper< Components >
 Wrapper class to encapsulate a component specification. More...
struct  ComponentAccess< T, Components >
 ComponentAccess is an interface class that is used to provide an API for accessing components of a composite type. More...

Defines

#define POOMA_COMPONENT_ACCESS(IN, TAG, TYPE, MEMBER)

Define Documentation

#define POOMA_COMPONENT_ACCESS ( IN,
TAG,
TYPE,
MEMBER   ) 

Value:

\
struct TAG                                                              \
{                                                                       \
  TAG() { }                                                             \
  TAG(const TAG &) { }                                                  \
};                                                                      \
                                                                        \
template<>                                                              \
struct ComponentAccess<IN, TAG>                                         \
{                                                                       \
  typedef TYPE Element_t;                                               \
  typedef TYPE &ElementRef_t;                                           \
                                                                        \
  static inline ElementRef_t indexRef(IN &in, const TAG &)              \
  {                                                                     \
    return in.MEMBER;                                                   \
  }                                                                     \
                                                                        \
  static inline Element_t index(const IN &in, const TAG &)              \
  {                                                                     \
    return in.MEMBER;                                                   \
  }                                                                     \
};


Generated on Sun May 17 21:37:40 2009 for FreePOOMA by  doxygen 1.5.5