src/Field/BrickExpression.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 /***************************************************************************
00003  *
00004  * The IPPL Framework
00005  * 
00006  *
00007  * Visit http://people.web.psi.ch/adelmann/ for more details
00008  *
00009  ***************************************************************************/
00010 
00011 #ifndef BRICK_EXPRESSION_H
00012 #define BRICK_EXPRESSION_H
00013 
00014 // define away "restrict" if we need to
00015 #ifdef IPPL_NO_RESTRICT
00016 #define restrict 
00017 #endif
00018 
00019 // include files
00020 #include "Utility/Pooled.h"
00021 #include "Utility/RefCounted.h"
00022 #include "Field/AssignTags.h"
00023 
00025 /*
00026 class BrickExpressionBase : public RefCounted, public Pooled
00027 {
00028 public:
00029   BrickExpressionBase() {}
00030   virtual ~BrickExpressionBase() {}
00031   virtual void apply() restrict =0;
00032 };
00033 */
00035 
00036 // template<unsigned Dim, class LHS, class RHS, class OP>
00037 // class BrickExpression : public BrickExpressionBase
00038 template<unsigned Dim, class LHS, class RHS, class OP>
00039 class BrickExpression :
00040   public RefCounted, public Pooled< BrickExpression<Dim,LHS,RHS,OP> >
00041 {
00042 public: 
00043   BrickExpression(const LHS& l, const RHS& r)
00044     : Lhs(l), Rhs(r)
00045       {
00046       }
00047   BrickExpression(const LHS& l, const RHS& r, const OP& o)
00048     : Lhs(l), Rhs(r), Op(o)
00049       {
00050       }
00051 
00052 #if (IPPL_RESTRICT_BUG)
00053   virtual void apply();
00054 #else
00055   virtual void apply() restrict;
00056 #endif
00057 
00058 private:
00059   LHS Lhs;
00060   RHS Rhs;
00061   OP  Op;
00062 };
00063 
00065 
00066 #include "Field/BrickExpression.cpp"
00067 
00068 #endif // BRICK_EXPRESSION_H
00069 
00070 /***************************************************************************
00071  * $RCSfile: BrickExpression.h,v $   $Author: adelmann $
00072  * $Revision: 1.1.1.1 $   $Date: 2003/01/23 07:40:26 $
00073  * IPPL_VERSION_ID: $Id: BrickExpression.h,v 1.1.1.1 2003/01/23 07:40:26 adelmann Exp $ 
00074  ***************************************************************************/
00075 

Generated on Mon Jan 16 13:23:44 2006 for IPPL by  doxygen 1.4.6