Class BuiltIn

All Implemented Interfaces:
BuiltInDataType, DataType, ExtensionPoint
Direct Known Subclasses:
AbstractComplexDataType, AbstractFloatDataType, AbstractIntegerDataType, AbstractLeb128DataType, AbstractPointerTypedefBuiltIn, AbstractStringDataType, AIFFDataType, AlignmentDataType, AUDataType, BadDataType, DwarfEncodingModeDataType, DynamicDataType, FactoryStructureDataType, FileTimeDataType, GifDataType, GuidDataType, HTMLResourceDataType, JPEGDataType, MacintoshTimeStampDataType, MIDIDataType, PcRelative31AddressDataType, PngDataType, PointerDataType, SegmentedCodePointerDataType, ShiftedAddressDataType, Undefined, VoidDataType, WAVEDataType, WideChar16DataType, WideChar32DataType, WideCharDataType

public abstract class BuiltIn extends DataTypeImpl implements BuiltInDataType
NOTE: ALL DATATYPE CLASSES MUST END IN "DataType". If not, the ClassSearcher will not find them. Base class for built-in Datatypes. A built-in data type is searched for in the classpath and added automatically to the available data types in the data type manager. NOTE: Settings are immutable when a DataTypeManager has not been specified (i.e., null).
  • Constructor Details

  • Method Details

    • copy

      public final DataType copy(DataTypeManager dtm)
      Returns a clone of this built-in DataType
      Specified by:
      copy in interface DataType
      Parameters:
      dtm - the data-type manager instance whose data-organization should apply.
      Returns:
      new instanceof of this datatype
      See Also:
    • getSettingsDefinitions

      public final SettingsDefinition[] getSettingsDefinitions()
      Gets a list of all the settingsDefinitions used by this datatype.
      Specified by:
      getSettingsDefinitions in interface DataType
      Overrides:
      getSettingsDefinitions in class DataTypeImpl
      Returns:
      a list of the settingsDefinitions used by this datatype.
    • getBuiltInSettingsDefinitions

      protected SettingsDefinition[] getBuiltInSettingsDefinitions()
      Gets a list of all the settingsDefinitions used by this datatype.
      Returns:
      a list of the settingsDefinitions used by this datatype.
    • setDefaultSettings

      public void setDefaultSettings(Settings settings)
      Description copied from interface: BuiltInDataType
      Set the default settings for this data type.
      NOTE: This method is reserved for internal DB use.
      Specified by:
      setDefaultSettings in interface BuiltInDataType
      Parameters:
      settings - the settings to be used as this dataTypes default settings.
    • isEquivalent

      public boolean isEquivalent(DataType dt)
      Description copied from interface: DataType
      Check if the given datatype is equivalent to this datatype.

      The precise meaning of "equivalent" is datatype dependent.
      NOTE: if invoked by a DB object or manager it should be invoked on the DataTypeDB object passing the other datatype as the argument.

      Specified by:
      isEquivalent in interface DataType
      Parameters:
      dt - the datatype being tested for equivalence.
      Returns:
      true if the if the given datatype is equivalent to this datatype.
    • addParent

      public final void addParent(DataType dt)
      Description copied from interface: DataType
      Inform this data type that it has the given parent
      TODO: This method is reserved for internal DB use.
      Specified by:
      addParent in interface DataType
      Overrides:
      addParent in class DataTypeImpl
      Parameters:
      dt - parent data type
    • removeParent

      public final void removeParent(DataType dt)
      Description copied from interface: DataType
      Remove a parent datatype

      TODO: This method is reserved for internal DB use.

      Specified by:
      removeParent in interface DataType
      Overrides:
      removeParent in class DataTypeImpl
      Parameters:
      dt - parent datatype
    • getUniversalID

      public UniversalID getUniversalID()
      Description copied from interface: DataType
      Get the universal ID for this datatype.

      This value is intended to be a unique identifier across all programs and archives. The same ID indicates that two datatypes were originally the same one. Keep in mind names, categories, and component makeup may differ and have changed since there origin.

      Specified by:
      getUniversalID in interface DataType
      Overrides:
      getUniversalID in class DataTypeImpl
      Returns:
      datatype UniversalID
    • getLastChangeTime

      public long getLastChangeTime()
      Description copied from interface: DataType
      Get the timestamp corresponding to the last time this type was changed within its datatype manager
      Specified by:
      getLastChangeTime in interface DataType
      Overrides:
      getLastChangeTime in class DataTypeImpl
      Returns:
      timestamp of last change within datatype manager
    • getDecompilerDisplayName

      public String getDecompilerDisplayName(DecompilerLanguage language)
      Return token used to represent this type in decompiler/source-code output
      Parameters:
      language - is the language being displayed
      Returns:
      the name string
    • getCTypeDeclaration

      protected String getCTypeDeclaration(String typeName, String ctypeName, boolean useDefine)
    • getCTypeDeclaration

      protected String getCTypeDeclaration(String typeName, int typeLen, boolean signed, DataOrganization dataOrganization, boolean useDefine)
    • getCTypeDeclaration

      protected String getCTypeDeclaration(BuiltIn dt, boolean signed, DataOrganization dataOrganization, boolean useDefine)
    • getCTypeDeclaration

      public String getCTypeDeclaration(DataOrganization dataOrganization)
      Returns null for FactoryDataType (which should never be used) and Dynamic types which should generally be replaced by a primitive array (e.g., char[5]) or, a primitive pointer (e.g., char *). For other types an appropriately sized unsigned integer typedef is returned.
      Specified by:
      getCTypeDeclaration in interface BuiltInDataType
      Parameters:
      dataOrganization - or null for default
      Returns:
      definition C-statement (e.g., #define or typedef) or null if type name is a standard C-primitive name or if type is FactoryDataType or Dynamic.
      See Also: