Changes in src/ResolvExpr/CurrentObject.cc [84e8423:4b97770]
- File:
-
- 1 edited
-
src/ResolvExpr/CurrentObject.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CurrentObject.cc
r84e8423 r4b97770 62 62 virtual ~MemberIterator() {} 63 63 64 /// walks the current object using the given designators as a guide65 64 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 object68 65 virtual std::list<InitAlternative> operator*() const = 0; 69 70 /// true if the iterator is not currently at the end71 66 virtual operator bool() const = 0; 72 73 /// moves the iterator by one member in the current object74 67 virtual MemberIterator & bigStep() = 0; 75 76 /// moves the iterator by one member in the current subobject77 68 virtual MemberIterator & smallStep() = 0; 78 79 /// the type of the current object80 69 virtual Type * getType() = 0; 81 82 /// the type of the current subobject83 70 virtual Type * getNext() = 0; 84 71 85 /// printing for debug86 72 virtual void print( std::ostream & out, Indenter indent ) const = 0; 87 73 88 /// helper for operator*; aggregates must add designator to each init alternative, but89 /// adding designators in operator* creates duplicates.90 74 virtual std::list<InitAlternative> first() const = 0; // should be protected 91 75 }; … … 370 354 } 371 355 } 372 if ( atbegin ) { 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 373 358 // xxx - what about case of empty struct?? 374 359 // only add self if at the very beginning of the structure … … 404 389 return *this; 405 390 } 391 virtual std::list<InitAlternative> first() const { return std::list<InitAlternative>{}; } 406 392 }; 407 393 … … 457 443 return new UnionIterator( uit ); 458 444 } else { 459 assertf( dynamic_cast< EnumInstType * >( type ) || dynamic_cast< TypeInstType * >( type ), "Encountered unhandled ReferenceToType in createMemberIterator: %s", toString( type ).c_str());445 assertf( dynamic_cast< TypeInstType * >( type ), "some other reftotype" ); 460 446 return new SimpleIterator( type ); 461 447 }
Note:
See TracChangeset
for help on using the changeset viewer.