ZLayout EDA Library v1.0.0
Advanced Electronic Design Automation Layout Library with Bilingual Documentation
Loading...
Searching...
No Matches
zlayout.component_db.ComponentDatabase Class Reference

Public Member Functions

 __init__ (self, str db_path="components.db")
str add_component (self, ComponentSpec spec)
Optional[ComponentSpecget_component (self, str component_id)
List[Dict[str, Any]] search_components (self, Optional[str] category=None, Optional[str] name_pattern=None)
str create_custom_component (self, str name, Dict[str, Any] parameters, Optional[Dict[str, Any]] electrical_params=None, Optional[Dict[str, Any]] physical_params=None, str description="")
str create_module (self, str name, List[str] components, List[Dict[str, Any]] connections, str description="")
Dict[str, Any] get_component_library (self)
 close (self)

Public Attributes

 db_path = db_path
 conn = sqlite3.connect(self.db_path)

Protected Member Functions

 _init_database (self)
 _populate_basic_components (self)

Detailed Description

组件数据库管理器

Definition at line 30 of file component_db.py.

Constructor & Destructor Documentation

◆ __init__()

zlayout.component_db.ComponentDatabase.__init__ ( self,
str db_path = "components.db" )

Definition at line 33 of file component_db.py.

Member Function Documentation

◆ _init_database()

zlayout.component_db.ComponentDatabase._init_database ( self)
protected
初始化数据库

Definition at line 38 of file component_db.py.

Here is the call graph for this function:

◆ _populate_basic_components()

zlayout.component_db.ComponentDatabase._populate_basic_components ( self)
protected
填充基本组件库

Definition at line 68 of file component_db.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_component()

str zlayout.component_db.ComponentDatabase.add_component ( self,
ComponentSpec spec )
添加组件到数据库

Definition at line 139 of file component_db.py.

Here is the caller graph for this function:

◆ close()

zlayout.component_db.ComponentDatabase.close ( self)
关闭数据库连接

Definition at line 273 of file component_db.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_custom_component()

str zlayout.component_db.ComponentDatabase.create_custom_component ( self,
str name,
Dict[str, Any] parameters,
Optional[Dict[str, Any]] electrical_params = None,
Optional[Dict[str, Any]] physical_params = None,
str description = "" )
创建自定义组件

Definition at line 213 of file component_db.py.

Here is the call graph for this function:

◆ create_module()

str zlayout.component_db.ComponentDatabase.create_module ( self,
str name,
List[str] components,
List[Dict[str, Any]] connections,
str description = "" )
创建模块(包括中间模块)

Definition at line 232 of file component_db.py.

◆ get_component()

Optional[ComponentSpec] zlayout.component_db.ComponentDatabase.get_component ( self,
str component_id )
获取组件规格

Definition at line 163 of file component_db.py.

Here is the caller graph for this function:

◆ get_component_library()

Dict[str, Any] zlayout.component_db.ComponentDatabase.get_component_library ( self)
获取组件库概览

Definition at line 258 of file component_db.py.

◆ search_components()

List[Dict[str, Any]] zlayout.component_db.ComponentDatabase.search_components ( self,
Optional[str] category = None,
Optional[str] name_pattern = None )
搜索组件

Definition at line 185 of file component_db.py.

Member Data Documentation

◆ conn

zlayout.component_db.ComponentDatabase.conn = sqlite3.connect(self.db_path)

Definition at line 35 of file component_db.py.

◆ db_path

zlayout.component_db.ComponentDatabase.db_path = db_path

Definition at line 34 of file component_db.py.


The documentation for this class was generated from the following file: