OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
AttributeBase.h
Go to the documentation of this file.
1#ifndef OPAL_AttributeBase_HH
2#define OPAL_AttributeBase_HH
3
4// ------------------------------------------------------------------------
5// $RCSfile: AttributeBase.h,v $
6// ------------------------------------------------------------------------
7// $Revision: 1.2 $
8// ------------------------------------------------------------------------
9// Copyright: see Copyright.readme
10// ------------------------------------------------------------------------
11//
12// Class: AttributeBase
13//
14// ------------------------------------------------------------------------
15//
16// $Date: 2000/03/29 10:40:33 $
17// $Author: opal $
18//
19// ------------------------------------------------------------------------
20
21#include <cstring>
22#include <iosfwd>
24
25// Class AttributeBase
26// ------------------------------------------------------------------------
28// The various derived classes contain the actual values, notably the
29// template classes SValue<T> for scalars and AValue<T> for arrays.
30
31class AttributeBase : public Invalidator {
32public:
34 virtual ~AttributeBase();
35
37 // Construct an exact copy of the value.
38 virtual AttributeBase* clone() const = 0;
39
41 // Uses [b]print()[/b] to convert the input expression for the attribute
42 // to a printable representation.
43 std::string getImage() const;
44
46 // Return [b]true[/b] if the value is an expression.
47 virtual bool isExpression() const;
48
50 // Print the value on the given output stream.
51 // The result allows reconstruction of any expression.
52 virtual void print(std::ostream&) const = 0;
53
54private:
55 // Not implemented.
58};
59
60#endif // OPAL_AttributeBase_HH
Abstract base class for attribute values of different types.
AttributeBase(AttributeBase &)
virtual bool isExpression() const
Test for expression.
virtual ~AttributeBase()
void operator=(AttributeBase &)
virtual AttributeBase * clone() const =0
Make clone.
std::string getImage() const
Convert to string.
virtual void print(std::ostream &) const =0
Print value.
Abstract base class for references which must be invalidated when an.
Definition Invalidator.h:26