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 MAKE_DATA_SOURCE_H 00012 #define MAKE_DATA_SOURCE_H 00013 00014 /*********************************************************************** 00015 * 00016 * make_DataSourceObject is essentially a factory function 00017 * for producing different specific types of DataSourceObjects. 00018 * It asks the IpplInfo object which type of data source to 00019 * use, and then makes the appropriate DataSourceObject subclass. 00020 * 00021 ***********************************************************************/ 00022 00023 // forward declarations 00024 template<class T, unsigned Dim, class M, class C> class Field; 00025 template<class T> class ParticleAttrib; 00026 template<class PLayout> class ParticleBase; 00027 template<class T> class ScalarDataSource; 00028 template<class T> class StringDataSource; 00029 class DataSourceObject; 00030 class DataConnect; 00031 00032 00033 // a version of make_DataSourceObject for Field's. 00034 // arguments: name, connection type, transfer metohd, Field 00035 template<class T, unsigned Dim, class M, class C> 00036 DataSourceObject * 00037 make_DataSourceObject(const char *, DataConnect *, int, Field<T,Dim,M,C>&); 00038 00039 00040 // a version of make_DataSourceObject for ParticleAttrib's. 00041 // arguments: name, connection type, transfer method, ParticleAttrib 00042 template<class T> 00043 DataSourceObject * 00044 make_DataSourceObject(const char *, DataConnect *, int, ParticleAttrib<T>&); 00045 00046 00047 // a version of make_DataSourceObject for ParticleAttrib's. 00048 // arguments: name, connection type, transfer method, ParticleBase 00049 template<class PLayout> 00050 DataSourceObject * 00051 make_DataSourceObject(const char *,DataConnect *,int,ParticleBase<PLayout>&); 00052 00053 // a version of make_DataSourceObject for Scalar's. 00054 // arguments: name, connection type, transfer method, ScalarDataSource 00055 template<class T> 00056 DataSourceObject * 00057 make_DataSourceObject(const char *,DataConnect *,int,ScalarDataSource<T>&); 00058 00059 00060 // a version of make_DataSourceObject for String's. 00061 // arguments: name, connection type, transfer method, StringDataSource 00062 template<class T> 00063 DataSourceObject * 00064 make_DataSourceObject(const char *,DataConnect *,int,StringDataSource<T>&); 00065 00066 #include "DataSource/MakeDataSource.cpp" 00067 00068 #endif // MAKE_DATA_SOURCE_H 00069 00070 /*************************************************************************** 00071 * $RCSfile: MakeDataSource.h,v $ $Author: adelmann $ 00072 * $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:25 $ 00073 * IPPL_VERSION_ID: $Id: MakeDataSource.h,v 1.1.1.1 2003/01/23 07:40:25 adelmann Exp $ 00074 ***************************************************************************/