OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
StringConstant.h
Go to the documentation of this file.
1 #ifndef OPAL_StringConstant_HH
2 #define OPAL_StringConstant_HH
3 // ------------------------------------------------------------------------
4 // $RCSfile: StringConstant.h,v $
5 // ------------------------------------------------------------------------
6 // $Revision: 1.1.1.1 $
7 // ------------------------------------------------------------------------
8 // Copyright: see Copyright.readme
9 // ------------------------------------------------------------------------
10 //
11 // Class: StringConstant
12 //
13 // ------------------------------------------------------------------------
14 //
15 // $Date: 2000/03/27 09:33:49 $
16 // $Author: Andreas Adelmann $
17 //
18 // ------------------------------------------------------------------------
19 
21 
22 
23 // Class StringConstant
24 // ------------------------------------------------------------------------
26 
28 
29 public:
30 
33 
34  virtual ~StringConstant();
35 
37  // True, if [b]rhs[/b] is a string constant.
38  virtual bool canReplaceBy(Object *object);
39 
41  virtual StringConstant *clone(const std::string &name);
42 
44  virtual void print(std::ostream &) const;
45 
47  virtual void printValue(std::ostream &os) const;
48 
50  virtual std::string getString() const;
51 
52 private:
53 
54  // Not implemented.
56  void operator=(const StringConstant &);
57 
58  // Clone constructor.
59  StringConstant(const std::string &name, StringConstant *parent);
60  StringConstant(const std::string &name, StringConstant *parent, const std::string &value);
61 };
62 
63 #endif // OPAL_StringConstant_HH
virtual bool canReplaceBy(Object *object)
Test if object can be replaced.
virtual void printValue(std::ostream &os) const
Print its value.
Attribute & value()
Return the attribute representing the value of the definition.
virtual void print(std::ostream &) const
Print the constant.
StringConstant()
Exemplar constructor.
The STRING CONSTANT definition.
virtual ~StringConstant()
virtual StringConstant * clone(const std::string &name)
Make clone.
The base class for all OPAL objects.
Definition: Object.h:48
The base class for all OPAL value definitions.
const std::string name
virtual std::string getString() const
Return value.
void operator=(const StringConstant &)