source: src/ResolvExpr/CurrentObject.h @ e4d829b

aaron-thesisarm-ehcleanup-dtorsdeferred_resndemanglerjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerresolv-newwith_gc
Last change on this file since e4d829b was e4d829b, checked in by Rob Schluntz <rschlunt@…>, 4 years ago

major effort on designations, works in many cases

  • Property mode set to 100644
File size: 1.4 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// CurrentObject.h --
8//
9// Author           : Rob Schluntz
10// Created On       : Thu Jun  8 11:07:25 2017
11// Last Modified By : Rob Schluntz
12// Last Modified On : Thu Jun  8 11:07:41 2017
13// Update Count     : 2
14//
15
16#ifndef CURRENT_OBJECT_H
17#define CURRENT_OBJECT_H
18
19#include <stack>
20
21#include "SynTree/SynTree.h"
22#include "SynTree/Expression.h"
23
24namespace ResolvExpr {
25        class MemberIterator;
26
27        class CurrentObject {
28        public:
29                CurrentObject();
30                CurrentObject( Type * type );
31
32                /// resolves unresolved designation
33                Designation * findNext( Designation * designation );
34                /// sets current position using resolved designation
35                void setNext( Designation * designation );
36                /// steps to next sub-object of current-object
37                void increment();
38                /// sets new current-object for the duration of this brace-enclosed initializer-list
39                void enterListInit();
40                /// restores previous current-object
41                void exitListInit();
42                /// produces a list of alternatives (Type *, Designation *) for the current sub-object's initializer
43                std::list< InitAlternative > getOptions();
44
45        private:
46                std::stack< MemberIterator * > objStack;
47        };
48} // namespace ResolvExpr
49
50#endif // CURRENT_OBJECT_H
51
52// Local Variables: //
53// tab-width: 4 //
54// mode: c++ //
55// compile-command: "make install" //
56// End: //
57
Note: See TracBrowser for help on using the repository browser.