source: src/ResolvExpr/CurrentObject.h @ 9cc0472

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 9cc0472 was 62423350, checked in by Rob Schluntz <rschlunt@…>, 7 years ago

Big push on designations and initialization: works with generic types, tuples, arrays, tests pass.
Refactor guard_value_impl.
Add list of declarations to TupleType?.

  • 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 : 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                /// 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#endif // CURRENT_OBJECT_H
53
54// Local Variables: //
55// tab-width: 4 //
56// mode: c++ //
57// compile-command: "make install" //
58// End: //
59
Note: See TracBrowser for help on using the repository browser.