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 GEN_ARRAY_PARTICLE_H 00012 #define GEN_ARRAY_PARTICLE_H 00013 00014 /* 00015 * GenArrayParticle - Specialized Particle container for N data elements. 00016 * 00017 * GenArrayParticle is a special version of a ParticleBase class, specialized 00018 * to have D-dimensional coordinates of type T1, and N extra data items of 00019 * type T2. 00020 */ 00021 00022 // include files 00023 #include "Particle/ParticleBase.h" 00024 00025 00026 // GenArrayParticle class definition 00027 template<class PLayout, class T, unsigned N> 00028 class GenArrayParticle : public ParticleBase<PLayout> { 00029 00030 public: 00031 // attributes for this class: an array with N attributes 00032 ParticleAttrib<T> data[N]; 00033 00034 // constructor: user-provided Layout object must be supplied 00035 GenArrayParticle(PLayout* L) : ParticleBase<PLayout>(L) { 00036 for (int i = 0; i < N; i++) 00037 addAttribute(data[i]); 00038 } 00039 00040 private: 00041 // disable default constructor 00042 GenArrayParticle(); 00043 00044 }; 00045 00046 #endif // GEN_ARRAY_PARTICLE_H 00047 00048 /*************************************************************************** 00049 * $RCSfile: GenArrayParticle.h,v $ $Author: adelmann $ 00050 * $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:28 $ 00051 * IPPL_VERSION_ID: $Id: GenArrayParticle.h,v 1.1.1.1 2003/01/23 07:40:28 adelmann Exp $ 00052 ***************************************************************************/