OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
ConstChannel.h
Go to the documentation of this file.
1#ifndef OPALX_ConstChannel_HH
2#define OPALX_ConstChannel_HH
3
4// ------------------------------------------------------------------------
5// $RCSfile: ConstChannel.h,v $
6// ------------------------------------------------------------------------
7// $Revision: 1.1.1.1 $
8// ------------------------------------------------------------------------
9// Copyright: see Copyright.readme
10// ------------------------------------------------------------------------
11//
12// Class: ConstChannel
13//
14// ------------------------------------------------------------------------
15// Class category: Channels
16// ------------------------------------------------------------------------
17//
18// $Date: 2000/03/27 09:32:35 $
19// $Author: fci $
20//
21// ------------------------------------------------------------------------
22
23// Class ConstChannel
24// ------------------------------------------------------------------------
26// Class ConstChannel allows access to an arbitrary [b]double[/b] value.
27
29public:
31 virtual ~ConstChannel();
32
34 virtual ConstChannel* clone() const = 0;
35
37 // If the channel can be read, set [b]value[/b] and return true,
38 // otherwise return false.
39 virtual bool get(double& value) const = 0;
40
42 // Return the value read from the channel.
43 operator double() const {
44 double value = 0.0;
45 get(value);
46 return value;
47 }
48
50 // Return false for this class (channel cannot be set).
51 virtual bool isSettable() const;
52
53private:
54 // Not implemented.
57};
58
59#endif // OPALX_ConstChannel_HH
Abstract interface for read-only access to variable.
virtual bool isSettable() const
Check if settable.
virtual ConstChannel * clone() const =0
Duplicate the channel.
virtual bool get(double &value) const =0
Read channel.
const ConstChannel & operator=(const ConstChannel &)
ConstChannel(const ConstChannel &)
virtual ~ConstChannel()