OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ippl
src
DataSource
ScalarDataSource.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 SCALAR_DATA_SOURCE_H
12
#define SCALAR_DATA_SOURCE_H
13
14
/***********************************************************************
15
*
16
* ScalarDataSource is a DataSource for scalars.
17
* It makes a scalar available for another program or data processing
18
* API (e.g., visualization) through the DataSource API.
19
*
20
***********************************************************************/
21
22
// include files
23
#include "
DataSource/DataSource.h
"
24
25
// forward declarations
26
class
DataSourceObject
;
27
class
DataConnect
;
28
29
// A DataSource class for handling scalars
30
template
<
class
T>
31
class
ScalarDataSource
:
public
DataSource
{
32
33
public
:
34
// constructor
35
ScalarDataSource
(
T
& S) :
MyScalar
(S) {};
36
37
// destructor
38
virtual
~ScalarDataSource
() { }
39
40
// Return ptr to Scalar
41
T
&
scalarRef
() {
return
MyScalar
; }
42
43
protected
:
44
// a virtual function which is called by this base class to get a
45
// specific instance of DataSourceObject based on the type of data
46
// and the connection method (the argument to the call).
47
DataSourceObject
*
createDataSourceObject
(
const
char
*,
48
DataConnect
*,
49
int
);
50
51
private
:
52
// The scalar
53
T
&
MyScalar
;
54
};
55
56
#include "
DataSource/ScalarDataSource.hpp
"
57
58
#endif // SCALAR_DATA_SOURCE_H
59
60
/***************************************************************************
61
* $RCSfile: ScalarDataSource.h,v $ $Author: adelmann $
62
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:25 $
63
* IPPL_VERSION_ID: $Id: ScalarDataSource.h,v 1.1.1.1 2003/01/23 07:40:25 adelmann Exp $
64
***************************************************************************/
ScalarDataSource
Definition:
MakeDataSource.h:27
ScalarDataSource::createDataSourceObject
DataSourceObject * createDataSourceObject(const char *, DataConnect *, int)
Definition:
ScalarDataSource.hpp:37
T
Definition:
rbendmap.h:8
DataSourceObject
Definition:
DataSourceObject.h:53
ScalarDataSource::~ScalarDataSource
virtual ~ScalarDataSource()
Definition:
ScalarDataSource.h:38
DataSource
Definition:
DataSource.h:56
ScalarDataSource::MyScalar
T & MyScalar
Definition:
ScalarDataSource.h:53
DataConnect
Definition:
DataConnect.h:32
DataSource.h
ScalarDataSource::ScalarDataSource
ScalarDataSource(T &S)
Definition:
ScalarDataSource.h:35
ScalarDataSource::scalarRef
T & scalarRef()
Definition:
ScalarDataSource.h:41
ScalarDataSource.hpp
Generated on Sat Jan 4 2020 14:47:34 for OPAL (Object Oriented Parallel Accelerator Library) by
1.8.5