Package ghidra.pcode.exec

# Class AbstractLongOffsetPcodeExecutorStatePiece.CacheingSpaceMap<B,S>

java.lang.Object
ghidra.pcode.exec.AbstractLongOffsetPcodeExecutorStatePiece.AbstractSpaceMap<S>
ghidra.pcode.exec.AbstractLongOffsetPcodeExecutorStatePiece.CacheingSpaceMap<B,S>

Type Parameters:
  `B` - the type of the object backing the cache for each address space
  `S` - the type of cache for each address space

Enclosing class:
  AbstractLongOffsetPcodeExecutorStatePiece<A,T,S>

public abstract static class AbstractLongOffsetPcodeExecutorStatePiece.CacheingSpaceMap<B,S> extends AbstractLongOffsetPcodeExecutorStatePiece.AbstractSpaceMap<S>
Use this when each S is possibly a cache to some other state (backing) object

- ## Field Summary

  ### Fields inherited from class ghidra.pcode.exec.AbstractLongOffsetPcodeExecutorStatePiece.AbstractSpaceMap

  `spaces`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  ``
  `CacheingSpaceMap()`
  `protected`
  `CacheingSpaceMap(Map<AddressSpace,S> spaces)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected abstract B`
  `getBacking(AddressSpace space)`
  Get the object backing the cache for the given address space
  `S`
  `getForSpace(AddressSpace space, boolean toWrite)`
  `protected abstract S`
  `newSpace(AddressSpace space, B backing)`
  Construct a new space internally associated with the given address space, having the given backing

  ### Methods inherited from class ghidra.pcode.exec.AbstractLongOffsetPcodeExecutorStatePiece.AbstractSpaceMap

  `fork, fork, fork, values`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### CacheingSpaceMap

    public CacheingSpaceMap()

  - ### CacheingSpaceMap

    protected CacheingSpaceMap(Map<AddressSpace,S> spaces)

- ## Method Details

  - ### getBacking

    protected abstract B getBacking(AddressSpace space)
    Get the object backing the cache for the given address space
    Parameters:
      `space` - the space
    Returns:
      the backing object

  - ### newSpace

    protected abstract S newSpace(AddressSpace space, B backing)
    Construct a new space internally associated with the given address space, having the given backing

    As the name implies, this often simply wraps `S`'s constructor

    Parameters:
      `space` - the address space
      `backing` - the backing, if applicable. null for the unique space
    Returns:
      the new space

  - ### getForSpace

    public S getForSpace(AddressSpace space, boolean toWrite)
    Specified by:
      `getForSpace` in class `AbstractLongOffsetPcodeExecutorStatePiece.AbstractSpaceMap<S>`