source: src/ResolvExpr/CurrentObject.h @ 746ae82

ADTarm-ehast-experimentalcleanup-dtorsenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 746ae82 was ea6332d, checked in by Thierry Delisle <tdelisle@…>, 7 years ago

Big header cleaning pass - commit 3

  • Property mode set to 100644
File size: 1.6 KB
RevLine 
[e4d829b]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
[6b0b624]11// Last Modified By : Peter A. Buhr
12// Last Modified On : Sat Jul 22 09:36:48 2017
13// Update Count     : 3
[e4d829b]14//
15
[6b0b624]16#pragma once
[e4d829b]17
[ea6332d]18#include <list>   // for list
19#include <stack>  // for stack
[e4d829b]20
[ea6332d]21class Designation;
22class Type;
23struct InitAlternative;
[e4d829b]24
25namespace ResolvExpr {
26        class MemberIterator;
27
[f7cb0bc]28        // TODO: memory management of MemberIterators
[e4d829b]29        class CurrentObject {
30        public:
31                CurrentObject();
32                CurrentObject( Type * type );
33
34                /// resolves unresolved designation
35                Designation * findNext( Designation * designation );
36                /// sets current position using resolved designation
37                void setNext( Designation * designation );
38                /// steps to next sub-object of current-object
39                void increment();
40                /// sets new current-object for the duration of this brace-enclosed initializer-list
41                void enterListInit();
42                /// restores previous current-object
43                void exitListInit();
44                /// produces a list of alternatives (Type *, Designation *) for the current sub-object's initializer
45                std::list< InitAlternative > getOptions();
[62423350]46                /// produces the type of the current object but no subobjects
47                Type * getCurrentType();
[e4d829b]48
49        private:
50                std::stack< MemberIterator * > objStack;
51        };
52} // namespace ResolvExpr
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.