OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
FilePtclBaseDataSource.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 FILE_PARTICLE_BASE_DATA_SOURCE_H
12 #define FILE_PARTICLE_BASE_DATA_SOURCE_H
13 
14 /***********************************************************************
15  *
16  * class FileIpplParticleBaseDataSource
17  *
18  * A specific version of DataSourceObject which takes the data for
19  * a given IpplParticleBase and writes it to a file using a DiscParticle
20  * object.
21  *
22  ***********************************************************************/
23 
24 // include files
27 #include "Utility/DiscParticle.h"
28 
29 
30 template<class T>
32 
33 public:
34  // constructor: the name, the connection, the transfer method,
35  // the IpplParticleBase to connect
36  FileIpplParticleBaseDataSource(const char *, DataConnect *, int,
38 
39  // destructor
41 
42  //
43  // virtual function interface.
44  //
45 
46  // Update the object, that is, make sure the receiver of the data has a
47  // current and consistent snapshot of the current state. Return success.
48  virtual bool update();
49 
50  // Indicate to the receiver that we're allowing them time to manipulate the
51  // data (e.g., for a viz program, to rotate it, change representation, etc.)
52  // This should only return when the manipulation is done.
53  virtual void interact(const char * = 0);
54 
55 private:
56  // the DiscParticle object, which read/writes the data
58 
59  // the IpplParticleBase to read into (or write from)
61 
62  // the number of frames we have read or written (i.e. or current record)
63  int counter;
64 };
65 
67 
68 #endif // FILE_PARTICLE_BASE_DATA_SOURCE_H
69 
70 /***************************************************************************
71  * $RCSfile: FilePtclBaseDataSource.h,v $ $Author: adelmann $
72  * $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:25 $
73  * IPPL_VERSION_ID: $Id: FilePtclBaseDataSource.h,v 1.1.1.1 2003/01/23 07:40:25 adelmann Exp $
74  ***************************************************************************/
FileIpplParticleBaseDataSource(const char *, DataConnect *, int, IpplParticleBase< T > &)
IpplParticleBase< T > & MyParticles
virtual void interact(const char *=0)