Skip to main content

LayoutEdit

Trait LayoutEdit 

Source
pub trait LayoutEdit: LayoutBase + HierarchyEdit {
    // Required methods
    fn create_layer(&mut self, index: UInt, datatype: UInt) -> Self::LayerId;
    fn create_layer_with_id(
        &mut self,
        layer_id: Self::LayerId,
        index: UInt,
        datatype: UInt,
    ) -> Result<(), ()>;
    fn set_layer_name(
        &mut self,
        layer: &Self::LayerId,
        name: Option<Self::NameType>,
    ) -> Option<Self::NameType>;
    fn insert_shape(
        &mut self,
        parent_cell: &Self::CellId,
        layer: &Self::LayerId,
        geometry: Geometry<Self::Coord>,
    ) -> Self::ShapeId;
    fn remove_shape(
        &mut self,
        shape_id: &Self::ShapeId,
    ) -> Option<Geometry<Self::Coord>>;
    fn replace_shape(
        &mut self,
        shape_id: &Self::ShapeId,
        geometry: Geometry<Self::Coord>,
    ) -> Geometry<Self::Coord>;
    fn set_transform(
        &mut self,
        cell_inst: &Self::CellInstId,
        tf: SimpleTransform<Self::Coord>,
    );

    // Provided methods
    fn set_dbu(&mut self, dbu: Self::Coord) { ... }
    fn set_shape_property(
        &mut self,
        shape: &Self::ShapeId,
        key: Self::NameType,
        value: PropertyValue,
    ) { ... }
}
Expand description

Trait for layouts that support editing.

Required Methods§

Source

fn create_layer(&mut self, index: UInt, datatype: UInt) -> Self::LayerId

Create a new layer. Use set_layer_name() to define a name.

Source

fn create_layer_with_id( &mut self, layer_id: Self::LayerId, index: UInt, datatype: UInt, ) -> Result<(), ()>

Create a new layer with a specific ID. This is used to clone layer-stacks between layouts while preserving their IDs. Returns an Err when the ID already exists.

Source

fn set_layer_name( &mut self, layer: &Self::LayerId, name: Option<Self::NameType>, ) -> Option<Self::NameType>

Set the name of a layer or clear the layer name when passing None. This method should not change the ID of the layer. Returns the previous name of the layer.

Source

fn insert_shape( &mut self, parent_cell: &Self::CellId, layer: &Self::LayerId, geometry: Geometry<Self::Coord>, ) -> Self::ShapeId

Insert a geometric shape into the parent cell.

Source

fn remove_shape( &mut self, shape_id: &Self::ShapeId, ) -> Option<Geometry<Self::Coord>>

Remove shape from the parent cell.

Source

fn replace_shape( &mut self, shape_id: &Self::ShapeId, geometry: Geometry<Self::Coord>, ) -> Geometry<Self::Coord>

Replace the geometry of a shape.

Source

fn set_transform( &mut self, cell_inst: &Self::CellInstId, tf: SimpleTransform<Self::Coord>, )

Set the geometric transform that describes the location of a cell instance relative to its parent.

Provided Methods§

Source

fn set_dbu(&mut self, dbu: Self::Coord)

Set the distance unit used in this layout in ‘pixels per micron’.

Source

fn set_shape_property( &mut self, shape: &Self::ShapeId, key: Self::NameType, value: PropertyValue, )

Set a property of a shape.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> LayoutEdit for &mut T
where T: LayoutEdit,

Source§

fn set_layer_name( &mut self, layer: &Self::LayerId, name: Option<Self::NameType>, ) -> Option<Self::NameType>

Source§

fn replace_shape( &mut self, shape_id: &Self::ShapeId, geometry: Geometry<Self::Coord>, ) -> Geometry<Self::Coord>

Source§

fn set_transform( &mut self, cell_inst: &Self::CellInstId, tf: SimpleTransform<Self::Coord>, )

Source§

fn set_shape_property( &mut self, shape: &Self::ShapeId, key: Self::NameType, value: PropertyValue, )

Source§

fn create_layer_with_id( &mut self, layer_id: Self::LayerId, index: UInt, datatype: UInt, ) -> Result<(), ()>

Source§

fn remove_shape( &mut self, shape_id: &Self::ShapeId, ) -> Option<Geometry<Self::Coord>>

Source§

fn insert_shape( &mut self, parent_cell: &Self::CellId, layer: &Self::LayerId, geometry: Geometry<Self::Coord>, ) -> Self::ShapeId

Source§

fn create_layer(&mut self, index: UInt, datatype: UInt) -> Self::LayerId

Source§

fn set_dbu(&mut self, dbu: Self::Coord)

Source§

impl<T> LayoutEdit for Box<T>
where T: LayoutEdit,

Source§

fn create_layer_with_id( &mut self, layer_id: Self::LayerId, index: UInt, datatype: UInt, ) -> Result<(), ()>

Source§

fn set_shape_property( &mut self, shape: &Self::ShapeId, key: Self::NameType, value: PropertyValue, )

Source§

fn replace_shape( &mut self, shape_id: &Self::ShapeId, geometry: Geometry<Self::Coord>, ) -> Geometry<Self::Coord>

Source§

fn set_layer_name( &mut self, layer: &Self::LayerId, name: Option<Self::NameType>, ) -> Option<Self::NameType>

Source§

fn remove_shape( &mut self, shape_id: &Self::ShapeId, ) -> Option<Geometry<Self::Coord>>

Source§

fn create_layer(&mut self, index: UInt, datatype: UInt) -> Self::LayerId

Source§

fn insert_shape( &mut self, parent_cell: &Self::CellId, layer: &Self::LayerId, geometry: Geometry<Self::Coord>, ) -> Self::ShapeId

Source§

fn set_dbu(&mut self, dbu: Self::Coord)

Source§

fn set_transform( &mut self, cell_inst: &Self::CellInstId, tf: SimpleTransform<Self::Coord>, )

Implementors§

Source§

impl LayoutEdit for Chip<Coord>

Source§

impl<'a, T, U> LayoutEdit for Undo<'a, T, U>
where T: LayoutEdit + 'static, U: From<LayoutUndoOp<T>> + From<HierarchyUndoOp<T>>,

Source§

impl<L: LayoutEdit> LayoutEdit for DBPerf<L>

Source§

impl<L> LayoutEdit for RegionSearchAdapter<L>
where L: LayoutEdit, L::Coord: PrimInt + Signed + Debug,