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 76f2e97f was
843054c2,
checked in by Peter A. Buhr <pabuhr@…>, 9 years ago
|
licencing: seventh groups of files
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | // |
---|
2 | // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo |
---|
3 | // |
---|
4 | // The contents of this file are covered under the licence agreement in the |
---|
5 | // file "LICENCE" distributed with Cforall. |
---|
6 | // |
---|
7 | // Constant.h -- |
---|
8 | // |
---|
9 | // Author : Richard C. Bilson |
---|
10 | // Created On : Mon May 18 07:44:20 2015 |
---|
11 | // Last Modified By : Peter A. Buhr |
---|
12 | // Last Modified On : Mon May 18 08:46:37 2015 |
---|
13 | // Update Count : 2 |
---|
14 | // |
---|
15 | |
---|
16 | #ifndef CONSTANT_H |
---|
17 | #define CONSTANT_H |
---|
18 | |
---|
19 | #include "SynTree.h" |
---|
20 | #include "Visitor.h" |
---|
21 | #include "Mutator.h" |
---|
22 | |
---|
23 | class Constant { |
---|
24 | public: |
---|
25 | Constant( Type *type, std::string value ); |
---|
26 | virtual ~Constant(); |
---|
27 | |
---|
28 | Type *get_type() { return type; } |
---|
29 | void set_type( Type *newValue ) { type = newValue; } |
---|
30 | std::string get_value() { return value; } |
---|
31 | void set_value( std::string newValue ) { value = newValue; } |
---|
32 | |
---|
33 | virtual Constant *clone() const; |
---|
34 | virtual void accept( Visitor &v ) { v.visit( this ); } |
---|
35 | virtual Constant *acceptMutator( Mutator &m ) { return m.mutate( this ); } |
---|
36 | virtual void print( std::ostream &os ) const; |
---|
37 | private: |
---|
38 | Type *type; |
---|
39 | std::string value; |
---|
40 | }; |
---|
41 | |
---|
42 | #endif // CONSTANT_H |
---|
43 | |
---|
44 | // Local Variables: // |
---|
45 | // tab-width: 4 // |
---|
46 | // mode: c++ // |
---|
47 | // compile-command: "make install" // |
---|
48 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.