ADT
aaron-thesis
arm-eh
ast-experimental
cleanup-dtors
deferred_resn
demangler
enum
forall-pointer-decay
jacob/cs343-translation
jenkins-sandbox
new-ast
new-ast-unique-expr
new-env
no_list
persistent-indexer
pthread-emulation
qualifiedEnum
resolv-new
with_gc
Last change
on this file since 6b224a52 was ea6332d, checked in by Thierry Delisle <tdelisle@…>, 8 years ago |
Big header cleaning pass - commit 3
|
-
Property mode
set to
100644
|
File size:
1.5 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 | // Declaration.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 : Sat Jul 22 09:54:14 2017
|
---|
13 | // Update Count : 39
|
---|
14 | //
|
---|
15 |
|
---|
16 | #pragma once
|
---|
17 |
|
---|
18 | #include <iosfwd> // for ostream
|
---|
19 | #include <list> // for list
|
---|
20 | #include <string> // for string, operator==
|
---|
21 |
|
---|
22 | class Expression;
|
---|
23 |
|
---|
24 | // GCC attribute
|
---|
25 | // https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/Attribute-Syntax.html#Attribute-Syntax
|
---|
26 | class Attribute {
|
---|
27 | public:
|
---|
28 | Attribute( std::string name = "", const std::list< Expression * > & parameters = std::list< Expression * >() ) : name( name ), parameters( parameters ) {}
|
---|
29 | Attribute( const Attribute &other );
|
---|
30 | virtual ~Attribute();
|
---|
31 |
|
---|
32 | std::string get_name() const { return name; }
|
---|
33 | void set_name( const std::string & newValue ) { name = newValue; }
|
---|
34 | std::list< Expression * > & get_parameters() { return parameters; }
|
---|
35 | bool empty() const { return name == ""; }
|
---|
36 |
|
---|
37 | Attribute * clone() const { return new Attribute( *this ); }
|
---|
38 | void print( std:: ostream &os, int indent = 0 ) const;
|
---|
39 | private:
|
---|
40 | std::string name;
|
---|
41 | // to keep things nice and tight, use NameExpr for special identifier parameters
|
---|
42 | std::list< Expression * > parameters;
|
---|
43 | };
|
---|
44 |
|
---|
45 | const std::list< Attribute * > noAttributes;
|
---|
46 |
|
---|
47 | // Local Variables: //
|
---|
48 | // tab-width: 4 //
|
---|
49 | // mode: c++ //
|
---|
50 | // compile-command: "make install" //
|
---|
51 | // End: //
|
---|
Note:
See
TracBrowser
for help on using the repository browser.