Class AbstractDBTracePropertyMap.DBTracePropertyMapSpace
- All Implemented Interfaces:
DBTraceSpaceBased,TraceAddressSnapRangePropertyMapOperations<T>,TraceAddressSnapRangePropertyMapSpace<T>,TracePropertyMapOperations<T>,TracePropertyMapSpace<T>,TraceSpaceMixin,SpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
- Enclosing class:
AbstractDBTracePropertyMap<T,DR extends DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData<T>>
-
Nested Class Summary
Nested classes/interfaces inherited from interface ghidra.util.database.spatial.SpatialMap
SpatialMap.EmptySpatialMap<DS extends BoundedShape<?>,T, Q> -
Field Summary
Fields inherited from class ghidra.trace.database.map.DBTraceAddressSnapRangePropertyMapSpace
fullSpace, lock, map, space, trace, treeFields inherited from interface ghidra.util.database.spatial.SpatialMap
EMPTY_MAP -
Constructor Summary
ConstructorsConstructorDescriptionDBTracePropertyMapSpace(String tableName, DBTrace trace, DBCachedObjectStoreFactory storeFactory, ReadWriteLock lock, AddressSpace space, Class<DR> dataType, DBTraceAddressSnapRangePropertyMap.DBTraceAddressSnapRangePropertyMapDataFactory<T, DR> dataFactory) -
Method Summary
Modifier and TypeMethodDescriptionbooleanclear(Lifespan span, AddressRange range) Remove or truncate entries so that the given box contains no entriesGet the value at the given address-snap pairgetEntries(Lifespan lifespan, AddressRange range) Get the entries intersecting the given boundsGet the entry at the given address-snap pairgetTrace()Get the trace containing the objectGet the class for values of the mapprotected voidprotected voidmakeWay(Map.Entry<TraceAddressSnapRange, T> entry, Lifespan span) put(TraceAddressSnapRange shape, T value) Put an entry into the mapvoidset(Lifespan lifespan, AddressRange range, T value) Set a value over the given rangesvoidSet a value at the given address over the given lifespanMethods inherited from class ghidra.trace.database.map.DBTraceAddressSnapRangePropertyMapSpace
checkIntegrity, clear, deleteData, deleteValue, entries, firstEntry, firstKey, firstValue, getAddressSetView, getAddressSetView, getAddressSpace, getDataByKey, getUserIndex, invalidateCache, isEmpty, keys, orderedEntries, orderedKeys, orderedValues, reduce, remove, remove, size, valuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.trace.database.space.DBTraceSpaceBased
assertInSpace, assertInSpace, explainLanguages, isMySpace, toAddress, toOverlayMethods inherited from interface ghidra.trace.model.map.TraceAddressSnapRangePropertyMapOperations
put, put, put, putMethods inherited from interface ghidra.trace.model.property.TracePropertyMapOperations
getAddressSetViewMethods inherited from interface ghidra.trace.model.property.TracePropertyMapSpace
clear, getAddressSpace, getEntries, getEntries, set, setMethods inherited from interface ghidra.trace.util.TraceSpaceMixin
getFrameLevel, getThread
-
Constructor Details
-
DBTracePropertyMapSpace
public DBTracePropertyMapSpace(String tableName, DBTrace trace, DBCachedObjectStoreFactory storeFactory, ReadWriteLock lock, AddressSpace space, Class<DR> dataType, DBTraceAddressSnapRangePropertyMap.DBTraceAddressSnapRangePropertyMapDataFactory<T, DR> dataFactory) throws VersionException, IOException- Throws:
VersionExceptionIOException
-
-
Method Details
-
getTrace
Description copied from interface:TraceSpaceMixinGet the trace containing the object- Specified by:
getTracein interfaceTracePropertyMapSpace<T>- Specified by:
getTracein interfaceTraceSpaceMixin- Overrides:
getTracein classDBTraceAddressSnapRangePropertyMapSpace<T,DR extends DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData<T>> - Returns:
- the trace
-
getValueClass
Description copied from interface:TracePropertyMapOperationsGet the class for values of the map- Specified by:
getValueClassin interfaceTracePropertyMapOperations<T>- Returns:
- the value class
-
makeWay
-
makeWay
-
set
Description copied from interface:TracePropertyMapOperationsSet a value at the given address over the given lifespan- Specified by:
setin interfaceTracePropertyMapOperations<T>- Parameters:
lifespan- the lifespanaddress- the addressvalue- the value- See Also:
-
set
Description copied from interface:TracePropertyMapOperationsSet a value over the given rangesSetting a value of null still creates an entry, so that Void-typed maps function.
When setting an overlapping value, existing entries are deleted or truncated to make space for the new entry. If an existing entry overlaps and its starting snap is contained in the new entry's span, the existing entry is deleted, regardless of whether or not its ending snap is also contained in the new entry's span. If the starting snap of the existing entry precedes the span of the new entry, the existing entry is truncated -- its ending snap is set to one less than the new entry's starting snap. Address ranges are never truncated.
- Specified by:
setin interfaceTracePropertyMapOperations<T>- Parameters:
lifespan- the lifespanrange- the address rangevalue- the value
-
get
Description copied from interface:TracePropertyMapOperationsGet the value at the given address-snap pair- Specified by:
getin interfaceTracePropertyMapOperations<T>- Parameters:
snap- the snapaddress- the address- Returns:
- the value
-
getEntry
Description copied from interface:TracePropertyMapOperationsGet the entry at the given address-snap pair- Specified by:
getEntryin interfaceTracePropertyMapOperations<T>- Parameters:
snap- the snapaddress- the address- Returns:
- the entry, which includes the ranges and the value
-
getEntries
public Collection<Map.Entry<TraceAddressSnapRange,T>> getEntries(Lifespan lifespan, AddressRange range) Description copied from interface:TracePropertyMapOperationsGet the entries intersecting the given bounds- Specified by:
getEntriesin interfaceTracePropertyMapOperations<T>- Parameters:
lifespan- the range of snapsrange- the range of addresses- Returns:
- the entries
-
clear
Description copied from interface:TracePropertyMapOperationsRemove or truncate entries so that the given box contains no entriesThis applies the same truncation rule as in
TracePropertyMapOperations.set(Lifespan, AddressRange, Object), except that no replacement entry is created.- Specified by:
clearin interfaceTracePropertyMapOperations<T>- Parameters:
span- the range of snapsrange- the address range- Returns:
- true if any entry was affected
-
put
Description copied from interface:SpatialMapPut an entry into the mapNote that the map may copy, and possibly modify, the given value. The value returned is the value actually stored by the map. This may be useful when the map's values are identical to its records. This allows the creation of a "blank" entry with a given shape. The entry is then populated by the user.
class MyDBDataRecord extends DBTreeDataRecord<MyShape, MyNodeShape, MyDBDataRecord> { @Override protected void setValue(MyDBDataRecord value) { // Do nothing: value ought to be null. Map will create and return "blank" record } protected MyDBDataRecord getValue() { return this; // The record is the value } } MyDBDataRecord rec = map.put(MyShape.create(args), null); rec.setSomething(6); rec.setAnother("My user data");This practice is preferred when the values are not simple, and/or when the shape is a property of the value. In other cases, e.g., when the value is an enum or a
Color, thenDBTreeDataRecord.setRecordValue(Object)andDBTreeDataRecord.getRecordValue()should be implemented as field accessors.- Specified by:
putin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery> - Overrides:
putin classDBTraceAddressSnapRangePropertyMapSpace<T,DR extends DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData<T>> - Parameters:
shape- the shape of the entryvalue- the value for the entry- Returns:
- the value as stored in the map
-