Commit 6ca3e45e authored by snuverink_j's avatar snuverink_j
Browse files

Resolve "Unused classes in IPPL - 2"

parent ea19273c
......@@ -25,10 +25,6 @@ set (_HDRS
MakeDataSource.h
PtclAttribDataSource.h
PtclBaseDataSource.h
ScalarDataSource.hpp
ScalarDataSource.h
StringDataSource.hpp
StringDataSource.h
)
include_directories (
......
......@@ -24,8 +24,6 @@
template<class T, unsigned Dim, class M, class C> class Field;
template<class T> class ParticleAttrib;
template<class PLayout> class IpplParticleBase;
template<class T> class ScalarDataSource;
template<class T> class StringDataSource;
class DataSourceObject;
class DataConnect;
......@@ -50,19 +48,6 @@ template<class PLayout>
DataSourceObject *
make_DataSourceObject(const char *,DataConnect *,int,IpplParticleBase<PLayout>&);
// a version of make_DataSourceObject for Scalar's.
// arguments: name, connection type, transfer method, ScalarDataSource
template<class T>
DataSourceObject *
make_DataSourceObject(const char *,DataConnect *,int,ScalarDataSource<T>&);
// a version of make_DataSourceObject for String's.
// arguments: name, connection type, transfer method, StringDataSource
template<class T>
DataSourceObject *
make_DataSourceObject(const char *,DataConnect *,int,StringDataSource<T>&);
#include "DataSource/MakeDataSource.hpp"
#endif // MAKE_DATA_SOURCE_H
......
......@@ -2,8 +2,8 @@
/***************************************************************************
*
* The IPPL Framework
*
* This program was prepared by PSI.
*
* This program was prepared by PSI.
* All rights in the program are reserved by PSI.
* Neither PSI nor the author(s)
* makes any warranty, express or implied, or assumes any liability or
......@@ -17,7 +17,7 @@
/***************************************************************************
*
* The IPPL Framework
*
*
*
* Visit http://people.web.psi.ch/adelmann/ for more details
*
......@@ -51,7 +51,7 @@ class FileIpplParticleBaseDataSource;
template<class T, unsigned Dim, class M, class C>
DataSourceObject *
make_DataSourceObject(const char *nm, DataConnect *dc, int t,
Field<T,Dim,M,C>& F) {
Field<T,Dim,M,C>& F) {
// get the connection method name, and make a string out of it
std::string method(dc->DSID());
......@@ -76,7 +76,7 @@ make_DataSourceObject(const char *nm, DataConnect *dc, int t,
template<class T>
DataSourceObject *
make_DataSourceObject(const char *nm, DataConnect *dc, int t,
ParticleAttrib<T>& P) {
ParticleAttrib<T>& P) {
// get the connection method name, and make a string out of it
std::string method(dc->DSID());
......@@ -101,7 +101,7 @@ make_DataSourceObject(const char *nm, DataConnect *dc, int t,
template<class PLayout>
DataSourceObject *
make_DataSourceObject(const char *nm, DataConnect *dc, int t,
IpplParticleBase<PLayout>& P) {
IpplParticleBase<PLayout>& P) {
// get the connection method name, and make a string out of it
std::string method(dc->DSID());
......@@ -118,57 +118,4 @@ make_DataSourceObject(const char *nm, DataConnect *dc, int t,
dso = new DataSourceObject;
return dso;
}
////////////////////////////////////////////////////////////////////////////
// a version of make_DataSourceObject for ScalarDataSource's
template<class T>
DataSourceObject *
make_DataSourceObject(const char *nm, DataConnect *dc, int t,
ScalarDataSource<T>& S) {
// get the connection method name, and make a string out of it
std::string method(dc->DSID());
DataSourceObject *dso = 0;
if (method == "file") {
// create a DataSourceObject for this FILE which will connect to
// a file
}
// make a default connection is nothing has been found
if (dso == 0)
dso = new DataSourceObject;
return dso;
}
////////////////////////////////////////////////////////////////////////////
// a version of make_DataSourceObject for StringDataSource's
template<class T>
DataSourceObject *
make_DataSourceObject(const char *nm, DataConnect *dc, int t,
StringDataSource<T>& S) {
// get the connection method name, and make a string out of it
std::string method(dc->DSID());
DataSourceObject *dso = 0;
if (method == "file") {
// create a DataSourceObject for this FILE which will connect to
// a file
}
// make a default connection is nothing has been found
if (dso == 0)
dso = new DataSourceObject;
return dso;
}
/***************************************************************************
* $RCSfile: MakeDataSource.cpp,v $ $Author: adelmann $
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:25 $
* IPPL_VERSION_ID: $Id: MakeDataSource.cpp,v 1.1.1.1 2003/01/23 07:40:25 adelmann Exp $
***************************************************************************/
}
\ No newline at end of file
// -*- C++ -*-
/***************************************************************************
*
* The IPPL Framework
*
*
* Visit http://people.web.psi.ch/adelmann/ for more details
*
***************************************************************************/
#ifndef SCALAR_DATA_SOURCE_H
#define SCALAR_DATA_SOURCE_H
/***********************************************************************
*
* ScalarDataSource is a DataSource for scalars.
* It makes a scalar available for another program or data processing
* API (e.g., visualization) through the DataSource API.
*
***********************************************************************/
// include files
#include "DataSource/DataSource.h"
// forward declarations
class DataSourceObject;
class DataConnect;
// A DataSource class for handling scalars
template<class T>
class ScalarDataSource : public DataSource {
public:
// constructor
ScalarDataSource(T& S) : MyScalar(S) {};
// destructor
virtual ~ScalarDataSource() { }
// Return ptr to Scalar
T& scalarRef() { return MyScalar; }
protected:
// a virtual function which is called by this base class to get a
// specific instance of DataSourceObject based on the type of data
// and the connection method (the argument to the call).
DataSourceObject *createDataSourceObject(const char *,
DataConnect *,
int);
private:
// The scalar
T& MyScalar;
};
#include "DataSource/ScalarDataSource.hpp"
#endif // SCALAR_DATA_SOURCE_H
/***************************************************************************
* $RCSfile: ScalarDataSource.h,v $ $Author: adelmann $
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:25 $
* IPPL_VERSION_ID: $Id: ScalarDataSource.h,v 1.1.1.1 2003/01/23 07:40:25 adelmann Exp $
***************************************************************************/
// -*- C++ -*-
/***************************************************************************
*
* The IPPL Framework
*
* This program was prepared by PSI.
* All rights in the program are reserved by PSI.
* Neither PSI nor the author(s)
* makes any warranty, express or implied, or assumes any liability or
* responsibility for the use of this software
*
* Visit www.amas.web.psi for more details
*
***************************************************************************/
// -*- C++ -*-
/***************************************************************************
*
* The IPPL Framework
*
*
* Visit http://people.web.psi.ch/adelmann/ for more details
*
***************************************************************************/
// include files
#include "DataSource/ScalarDataSource.h"
#include "DataSource/MakeDataSource.h"
#include "DataSource/DataConnect.h"
//////////////////////////////////////////////////////////////////////////
// a virtual function which is called by this base class to get a
// specific instance of DataSourceObject based on the type of data
// and the connection method (the argument to the call).
template<class T>
DataSourceObject *ScalarDataSource<T>::createDataSourceObject(const char *nm, DataConnect *dc, int tm) {
return make_DataSourceObject(nm, dc, tm, *this);
}
/***************************************************************************
* $RCSfile: ScalarDataSource.cpp,v $ $Author: adelmann $
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:25 $
* IPPL_VERSION_ID: $Id: ScalarDataSource.cpp,v 1.1.1.1 2003/01/23 07:40:25 adelmann Exp $
***************************************************************************/
// -*- C++ -*-
/***************************************************************************
*
* The IPPL Framework
*
*
* Visit http://people.web.psi.ch/adelmann/ for more details
*
***************************************************************************/
#ifndef STRING_DATA_SOURCE_H
#define STRING_DATA_SOURCE_H
/***********************************************************************
*
* StringDataSource is a DataSource for strings.
* It makes a string available for another program or data processing
* API (e.g., visualization) through the DataSource API.
*
***********************************************************************/
// include files
#include "DataSource/DataSource.h"
// forward declarations
class DataSourceObject;
class DataConnect;
// A DataSource class for handling strings
// A string can be a char* (T=char) or std::string (T=string)
template <class T>
class StringDataSource : public DataSource {
public:
// constructor
StringDataSource(T* S, int mlen) : MyString(S), StringLen(mlen) {};
// destructor
virtual ~StringDataSource() { }
// Return ptr to Scalar
T *stringPtr() { return MyString; }
const T *stringPtr() const { return MyString; }
// Return max length of string
int stringLen() const { return StringLen; }
protected:
// a virtual function which is called by this base class to get a
// specific instance of DataSourceObject based on the type of data
// and the connection method (the argument to the call).
virtual DataSourceObject *createDataSourceObject(const char *,
DataConnect *,
int);
private:
// The string
T* MyString;
int StringLen;
};
#include "DataSource/StringDataSource.hpp"
#endif // STRING_DATA_SOURCE_H
/***************************************************************************
* $RCSfile: StringDataSource.h,v $ $Author: adelmann $
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:25 $
* IPPL_VERSION_ID: $Id: StringDataSource.h,v 1.1.1.1 2003/01/23 07:40:25 adelmann Exp $
***************************************************************************/
// -*- C++ -*-
/***************************************************************************
*
* The IPPL Framework
*
* This program was prepared by PSI.
* All rights in the program are reserved by PSI.
* Neither PSI nor the author(s)
* makes any warranty, express or implied, or assumes any liability or
* responsibility for the use of this software
*
* Visit www.amas.web.psi for more details
*
***************************************************************************/
// -*- C++ -*-
/***************************************************************************
*
* The IPPL Framework
*
*
* Visit http://people.web.psi.ch/adelmann/ for more details
*
***************************************************************************/
// include files
#include "DataSource/DataSourceObject.h"
#include "DataSource/DataConnect.h"
#include
//////////////////////////////////////////////////////////////////////////
// a virtual function which is called by this base class to get a
// specific instance of DataSourceObject based on the type of data
// and the connection method (the argument to the call).
template <class T>
DataSourceObject *StringDataSource<T>::createDataSourceObject(const char *nm,
DataConnect *dc,
int tm) {
// get the connection method name, and make a string out of it
std::string method(dc->DSID());
DataSourceObject *dso = 0;
if (method == "file") {
// create a DataSourceObject for this FILE which will connect to
// a file
}
// make a default connection is nothing has been found
if (dso == 0)
dso = new DataSourceObject;
return dso;
}
/***************************************************************************
* $RCSfile: StringDataSource.cpp,v $ $Author: adelmann $
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:25 $
* IPPL_VERSION_ID: $Id: StringDataSource.cpp,v 1.1.1.1 2003/01/23 07:40:25 adelmann Exp $
***************************************************************************/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment