Trait libreda_oasis::LayoutBase

source ·
pub trait LayoutBase: LayoutIds + HierarchyBase {
Show 16 methods // Required methods fn dbu(&self) -> Self::Coord; fn each_layer(&self) -> Box<dyn Iterator<Item = Self::LayerId> + '_>; fn layer_info(&self, layer: &Self::LayerId) -> LayerInfo<Self::NameType>; fn find_layer(&self, index: u32, datatype: u32) -> Option<Self::LayerId>; fn layer_by_name(&self, name: &str) -> Option<Self::LayerId>; fn bounding_box_per_layer( &self, cell: &Self::CellId, layer: &Self::LayerId ) -> Option<Rect<Self::Coord>>; fn each_shape_id( &self, cell: &Self::CellId, layer: &Self::LayerId ) -> Box<dyn Iterator<Item = Self::ShapeId> + '_>; fn for_each_shape<F>( &self, cell: &Self::CellId, layer: &Self::LayerId, f: F ) where F: FnMut(&Self::ShapeId, &Geometry<Self::Coord>); fn with_shape<F, R>(&self, shape_id: &Self::ShapeId, f: F) -> R where F: FnMut(&Self::LayerId, &Geometry<Self::Coord>) -> R; fn parent_of_shape( &self, shape_id: &Self::ShapeId ) -> (Self::CellId, Self::LayerId); fn get_transform( &self, cell_inst: &Self::CellInstId ) -> SimpleTransform<Self::Coord>; // Provided methods fn bounding_box(&self, cell: &Self::CellId) -> Option<Rect<Self::Coord>> { ... } fn shape_geometry(&self, shape_id: &Self::ShapeId) -> Geometry<Self::Coord> { ... } fn shape_layer(&self, shape_id: &Self::ShapeId) -> Self::LayerId { ... } fn for_each_shape_recursive<F>( &self, cell: &Self::CellId, layer: &Self::LayerId, f: F ) where F: FnMut(SimpleTransform<Self::Coord>, &Self::ShapeId, &Geometry<Self::Coord>) { ... } fn get_shape_property( &self, shape: &Self::ShapeId, key: &Self::NameType ) -> Option<PropertyValue> { ... }
}
Expand description

Most basic trait of a layout.

This traits specifies methods for accessing the components of a layout.

Required Methods§

source

fn dbu(&self) -> Self::Coord

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

source

fn each_layer(&self) -> Box<dyn Iterator<Item = Self::LayerId> + '_>

Iterate over all defined layers.

source

fn layer_info(&self, layer: &Self::LayerId) -> LayerInfo<Self::NameType>

Get the LayerInfo data structure for this layer.

source

fn find_layer(&self, index: u32, datatype: u32) -> Option<Self::LayerId>

Find layer index by the (index, data type) tuple.

source

fn layer_by_name(&self, name: &str) -> Option<Self::LayerId>

Find layer index by the name.

source

fn bounding_box_per_layer( &self, cell: &Self::CellId, layer: &Self::LayerId ) -> Option<Rect<Self::Coord>>

Compute the bounding box of the shapes on one layer. The bounding box also includes all child cell instances.

source

fn each_shape_id( &self, cell: &Self::CellId, layer: &Self::LayerId ) -> Box<dyn Iterator<Item = Self::ShapeId> + '_>

Iterate over the IDs of all shapes in the cell on a specific layer.

source

fn for_each_shape<F>(&self, cell: &Self::CellId, layer: &Self::LayerId, f: F)
where F: FnMut(&Self::ShapeId, &Geometry<Self::Coord>),

Call a function for each shape on this layer.

source

fn with_shape<F, R>(&self, shape_id: &Self::ShapeId, f: F) -> R
where F: FnMut(&Self::LayerId, &Geometry<Self::Coord>) -> R,

Access a shape by its ID.

source

fn parent_of_shape( &self, shape_id: &Self::ShapeId ) -> (Self::CellId, Self::LayerId)

Get the parent cell and the layer of a shape as a (cell, layer) tuple.

source

fn get_transform( &self, cell_inst: &Self::CellInstId ) -> SimpleTransform<Self::Coord>

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

Provided Methods§

source

fn bounding_box(&self, cell: &Self::CellId) -> Option<Rect<Self::Coord>>

Compute the bounding box of the cell over all layers. The bounding box is not defined if the cell is empty. In this case return None.

source

fn shape_geometry(&self, shape_id: &Self::ShapeId) -> Geometry<Self::Coord>

Get a clone of the shape geometry.

source

fn shape_layer(&self, shape_id: &Self::ShapeId) -> Self::LayerId

Get the layer of a shape.

source

fn for_each_shape_recursive<F>( &self, cell: &Self::CellId, layer: &Self::LayerId, f: F )
where F: FnMut(SimpleTransform<Self::Coord>, &Self::ShapeId, &Geometry<Self::Coord>),

Call a function f for each shape of this cell and its sub cells. Along to the geometric shape f also gets a transformation as argument. The transformation describes the actual position of the geometric shape relative to the cell.

source

fn get_shape_property( &self, shape: &Self::ShapeId, key: &Self::NameType ) -> Option<PropertyValue>

Get a property of a shape.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> LayoutBase for &T
where T: LayoutBase,

source§

fn for_each_shape_recursive<F>( &self, cell: &<&T as HierarchyIds>::CellId, layer: &<&T as LayoutIds>::LayerId, f: F )

source§

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

source§

fn layer_by_name(&self, name: &str) -> Option<<&T as LayoutIds>::LayerId>

source§

fn each_shape_id( &self, cell: &<&T as HierarchyIds>::CellId, layer: &<&T as LayoutIds>::LayerId ) -> Box<dyn Iterator<Item = <&T as LayoutIds>::ShapeId> + '_>

source§

fn each_layer( &self ) -> Box<dyn Iterator<Item = <&T as LayoutIds>::LayerId> + '_>

source§

fn layer_info( &self, layer: &<&T as LayoutIds>::LayerId ) -> LayerInfo<<&T as HierarchyBase>::NameType>

source§

fn parent_of_shape( &self, shape_id: &<&T as LayoutIds>::ShapeId ) -> (<&T as HierarchyIds>::CellId, <&T as LayoutIds>::LayerId)

source§

fn bounding_box_per_layer( &self, cell: &<&T as HierarchyIds>::CellId, layer: &<&T as LayoutIds>::LayerId ) -> Option<Rect<<&T as LayoutIds>::Coord>>

source§

fn dbu(&self) -> <&T as LayoutIds>::Coord

source§

fn bounding_box( &self, cell: &<&T as HierarchyIds>::CellId ) -> Option<Rect<<&T as LayoutIds>::Coord>>

source§

fn for_each_shape<F>( &self, cell: &<&T as HierarchyIds>::CellId, layer: &<&T as LayoutIds>::LayerId, f: F )
where F: FnMut(&<&T as LayoutIds>::ShapeId, &Geometry<<&T as LayoutIds>::Coord>),

source§

fn with_shape<F, R>(&self, shape_id: &<&T as LayoutIds>::ShapeId, f: F) -> R
where F: FnMut(&<&T as LayoutIds>::LayerId, &Geometry<<&T as LayoutIds>::Coord>) -> R,

source§

fn get_transform( &self, cell_inst: &<&T as HierarchyIds>::CellInstId ) -> SimpleTransform<<&T as LayoutIds>::Coord>

source§

fn get_shape_property( &self, shape: &<&T as LayoutIds>::ShapeId, key: &<&T as HierarchyBase>::NameType ) -> Option<PropertyValue>

source§

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

source§

fn shape_layer( &self, shape_id: &<&T as LayoutIds>::ShapeId ) -> <&T as LayoutIds>::LayerId

source§

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

source§

fn bounding_box( &self, cell: &<&mut T as HierarchyIds>::CellId ) -> Option<Rect<<&mut T as LayoutIds>::Coord>>

source§

fn each_shape_id( &self, cell: &<&mut T as HierarchyIds>::CellId, layer: &<&mut T as LayoutIds>::LayerId ) -> Box<dyn Iterator<Item = <&mut T as LayoutIds>::ShapeId> + '_>

source§

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

source§

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

source§

fn bounding_box_per_layer( &self, cell: &<&mut T as HierarchyIds>::CellId, layer: &<&mut T as LayoutIds>::LayerId ) -> Option<Rect<<&mut T as LayoutIds>::Coord>>

source§

fn with_shape<F, R>(&self, shape_id: &<&mut T as LayoutIds>::ShapeId, f: F) -> R
where F: FnMut(&<&mut T as LayoutIds>::LayerId, &Geometry<<&mut T as LayoutIds>::Coord>) -> R,

source§

fn parent_of_shape( &self, shape_id: &<&mut T as LayoutIds>::ShapeId ) -> (<&mut T as HierarchyIds>::CellId, <&mut T as LayoutIds>::LayerId)

source§

fn layer_info( &self, layer: &<&mut T as LayoutIds>::LayerId ) -> LayerInfo<<&mut T as HierarchyBase>::NameType>

source§

fn each_layer( &self ) -> Box<dyn Iterator<Item = <&mut T as LayoutIds>::LayerId> + '_>

source§

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

source§

fn for_each_shape<F>( &self, cell: &<&mut T as HierarchyIds>::CellId, layer: &<&mut T as LayoutIds>::LayerId, f: F )

source§

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

source§

fn get_shape_property( &self, shape: &<&mut T as LayoutIds>::ShapeId, key: &<&mut T as HierarchyBase>::NameType ) -> Option<PropertyValue>

source§

fn layer_by_name(&self, name: &str) -> Option<<&mut T as LayoutIds>::LayerId>

source§

fn shape_layer( &self, shape_id: &<&mut T as LayoutIds>::ShapeId ) -> <&mut T as LayoutIds>::LayerId

source§

fn for_each_shape_recursive<F>( &self, cell: &<&mut T as HierarchyIds>::CellId, layer: &<&mut T as LayoutIds>::LayerId, f: F )

source§

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

source§

fn get_transform( &self, cell_inst: &<Box<T> as HierarchyIds>::CellInstId ) -> SimpleTransform<<Box<T> as LayoutIds>::Coord>

source§

fn dbu(&self) -> <Box<T> as LayoutIds>::Coord

source§

fn for_each_shape<F>( &self, cell: &<Box<T> as HierarchyIds>::CellId, layer: &<Box<T> as LayoutIds>::LayerId, f: F )
where F: FnMut(&<Box<T> as LayoutIds>::ShapeId, &Geometry<<Box<T> as LayoutIds>::Coord>),

source§

fn shape_layer( &self, shape_id: &<Box<T> as LayoutIds>::ShapeId ) -> <Box<T> as LayoutIds>::LayerId

source§

fn bounding_box( &self, cell: &<Box<T> as HierarchyIds>::CellId ) -> Option<Rect<<Box<T> as LayoutIds>::Coord>>

source§

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

source§

fn get_shape_property( &self, shape: &<Box<T> as LayoutIds>::ShapeId, key: &<Box<T> as HierarchyBase>::NameType ) -> Option<PropertyValue>

source§

fn with_shape<F, R>(&self, shape_id: &<Box<T> as LayoutIds>::ShapeId, f: F) -> R
where F: FnMut(&<Box<T> as LayoutIds>::LayerId, &Geometry<<Box<T> as LayoutIds>::Coord>) -> R,

source§

fn layer_info( &self, layer: &<Box<T> as LayoutIds>::LayerId ) -> LayerInfo<<Box<T> as HierarchyBase>::NameType>

source§

fn each_layer( &self ) -> Box<dyn Iterator<Item = <Box<T> as LayoutIds>::LayerId> + '_>

source§

fn parent_of_shape( &self, shape_id: &<Box<T> as LayoutIds>::ShapeId ) -> (<Box<T> as HierarchyIds>::CellId, <Box<T> as LayoutIds>::LayerId)

source§

fn bounding_box_per_layer( &self, cell: &<Box<T> as HierarchyIds>::CellId, layer: &<Box<T> as LayoutIds>::LayerId ) -> Option<Rect<<Box<T> as LayoutIds>::Coord>>

source§

fn for_each_shape_recursive<F>( &self, cell: &<Box<T> as HierarchyIds>::CellId, layer: &<Box<T> as LayoutIds>::LayerId, f: F )
where F: FnMut(SimpleTransform<<Box<T> as LayoutIds>::Coord>, &<Box<T> as LayoutIds>::ShapeId, &Geometry<<Box<T> as LayoutIds>::Coord>),

source§

fn layer_by_name(&self, name: &str) -> Option<<Box<T> as LayoutIds>::LayerId>

source§

fn each_shape_id( &self, cell: &<Box<T> as HierarchyIds>::CellId, layer: &<Box<T> as LayoutIds>::LayerId ) -> Box<dyn Iterator<Item = <Box<T> as LayoutIds>::ShapeId> + '_>

source§

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

source§

impl<T> LayoutBase for Rc<T>
where T: LayoutBase,

source§

fn with_shape<F, R>(&self, shape_id: &<Rc<T> as LayoutIds>::ShapeId, f: F) -> R
where F: FnMut(&<Rc<T> as LayoutIds>::LayerId, &Geometry<<Rc<T> as LayoutIds>::Coord>) -> R,

source§

fn layer_by_name(&self, name: &str) -> Option<<Rc<T> as LayoutIds>::LayerId>

source§

fn each_layer( &self ) -> Box<dyn Iterator<Item = <Rc<T> as LayoutIds>::LayerId> + '_>

source§

fn parent_of_shape( &self, shape_id: &<Rc<T> as LayoutIds>::ShapeId ) -> (<Rc<T> as HierarchyIds>::CellId, <Rc<T> as LayoutIds>::LayerId)

source§

fn for_each_shape_recursive<F>( &self, cell: &<Rc<T> as HierarchyIds>::CellId, layer: &<Rc<T> as LayoutIds>::LayerId, f: F )
where F: FnMut(SimpleTransform<<Rc<T> as LayoutIds>::Coord>, &<Rc<T> as LayoutIds>::ShapeId, &Geometry<<Rc<T> as LayoutIds>::Coord>),

source§

fn shape_geometry( &self, shape_id: &<Rc<T> as LayoutIds>::ShapeId ) -> Geometry<<Rc<T> as LayoutIds>::Coord>

source§

fn find_layer( &self, index: u32, datatype: u32 ) -> Option<<Rc<T> as LayoutIds>::LayerId>

source§

fn shape_layer( &self, shape_id: &<Rc<T> as LayoutIds>::ShapeId ) -> <Rc<T> as LayoutIds>::LayerId

source§

fn dbu(&self) -> <Rc<T> as LayoutIds>::Coord

source§

fn get_transform( &self, cell_inst: &<Rc<T> as HierarchyIds>::CellInstId ) -> SimpleTransform<<Rc<T> as LayoutIds>::Coord>

source§

fn bounding_box_per_layer( &self, cell: &<Rc<T> as HierarchyIds>::CellId, layer: &<Rc<T> as LayoutIds>::LayerId ) -> Option<Rect<<Rc<T> as LayoutIds>::Coord>>

source§

fn get_shape_property( &self, shape: &<Rc<T> as LayoutIds>::ShapeId, key: &<Rc<T> as HierarchyBase>::NameType ) -> Option<PropertyValue>

source§

fn bounding_box( &self, cell: &<Rc<T> as HierarchyIds>::CellId ) -> Option<Rect<<Rc<T> as LayoutIds>::Coord>>

source§

fn layer_info( &self, layer: &<Rc<T> as LayoutIds>::LayerId ) -> LayerInfo<<Rc<T> as HierarchyBase>::NameType>

source§

fn for_each_shape<F>( &self, cell: &<Rc<T> as HierarchyIds>::CellId, layer: &<Rc<T> as LayoutIds>::LayerId, f: F )
where F: FnMut(&<Rc<T> as LayoutIds>::ShapeId, &Geometry<<Rc<T> as LayoutIds>::Coord>),

source§

fn each_shape_id( &self, cell: &<Rc<T> as HierarchyIds>::CellId, layer: &<Rc<T> as LayoutIds>::LayerId ) -> Box<dyn Iterator<Item = <Rc<T> as LayoutIds>::ShapeId> + '_>

source§

impl<T> LayoutBase for Arc<T>
where T: LayoutBase,

source§

fn with_shape<F, R>(&self, shape_id: &<Arc<T> as LayoutIds>::ShapeId, f: F) -> R
where F: FnMut(&<Arc<T> as LayoutIds>::LayerId, &Geometry<<Arc<T> as LayoutIds>::Coord>) -> R,

source§

fn get_shape_property( &self, shape: &<Arc<T> as LayoutIds>::ShapeId, key: &<Arc<T> as HierarchyBase>::NameType ) -> Option<PropertyValue>

source§

fn bounding_box_per_layer( &self, cell: &<Arc<T> as HierarchyIds>::CellId, layer: &<Arc<T> as LayoutIds>::LayerId ) -> Option<Rect<<Arc<T> as LayoutIds>::Coord>>

source§

fn get_transform( &self, cell_inst: &<Arc<T> as HierarchyIds>::CellInstId ) -> SimpleTransform<<Arc<T> as LayoutIds>::Coord>

source§

fn find_layer( &self, index: u32, datatype: u32 ) -> Option<<Arc<T> as LayoutIds>::LayerId>

source§

fn dbu(&self) -> <Arc<T> as LayoutIds>::Coord

source§

fn parent_of_shape( &self, shape_id: &<Arc<T> as LayoutIds>::ShapeId ) -> (<Arc<T> as HierarchyIds>::CellId, <Arc<T> as LayoutIds>::LayerId)

source§

fn layer_info( &self, layer: &<Arc<T> as LayoutIds>::LayerId ) -> LayerInfo<<Arc<T> as HierarchyBase>::NameType>

source§

fn shape_layer( &self, shape_id: &<Arc<T> as LayoutIds>::ShapeId ) -> <Arc<T> as LayoutIds>::LayerId

source§

fn for_each_shape<F>( &self, cell: &<Arc<T> as HierarchyIds>::CellId, layer: &<Arc<T> as LayoutIds>::LayerId, f: F )
where F: FnMut(&<Arc<T> as LayoutIds>::ShapeId, &Geometry<<Arc<T> as LayoutIds>::Coord>),

source§

fn bounding_box( &self, cell: &<Arc<T> as HierarchyIds>::CellId ) -> Option<Rect<<Arc<T> as LayoutIds>::Coord>>

source§

fn each_shape_id( &self, cell: &<Arc<T> as HierarchyIds>::CellId, layer: &<Arc<T> as LayoutIds>::LayerId ) -> Box<dyn Iterator<Item = <Arc<T> as LayoutIds>::ShapeId> + '_>

source§

fn shape_geometry( &self, shape_id: &<Arc<T> as LayoutIds>::ShapeId ) -> Geometry<<Arc<T> as LayoutIds>::Coord>

source§

fn for_each_shape_recursive<F>( &self, cell: &<Arc<T> as HierarchyIds>::CellId, layer: &<Arc<T> as LayoutIds>::LayerId, f: F )
where F: FnMut(SimpleTransform<<Arc<T> as LayoutIds>::Coord>, &<Arc<T> as LayoutIds>::ShapeId, &Geometry<<Arc<T> as LayoutIds>::Coord>),

source§

fn each_layer( &self ) -> Box<dyn Iterator<Item = <Arc<T> as LayoutIds>::LayerId> + '_>

source§

fn layer_by_name(&self, name: &str) -> Option<<Arc<T> as LayoutIds>::LayerId>

Implementors§

source§

impl LayoutBase for Chip

source§

impl<'b, N, U> LayoutBase for Undo<'b, N, U>
where N: LayoutBase,

source§

impl<L> LayoutBase for DBPerf<L>
where L: LayoutBase,

source§

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