Class CreateDataBackgroundCmd

  • All Implemented Interfaces:
    Command

    public class CreateDataBackgroundCmd
    extends BackgroundCommand
    This command will create a data of type dataType throughout an addressSet. If there are any existing instructions in the area to be made into data, the command will fail. Any data in the area will be replaced with the new dataType, except when the existing data or the given dataType is a pointer. If the existing dataType is a pointer, then it will be changed into a pointer to the given dataType. If the given dataType is a pointer and the existing data is >= to the size of a pointer, it will become a pointer to the existing type. If the existing dataType is less than the size of a pointer, then a pointer to dataType will only be created if there are enough undefined bytes following to make a pointer.
    • Constructor Detail

      • CreateDataBackgroundCmd

        public CreateDataBackgroundCmd​(AddressSetView addrSet,
                                       DataType dataType)
        Constructs a command for applying a dataType to a set of addresses. Simple pointer conversion will NOT be performed.
        Parameters:
        addrSet - The address set to fill with the given dataType.
        dataType - the dataType to be applied to the address set.
    • Method Detail

      • applyTo

        public boolean applyTo​(DomainObject obj,
                               TaskMonitor monitor)
        Description copied from class: BackgroundCommand
        Method called when this command is to apply changes to the given domain object. A monitor is provided to display status information about the command as it executes in the background.
        Specified by:
        applyTo in class BackgroundCommand
        Parameters:
        obj - domain object that will be affected by the command
        monitor - monitor to show progress of the command
        Returns:
        true if the command applied successfully