ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change
on this file since 02e9ae2 was
51b7345,
checked in by Peter A. Buhr <pabuhr@…>, 10 years ago
|
initial commit
|
-
Property mode set to
100644
|
File size:
844 bytes
|
Line | |
---|
1 | /* |
---|
2 | * This file is part of the Cforall project |
---|
3 | * |
---|
4 | * $Id: Constant.h,v 1.6 2005/08/29 20:59:25 rcbilson Exp $ |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #ifndef CONSTANT_H |
---|
9 | #define CONSTANT_H |
---|
10 | |
---|
11 | #include "SynTree.h" |
---|
12 | #include "Visitor.h" |
---|
13 | #include "Mutator.h" |
---|
14 | |
---|
15 | |
---|
16 | class Constant |
---|
17 | { |
---|
18 | public: |
---|
19 | Constant( Type *type, std::string value ); |
---|
20 | virtual ~Constant(); |
---|
21 | |
---|
22 | Type *get_type() { return type; } |
---|
23 | void set_type( Type *newValue ) { type = newValue; } |
---|
24 | std::string get_value() { return value; } |
---|
25 | void set_value( std::string newValue ) { value = newValue; } |
---|
26 | |
---|
27 | virtual Constant *clone() const; |
---|
28 | virtual void accept( Visitor &v ) { v.visit( this ); } |
---|
29 | virtual Constant *acceptMutator( Mutator &m ) { return m.mutate( this ); } |
---|
30 | virtual void print( std::ostream &os ) const; |
---|
31 | |
---|
32 | private: |
---|
33 | Type *type; |
---|
34 | std::string value; |
---|
35 | }; |
---|
36 | |
---|
37 | |
---|
38 | |
---|
39 | |
---|
40 | #endif /* #ifndef CONSTANT_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.