Class StandAloneDataTypeManager

java.lang.Object
ghidra.program.database.data.DataTypeManagerDB
ghidra.program.model.data.StandAloneDataTypeManager
All Implemented Interfaces:
DataTypeManager
Direct Known Subclasses:
BuiltInDataTypeManager, FileDataTypeManager

public class StandAloneDataTypeManager extends DataTypeManagerDB
Basic implementation of the DataTypeManger interface
  • Field Details

    • name

      protected String name
  • Constructor Details

    • StandAloneDataTypeManager

      public StandAloneDataTypeManager(String rootName)
      Constructor for new temporary data-type manager using the default DataOrganization. Note that this manager does not support the save or saveAs operation.
      Parameters:
      rootName - Name of the root category.
    • StandAloneDataTypeManager

      public StandAloneDataTypeManager(String rootName, DataOrganization dataOrganzation)
      Constructor for new temporary data-type manager using a specified DataOrganization. Note that this manager does not support the save or saveAs operation.
      Parameters:
      rootName - Name of the root category.
      dataOrganzation - applicable data organization
    • StandAloneDataTypeManager

      protected StandAloneDataTypeManager(ResourceFile packedDbfile, int openMode) throws IOException
      Constructor for a data-type manager backed by a packed database file. When opening for UPDATE an automatic upgrade will be performed if required.
      Parameters:
      packedDbfile - packed datatype archive file (i.e., *.gdt resource).
      openMode - open mode CREATE, READ_ONLY or UPDATE (see DBConstants)
      Throws:
      IOException - a low-level IO error. This exception may also be thrown when a version error occurs (cause is VersionException).
  • Method Details

    • getName

      public String getName()
      Description copied from interface: DataTypeManager
      Returns this data type manager's name
      Returns:
      the name
    • setName

      public void setName(String name) throws InvalidNameException
      Description copied from interface: DataTypeManager
      Sets this data type manager's name
      Parameters:
      name - the new name
      Throws:
      InvalidNameException - if the given name is invalid (such as when null or empty)
    • getDataOrganization

      public final DataOrganization getDataOrganization()
      Description copied from interface: DataTypeManager
      Get the data organization associated with this data type manager. Note that the DataOrganization settings may not be changed dynamically.
      Specified by:
      getDataOrganization in interface DataTypeManager
      Overrides:
      getDataOrganization in class DataTypeManagerDB
      Returns:
      data organization (will never be null)
    • startTransaction

      public int startTransaction(String description)
      Description copied from interface: DataTypeManager
      Starts a transaction for making changes in this data type manager.
      Parameters:
      description - a short description of the changes to be made.
      Returns:
      the transaction ID
    • flushEvents

      public void flushEvents()
      Description copied from interface: DataTypeManager
      Force all pending notification events to be flushed
    • endTransaction

      public void endTransaction(int transactionID, boolean commit)
      Description copied from interface: DataTypeManager
      Ends the current transaction
      Parameters:
      transactionID - id of the transaction to end
      commit - true if changes are committed, false if changes in transaction are revoked
    • replaceDataTypeIDs

      protected void replaceDataTypeIDs(long oldID, long newID)
      Specified by:
      replaceDataTypeIDs in class DataTypeManagerDB
    • deleteDataTypeIDs

      protected void deleteDataTypeIDs(LinkedList<Long> deletedIds, TaskMonitor monitor)
      Specified by:
      deleteDataTypeIDs in class DataTypeManagerDB
    • close

      public void close()
      Description copied from interface: DataTypeManager
      Closes this dataType manager
      Specified by:
      close in interface DataTypeManager
      Overrides:
      close in class DataTypeManagerDB
    • finalize

      public void finalize()
      Overrides:
      finalize in class Object
    • getDomainFileID

      protected String getDomainFileID()
      Specified by:
      getDomainFileID in class DataTypeManagerDB
    • getPath

      protected String getPath()
      Specified by:
      getPath in class DataTypeManagerDB
    • getType

      public ArchiveType getType()
      Description copied from interface: DataTypeManager
      Returns this manager's archive type
      Returns:
      the type