source: src/ResolvExpr/CurrentObject.h @ fd344aa

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

refactor indenter from CodeGen? and CurrentObject?

  • Property mode set to 100644
File size: 1.6 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        // TODO: memory management of MemberIterators
28        class CurrentObject {
29        public:
30                CurrentObject();
31                CurrentObject( Type * type );
32
33                /// resolves unresolved designation
34                Designation * findNext( Designation * designation );
35                /// sets current position using resolved designation
36                void setNext( Designation * designation );
37                /// steps to next sub-object of current-object
38                void increment();
39                /// sets new current-object for the duration of this brace-enclosed initializer-list
40                void enterListInit();
41                /// restores previous current-object
42                void exitListInit();
43                /// produces a list of alternatives (Type *, Designation *) for the current sub-object's initializer
44                std::list< InitAlternative > getOptions();
45                /// produces the type of the current object but no subobjects
46                Type * getCurrentType();
47
48        private:
49                std::stack< MemberIterator * > objStack;
50        };
51} // namespace ResolvExpr
52
53#endif // CURRENT_OBJECT_H
54
55// Local Variables: //
56// tab-width: 4 //
57// mode: c++ //
58// compile-command: "make install" //
59// End: //
60
Note: See TracBrowser for help on using the repository browser.