source: src/ResolvExpr/CurrentObject.h @ b37dba0

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since b37dba0 was 0720e049, checked in by Rob Schluntz <rschlunt@…>, 7 years ago

Merge branch 'master' of plg.uwaterloo.ca:/u/cforall/software/cfa/cfa-cc

  • 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// CurrentObject.h --
8//
9// Author           : Rob Schluntz
10// Created On       : Thu Jun  8 11:07:25 2017
11// Last Modified By : Peter A. Buhr
12// Last Modified On : Sat Jul 22 09:36:48 2017
13// Update Count     : 3
14//
15
16#pragma once
17
18#include <stack>
19
20#include "SynTree/SynTree.h"
21#include "SynTree/Expression.h"
22
23namespace ResolvExpr {
24        class MemberIterator;
25
26        // TODO: memory management of MemberIterators
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                /// produces the type of the current object but no subobjects
45                Type * getCurrentType();
46
47        private:
48                std::stack< MemberIterator * > objStack;
49        };
50} // namespace ResolvExpr
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.