src/IplPaws/PawsFieldDataSource.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 PAWS_FIELD_DATA_SOURCE_H
00012 #define PAWS_FIELD_DATA_SOURCE_H
00013 
00014 /***********************************************************************
00015  * 
00016  * class PawsFieldDataSource
00017  *
00018  * PawsFieldDataSource is a specific version of DataSourceObject connects
00019  * with a Paws application
00020  *
00021  ***********************************************************************/
00022 
00023 // include files
00024 #include "Paws/PawsData.h"
00025 #include "IpplPaws/DLRepresentation.h"
00026 #include "IpplPaws/DLDescriptor.h"
00027 #include "IpplPaws/PawsDataConnect.h"
00028 #include "DataSource/DataSourceObject.h"
00029 #include "Field/Field.h"
00030 
00031 template <class T, unsigned Dim, class M, class C> class PawsFieldData;
00032 
00033 template<class T, unsigned Dim, class M, class C>
00034 class PawsFieldDataSource : public DataSourceObject {
00035 
00036 public:
00037   //
00038   // Useful public typedefs
00039   //
00040 
00041   typedef Field<T,Dim,M,C>                                  Field_t;
00042   typedef PawsFieldData<T,Dim,M,C>                          PawsFieldData_t;
00043   
00044   // constructor: the name, the connection, the transfer method,
00045   // the field to connect, and the parent node.
00046   PawsFieldDataSource(const char *, DataConnect *, int, Field_t &);
00047 
00048   // destructor
00049   virtual ~PawsFieldDataSource();
00050 
00051   //
00052   // virtual function interface.
00053   //
00054   
00055   // Register an object as something that can be a source of data.
00056   
00057 
00058   // Update the object, that is, make sure the receiver of the data has a
00059   // current and consistent snapshot of the current state.  Return success.
00060   virtual bool update();
00061 
00062   // Indicate to the receiver that we're allowing them time to manipulate the
00063   // data (e.g., for a viz program, to rotate it, change representation, etc.)
00064   // This should only return when the manipulation is done.
00065   virtual void interact(const char * = 0);
00066 
00067 private:
00068   // The Field which will be exchanged
00069   Field_t &myField;
00070 
00071   // The Paws data information object used to send/receive data
00072   PawsFieldData_t *pawsdata;
00073 
00074   // The connection object we're using here
00075   PawsDataConnect *pdc;
00076 };
00077 
00078 #include "IpplPaws/PawsFieldDataSource.cpp"
00079 
00080 #endif  // PAWS_FIELD_DATA_SOURCE_H
00081 
00082 /***************************************************************************
00083  * $RCSfile: PawsFieldDataSource.h,v $   $Author: adelmann $
00084  * $Revision: 1.1.1.1 $   $Date: 2003/01/23 07:40:32 $
00085  * IPPL_VERSION_ID: $Id: PawsFieldDataSource.h,v 1.1.1.1 2003/01/23 07:40:32 adelmann Exp $ 
00086  ***************************************************************************/

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