Package ghidra.program.database.map
Class AddressKeyRecordIterator
java.lang.Object
ghidra.program.database.map.AddressKeyRecordIterator
- All Implemented Interfaces:
RecordIterator
Returns a RecordIterator over records that are address keyed. Various constructors allow
the iterator to be restricted to an address range or address set and optionally to be
positioned at some starting address.
-
Constructor Summary
ConstructorDescriptionAddressKeyRecordIterator
(Table table, AddressMap addrMap) Construcs a new AddressKeyRecordIterator that iterates over all records in ascending order.AddressKeyRecordIterator
(Table table, AddressMap addrMap, Address startAddr, boolean before) Construcs a new AddressKeyRecordIterator that iterates over records starting at given start address.AddressKeyRecordIterator
(Table table, AddressMap addrMap, Address minAddr, Address maxAddr, Address startAddr, boolean before) Constructs a new AddressKeyRecordIterator that iterates over records that are within an address range with an optional start address within that range.AddressKeyRecordIterator
(Table table, AddressMap addrMap, AddressSetView set, Address startAddr, boolean before) Construcs a new AddressKeyRecordIterator that iterates over records that are contained in an address set with an optional start address within that set. -
Method Summary
Modifier and TypeMethodDescriptionboolean
delete()
Delete the last Record read via the next or previous methods.boolean
hasNext()
Return true if a Record is available in the forward direction.boolean
Return true if a Record is available in the reverse directioniterator()
next()
Return the nexy Record or null if one is not available.previous()
Return the previous Record or null if one is not available.
-
Constructor Details
-
AddressKeyRecordIterator
Construcs a new AddressKeyRecordIterator that iterates over all records in ascending order. Memory addresses encoded as Absolute are not included.- Parameters:
table
- the table to iterate.addrMap
- the address map- Throws:
IOException
- if a database io error occurs.
-
AddressKeyRecordIterator
public AddressKeyRecordIterator(Table table, AddressMap addrMap, Address startAddr, boolean before) throws IOException Construcs a new AddressKeyRecordIterator that iterates over records starting at given start address. Memory addresses encoded as Absolute are not included.- Parameters:
table
- the table to iterate.addrMap
- the address mapstartAddr
- the address at which to position the iterator. The iterator will be positioned either before or after the start address depending on the before parameter.before
- if true, the iterator will be positioned before the start address, otherwise it will be positioned after the start address.- Throws:
IOException
- if a database io error occurs.
-
AddressKeyRecordIterator
public AddressKeyRecordIterator(Table table, AddressMap addrMap, Address minAddr, Address maxAddr, Address startAddr, boolean before) throws IOException Constructs a new AddressKeyRecordIterator that iterates over records that are within an address range with an optional start address within that range. Memory addresses encoded as Absolute are not included.- Parameters:
table
- the table to iterate.addrMap
- the address mapminAddr
- the minimum address in the range.maxAddr
- tha maximum address in the range.startAddr
- the address at which to position the iterator. The iterator will be positioned either before or after the start address depending on the before parameter. If this parameter is null, then the iterator will start either before the min address or after the max address depending on the before parameter.before
- if true, the iterator will be positioned before the start address, otherwise it will be positioned after the start address. If the start address is null, then if the before parameter is true, the iterator is positioned before the min. Otherwise the iterator is positioned after the max address.- Throws:
IOException
- if a database io error occurs.
-
AddressKeyRecordIterator
public AddressKeyRecordIterator(Table table, AddressMap addrMap, AddressSetView set, Address startAddr, boolean before) throws IOException Construcs a new AddressKeyRecordIterator that iterates over records that are contained in an address set with an optional start address within that set. Memory addresses encoded as Absolute are not included.- Parameters:
table
- the table to iterate.addrMap
- the address mapset
- the address set to iterate over.startAddr
- the address at which to position the iterator. The iterator will be positioned either before or after the start address depending on the before parameter. If this parameter is null, then the iterator will start either before the min address or after the max address depending on the before parameter.before
- if true, the iterator will be positioned before the start address, otherwise it will be positioned after the start address. If the start address is null, then if the before parameter is true, the iterator is positioned before the min. Otherwise the iterator is postioned after the max address.- Throws:
IOException
- if a database io error occurs.
-
-
Method Details
-
hasNext
Description copied from interface:RecordIterator
Return true if a Record is available in the forward direction.- Specified by:
hasNext
in interfaceRecordIterator
- Throws:
IOException
- thrown if an IO error occurs- See Also:
-
hasPrevious
Description copied from interface:RecordIterator
Return true if a Record is available in the reverse direction- Specified by:
hasPrevious
in interfaceRecordIterator
- Throws:
IOException
- thrown if an IO error occurs- See Also:
-
next
Description copied from interface:RecordIterator
Return the nexy Record or null if one is not available.- Specified by:
next
in interfaceRecordIterator
- Throws:
IOException
- thrown if an IO error occurs- See Also:
-
previous
Description copied from interface:RecordIterator
Return the previous Record or null if one is not available.- Specified by:
previous
in interfaceRecordIterator
- Throws:
IOException
- thrown if an IO error occurs- See Also:
-
delete
Description copied from interface:RecordIterator
Delete the last Record read via the next or previous methods.- Specified by:
delete
in interfaceRecordIterator
- Returns:
- true if record was successfully deleted.
- Throws:
IOException
- thrown if an IO error occurs.- See Also:
-
iterator
-