Class VoidDataType

  • All Implemented Interfaces:
    BuiltInDataType, DataType, ExtensionPoint, java.util.EventListener, javax.swing.event.ChangeListener

    public class VoidDataType
    extends BuiltIn
    Special dataType used only for function return types. Used to indicate that a function has no return value.
    • Field Detail

      • dataType

        public static VoidDataType dataType
        A statically defined DefaultDataType used when an Undefined byte is needed.
    • Constructor Detail

      • VoidDataType

        public VoidDataType()
    • Method Detail

      • getLength

        public int getLength()
        Description copied from interface: DataType
        Get the length (number of 8-bit bytes) of this DataType.
        the length of this DataType
        See Also:
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: DataType
        Get a String briefly describing this DataType.
        a one-liner describing this DataType.
        See Also:
      • getRepresentation

        public java.lang.String getRepresentation​(MemBuffer buf,
                                                  Settings settings,
                                                  int length)
        Description copied from interface: DataType
        Get bytes from memory in a printable format for this type.
        buf - the data.
        settings - the settings to use for the representation.
        length - the number of bytes to represent.
        the representation of the data in this format, never null.
        See Also:
        DataType.getRepresentation(MemBuffer, Settings, int)
      • getValue

        public java.lang.Object getValue​(MemBuffer buf,
                                         Settings settings,
                                         int length)
        Description copied from interface: DataType
        Get the data in the form of the appropriate Object for this DataType. For instance if the data type is an AddressDT, return an Address object. a Byte, return a Scalar* (maybe this should be a Byte) a Float, return a Float
        buf - the data buffer.
        settings - the settings to use.
        length - the number of bytes to get the value from.
        the data Object.
        See Also:
        DataType.getValue(ghidra.program.model.mem.MemBuffer, ghidra.docking.settings.Settings, int)
      • clone

        public DataType clone​(DataTypeManager dtm)
        Description copied from interface: DataType
        Returns a new instance of this DataType with its universalID and SourceArchive identity retained. Note: for built-in DataType's, clone and copy should have the same affect.
        dtm - the data-type manager instance whose data-organization should apply.
      • getCTypeDeclaration

        public java.lang.String getCTypeDeclaration​(DataOrganization dataOrganization)
        Description copied from class: BuiltIn
        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
        getCTypeDeclaration in class BuiltIn
        dataOrganization - or null for default
        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: