@Override
	protected boolean hasBeenDeleted(DBRecord rec) {
		// Records do not apply to data components which
		// are derived from parent data type
		if (parent.hasBeenDeleted(null)) {
			return true;
		}
		DataType pdt = parent.getBaseDataType();
		if (pdt instanceof Composite) {
			Composite composite = (Composite) pdt;
			// if we are deleted, the parent may not have as many components as it used to,
			// so if our index is bigger than the number of components, then we are deleted.
			if (indexInParent >= composite.getNumComponents()) {
				return true;
			}
			DataTypeComponent c = composite.getComponent(indexInParent);
			component = c;
			dataType = c.getDataType();
			offset = component.getOffset();
			length = component.getLength();
			if (length == 0) {
				length = 1; // zero-length components must be forced to have a length of 1
			}
		}
		else if (pdt instanceof Array) {
			Array a = (Array) pdt;
			if (indexInParent >= a.getNumElements()) {
				return true;
			}
			component = null;
			dataType = ((Array) pdt).getDataType();
			length = a.getElementLength();
			offset = length * indexInParent;
		}
		else {
			return true;
		}
		address = parent.getAddress().add(offset);
		addr = parent.addr + offset;
		baseDataType = getBaseDataType(dataType);
		bytes = null;
		return false;
	}
Constructs a new {@link DataComponent} for an {@link Array} element.
@param codeMgr the code manager.
@param componentCache data component cache
@param address the address of the data component
@param addr the convert address long value
@param parent the DataDB object that contains this component.
@param array the array containing this component.
@param ordinal the array index for this component.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/DataComponent.java