Class DBTraceAddressSnapRangePropertyMapSpace<T,DR extends DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData<T>>
- All Implemented Interfaces:
DBTraceSpaceBased,TraceAddressSnapRangePropertyMapOperations<T>,TraceAddressSnapRangePropertyMapSpace<T>,TraceSpaceMixin,SpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
- Direct Known Subclasses:
AbstractDBTracePropertyMap.DBTracePropertyMapSpace,DBTraceDataSettingsAdapter.DBTraceDataSettingsSpace
-
Nested Class Summary
Nested classes/interfaces inherited from interface ghidra.util.database.spatial.SpatialMap
SpatialMap.EmptySpatialMap<DS extends BoundedShape<?>,T, Q> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AddressRangeImplprotected final ReadWriteLockprotected final AbstractConstraintsTreeSpatialMap<TraceAddressSnapRange, DR, TraceAddressSnapRange, T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery> protected final AddressSpaceprotected final DBTraceprotected final DBTraceAddressSnapRangePropertyMapTree<T, DR> Fields inherited from interface ghidra.util.database.spatial.SpatialMap
EMPTY_MAP -
Constructor Summary
ConstructorsConstructorDescriptionDBTraceAddressSnapRangePropertyMapSpace(String tableName, DBTrace trace, DBCachedObjectStoreFactory storeFactory, ReadWriteLock lock, AddressSpace space, Class<DR> dataType, DBTraceAddressSnapRangePropertyMap.DBTraceAddressSnapRangePropertyMapDataFactory<T, DR> dataFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidFor developers and testers.voidclear()voiddeleteData(DR data) voiddeleteValue(T value) For maps where values are the entries, remove a valueentries()firstKey()getAddressSetView(Lifespan span) getAddressSetView(Lifespan span, Predicate<T> predicate) Get the object's address spacegetDataByKey(long key) getTrace()Get the trace containing the object<K> DBCachedObjectIndex<K, DR> getUserIndex(Class<K> fieldClass, DBObjectColumn column) voidbooleanisEmpty()keys()put(TraceAddressSnapRange shape, T value) Put an entry into the mapSpatialMap<TraceAddressSnapRange, T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery> booleanremove(TraceAddressSnapRange shape, T value) Remove an entry from the mapbooleanremove(Map.Entry<TraceAddressSnapRange, T> entry) Remove an entry from the mapintsize()Get or compute the size of this mapvalues()Methods 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.util.TraceSpaceMixin
getFrameLevel, getThread
-
Field Details
-
trace
-
space
-
lock
-
tree
protected final DBTraceAddressSnapRangePropertyMapTree<T,DR extends DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData<T>> tree -
map
-
fullSpace
-
-
Constructor Details
-
DBTraceAddressSnapRangePropertyMapSpace
public DBTraceAddressSnapRangePropertyMapSpace(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 interfaceTraceSpaceMixin- Returns:
- the trace
-
getAddressSpace
Description copied from interface:TraceSpaceMixinGet the object's address space- Specified by:
getAddressSpacein interfaceTraceAddressSnapRangePropertyMapSpace<T>- Specified by:
getAddressSpacein interfaceTraceSpaceMixin- Returns:
- the address space
-
getUserIndex
-
deleteValue
Description copied from interface:TraceAddressSnapRangePropertyMapOperationsFor maps where values are the entries, remove a value- Specified by:
deleteValuein interfaceTraceAddressSnapRangePropertyMapOperations<T>- Parameters:
value- the entry to remove
-
deleteData
-
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> - Parameters:
shape- the shape of the entryvalue- the value for the entry- Returns:
- the value as stored in the map
-
remove
Description copied from interface:SpatialMapRemove an entry from the mapRemoves a single matching entry, if found, from the map. If you have a reference to an entry obtained from this map, use
SpatialMap.remove(Entry)instead. Otherwise, this is the preferred method.- Specified by:
removein interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery> - Parameters:
shape- the shape of the entry to removevalue- the value of the entry to remove- Returns:
- true if the map was modified
-
remove
Description copied from interface:SpatialMapRemove an entry from the mapThis method is preferred only when the given entry comes directly from this map. This spares the implementation from having to search for a matching entry. If the entry does not come from this map, it will behave like
SpatialMap.remove(BoundedShape, Object).- Specified by:
removein interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery> - Parameters:
entry- the entry to remove- Returns:
- true if the map was modified
-
size
public int size()Description copied from interface:SpatialMapGet or compute the size of this mapNote that this may not necessarily be a quick operation, esp., if this map is the result of
SpatialMap.reduce(Object). In the worst case, all elements in the reduced map will be visited.- Specified by:
sizein interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery> - Returns:
- the number of data entries in the map
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
entries
- Specified by:
entriesin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
orderedEntries
- Specified by:
orderedEntriesin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
keys
- Specified by:
keysin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
orderedKeys
- Specified by:
orderedKeysin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
values
- Specified by:
valuesin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
orderedValues
- Specified by:
orderedValuesin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
reduce
public SpatialMap<TraceAddressSnapRange,T, reduceDBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery> (DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery query) - Specified by:
reducein interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
firstEntry
- Specified by:
firstEntryin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
firstKey
- Specified by:
firstKeyin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
firstValue
- Specified by:
firstValuein interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
clear
public void clear()- Specified by:
clearin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
-
invalidateCache
public void invalidateCache()- Specified by:
invalidateCachein interfaceDBTraceSpaceBased
-
getAddressSetView
- Specified by:
getAddressSetViewin interfaceTraceAddressSnapRangePropertyMapOperations<T>
-
getAddressSetView
- Specified by:
getAddressSetViewin interfaceTraceAddressSnapRangePropertyMapOperations<T>
-
getDataByKey
-
checkIntegrity
public void checkIntegrity()For developers and testers.
-