OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
GenArrayParticle.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /***************************************************************************
3  *
4  * The IPPL Framework
5  *
6  *
7  * Visit http://people.web.psi.ch/adelmann/ for more details
8  *
9  ***************************************************************************/
10 
11 #ifndef GEN_ARRAY_PARTICLE_H
12 #define GEN_ARRAY_PARTICLE_H
13 
14 /*
15  * GenArrayParticle - Specialized Particle container for N data elements.
16  *
17  * GenArrayParticle is a special version of a IpplParticleBase class, specialized
18  * to have D-dimensional coordinates of type T1, and N extra data items of
19  * type T2.
20  */
21 
22 // include files
24 
25 
26 // GenArrayParticle class definition
27 template<class PLayout, class T, unsigned N>
28 class GenArrayParticle : public IpplParticleBase<PLayout> {
29 
30 public:
31  // attributes for this class: an array with N attributes
33 
34  // constructor: user-provided Layout object must be supplied
35  GenArrayParticle(PLayout* L) : IpplParticleBase<PLayout>(L) {
36  for (int i = 0; i < N; i++)
37  addAttribute(data[i]);
38  }
39 
40 private:
41  // disable default constructor
43 
44 };
45 
46 #endif // GEN_ARRAY_PARTICLE_H
47 
48 /***************************************************************************
49  * $RCSfile: GenArrayParticle.h,v $ $Author: adelmann $
50  * $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:28 $
51  * IPPL_VERSION_ID: $Id: GenArrayParticle.h,v 1.1.1.1 2003/01/23 07:40:28 adelmann Exp $
52  ***************************************************************************/
ParticleAttrib< T > data[N]
GenArrayParticle(PLayout *L)
void addAttribute(ParticleAttribBase &pa)