Package ghidra.app.util.bin.format.som

# Class SomSpace

java.lang.Object
ghidra.app.util.bin.format.som.SomSpace

All Implemented Interfaces:
  `StructConverter`

public class SomSpace extends Object implements StructConverter
Represents a SOM `space_dictionary_record` structure

See Also:
  - The 32-bit PA-RISC Run-time Architecture Document

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `SIZE`
  The size in bytes of a `SomSpace`

  ### Fields inherited from interface ghidra.app.util.bin.StructConverter

  `ASCII, BYTE, DWORD, IBO32, IBO64, POINTER, QWORD, SLEB128, STRING, ULEB128, UTF16, UTF8, VOID, WORD`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SomSpace(BinaryReader reader, long spaceStringsLocation)`
  Creates a new `SomSpace`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `getInitPointerQuantity()`
  Returns the number of data (init) pointers.
  `int`
  `getInitPonterIndex()`
  Returns the index into data (init) pointer array.
  `int`
  `getLoaderFixIndex()`
  Returns the load fix index.
  `long`
  `getLoaderFixQuantity()`
  Returns the load fix quantity.
  `String`
  `getName()`
  Returns the space name.
  `int`
  `getReserved()`
  Returns the first reserved value.
  `int`
  `getReserved2()`
  Returns the second reserved value.
  `int`
  `getSortKey()`
  Returns the sort key for the space.
  `int`
  `getSpaceNumber()`
  Returns the space index.
  `int`
  `getSubspaceIndex()`
  Returns the index into the subspace dictionary.
  `long`
  `getSubspaceQuantity()`
  Returns the number of subspaces in the space.
  `boolean`
  `hasIntermediateCode()`
  Returns whether or not the space contains intermediate code.
  `boolean`
  `isDefined()`
  Returns whether or not the space is defined within the file.
  `boolean`
  `isLoadable()`
  Returns whether or not the space is loadable.
  `boolean`
  `isPrivate()`
  Returns whether or not the space is not sharable.
  `boolean`
  `isThreadSpecific()`
  Returns whether or not the space is thread specific.
  `DataType`
  `toDataType()`
  Returns a structure datatype representing the contents of the implementor of this interface.

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

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

- ## Field Details

  - ### SIZE

    public static final int SIZE
    The size in bytes of a `SomSpace`
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### SomSpace

    public SomSpace(BinaryReader reader, long spaceStringsLocation) throws IOException
    Creates a new `SomSpace`
    Parameters:
      `reader` - A `BinaryReader` positioned at the start of the record
      `spaceStringsLocation` - The starting index of the space strings
    Throws:
      `IOException` - if there was an IO-related error

- ## Method Details

  - ### getName

    public String getName()
    Returns the space name.
    Returns:
      the space name

  - ### isLoadable

    public boolean isLoadable()
    Returns whether or not the space is loadable.
    Returns:
      whether or not the space is loadable

  - ### isDefined

    public boolean isDefined()
    Returns whether or not the space is defined within the file.
    Returns:
      whether or not the space is defined within the file

  - ### isPrivate

    public boolean isPrivate()
    Returns whether or not the space is not sharable.
    Returns:
      whether or not the space is not sharable

  - ### hasIntermediateCode

    public boolean hasIntermediateCode()
    Returns whether or not the space contains intermediate code.
    Returns:
      whether or not the space contains intermediate code

  - ### isThreadSpecific

    public boolean isThreadSpecific()
    Returns whether or not the space is thread specific.
    Returns:
      whether or not the space is thread specific

  - ### getReserved

    public int getReserved()
    Returns the first reserved value.
    Returns:
      the first reserved value

  - ### getSortKey

    public int getSortKey()
    Returns the sort key for the space.
    Returns:
      the sort key for the space

  - ### getReserved2

    public int getReserved2()
    Returns the second reserved value.
    Returns:
      the second reserved value

  - ### getSpaceNumber

    public int getSpaceNumber()
    Returns the space index.
    Returns:
      the space index

  - ### getSubspaceIndex

    public int getSubspaceIndex()
    Returns the index into the subspace dictionary.
    Returns:
      the index into the subspace dictionary

  - ### getSubspaceQuantity

    public long getSubspaceQuantity()
    Returns the number of subspaces in the space.
    Returns:
      the number of subspaces in the space

  - ### getLoaderFixIndex

    public int getLoaderFixIndex()
    Returns the load fix index.
    Returns:
      the load fix index

  - ### getLoaderFixQuantity

    public long getLoaderFixQuantity()
    Returns the load fix quantity.
    Returns:
      the load fix quantity

  - ### getInitPonterIndex

    public int getInitPonterIndex()
    Returns the index into data (init) pointer array.
    Returns:
      the index into data (init) pointer array

  - ### getInitPointerQuantity

    public long getInitPointerQuantity()
    Returns the number of data (init) pointers.
    Returns:
      the number of data (init) pointers

  - ### toDataType

    public DataType toDataType() throws DuplicateNameException, IOException
    Description copied from interface: `StructConverter`
    Returns a structure datatype representing the contents of the implementor of this interface.

    For example, given:

         class A {
             int foo;
             double bar;
         }

    The return value should be a structure data type with two data type components; an INT and a DOUBLE. The structure should contain field names and, if possible, field comments.

    Specified by:
      `toDataType` in interface `StructConverter`
    Returns:
      returns a structure datatype representing the implementor of this interface
    Throws:
      `DuplicateNameException` - when a datatype of the same name already exists
      `IOException` - if an IO-related error occurs
    See Also:
      - `StructureDataType`