Changes in / [81e1f32:15d248e]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CurrentObject.cc
r81e1f32 r15d248e 62 62 virtual ~MemberIterator() {} 63 63 64 /// walks the current object using the given designators as a guide 64 65 virtual void setPosition( std::list< Expression * > & designators ) = 0; 66 67 /// retrieve the list of possible Type/Designaton pairs for the current position in the currect object 65 68 virtual std::list<InitAlternative> operator*() const = 0; 69 70 /// true if the iterator is not currently at the end 66 71 virtual operator bool() const = 0; 72 73 /// moves the iterator by one member in the current object 67 74 virtual MemberIterator & bigStep() = 0; 75 76 /// moves the iterator by one member in the current subobject 68 77 virtual MemberIterator & smallStep() = 0; 78 79 /// the type of the current object 69 80 virtual Type * getType() = 0; 81 82 /// the type of the current subobject 70 83 virtual Type * getNext() = 0; 71 84 85 /// printing for debug 72 86 virtual void print( std::ostream & out, Indenter indent ) const = 0; 73 87 88 /// helper for operator*; aggregates must add designator to each init alternative, but 89 /// adding designators in operator* creates duplicates. 74 90 virtual std::list<InitAlternative> first() const = 0; // should be protected 75 91 }; … … 354 370 } 355 371 } 356 // if ( curMember == std::next( decl->get_members().begin(), 1 ) ) { // xxx - this never triggers because curMember is incremented immediately on construction 357 if ( atbegin ) { // xxx - this never triggers because curMember is incremented immediately on construction 372 if ( atbegin ) { 358 373 // xxx - what about case of empty struct?? 359 374 // only add self if at the very beginning of the structure … … 389 404 return *this; 390 405 } 391 virtual std::list<InitAlternative> first() const { return std::list<InitAlternative>{}; }392 406 }; 393 407
Note: See TracChangeset
for help on using the changeset viewer.