source: src/ResolvExpr/CurrentObject.h @ 59a75cb

aaron-thesisarm-ehcleanup-dtorsdeferred_resndemanglerjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerresolv-newwith_gc
Last change on this file since 59a75cb was 6b0b624, checked in by Peter A. Buhr <pabuhr@…>, 4 years ago

change #ifndef to #pragma once

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