Trait libreda_oasis::LayoutEdit

source ·
pub trait LayoutEdit: LayoutBase + HierarchyEdit {
    // Required methods
    fn create_layer(&mut self, index: u32, datatype: u32) -> Self::LayerId;
    fn create_layer_with_id(
        &mut self,
        layer_id: Self::LayerId,
        index: u32,
        datatype: u32,
    ) -> 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: u32, datatype: u32) -> 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: u32, datatype: u32, ) -> 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.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

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

source§

fn set_dbu(&mut self, dbu: <&mut T as LayoutIds>::Coord)

source§

fn create_layer( &mut self, index: u32, datatype: u32, ) -> <&mut T as LayoutIds>::LayerId

source§

fn set_layer_name( &mut self, layer: &<&mut T as LayoutIds>::LayerId, name: Option<<&mut T as HierarchyBase>::NameType>, ) -> Option<<&mut T as HierarchyBase>::NameType>

source§

fn set_transform( &mut self, cell_inst: &<&mut T as HierarchyIds>::CellInstId, tf: SimpleTransform<<&mut T as LayoutIds>::Coord>, )

source§

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

source§

fn set_shape_property( &mut self, shape: &<&mut T as LayoutIds>::ShapeId, key: <&mut T as HierarchyBase>::NameType, value: PropertyValue, )

source§

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

source§

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

source§

fn create_layer_with_id( &mut self, layer_id: <&mut T as LayoutIds>::LayerId, index: u32, datatype: u32, ) -> Result<(), ()>

source§

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

source§

fn set_transform( &mut self, cell_inst: &<Box<T> as HierarchyIds>::CellInstId, tf: SimpleTransform<<Box<T> as LayoutIds>::Coord>, )

source§

fn insert_shape( &mut self, parent_cell: &<Box<T> as HierarchyIds>::CellId, layer: &<Box<T> as LayoutIds>::LayerId, geometry: Geometry<<Box<T> as LayoutIds>::Coord>, ) -> <Box<T> as LayoutIds>::ShapeId

source§

fn create_layer_with_id( &mut self, layer_id: <Box<T> as LayoutIds>::LayerId, index: u32, datatype: u32, ) -> Result<(), ()>

source§

fn set_shape_property( &mut self, shape: &<Box<T> as LayoutIds>::ShapeId, key: <Box<T> as HierarchyBase>::NameType, value: PropertyValue, )

source§

fn create_layer( &mut self, index: u32, datatype: u32, ) -> <Box<T> as LayoutIds>::LayerId

source§

fn remove_shape( &mut self, shape_id: &<Box<T> as LayoutIds>::ShapeId, ) -> Option<Geometry<<Box<T> as LayoutIds>::Coord>>

source§

fn set_dbu(&mut self, dbu: <Box<T> as LayoutIds>::Coord)

source§

fn set_layer_name( &mut self, layer: &<Box<T> as LayoutIds>::LayerId, name: Option<<Box<T> as HierarchyBase>::NameType>, ) -> Option<<Box<T> as HierarchyBase>::NameType>

source§

fn replace_shape( &mut self, shape_id: &<Box<T> as LayoutIds>::ShapeId, geometry: Geometry<<Box<T> as LayoutIds>::Coord>, ) -> Geometry<<Box<T> as LayoutIds>::Coord>

Implementors§

source§

impl LayoutEdit for Chip

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 for DBPerf<L>
where L: LayoutEdit,

source§

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