|
| __init__ (self, str db_path="components.db") |
str | add_component (self, ComponentSpec spec) |
Optional[ComponentSpec] | get_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) |
组件数据库管理器
Definition at line 30 of file component_db.py.
◆ __init__()
zlayout.component_db.ComponentDatabase.__init__ |
( |
| self, |
|
|
str | db_path = "components.db" ) |
◆ _init_database()
zlayout.component_db.ComponentDatabase._init_database |
( |
| self | ) |
|
|
protected |
◆ _populate_basic_components()
zlayout.component_db.ComponentDatabase._populate_basic_components |
( |
| self | ) |
|
|
protected |
◆ add_component()
str zlayout.component_db.ComponentDatabase.add_component |
( |
| self, |
|
|
ComponentSpec | spec ) |
◆ close()
zlayout.component_db.ComponentDatabase.close |
( |
| self | ) |
|
◆ 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 = "" ) |
◆ create_module()
str zlayout.component_db.ComponentDatabase.create_module |
( |
| self, |
|
|
str | name, |
|
|
List[str] | components, |
|
|
List[Dict[str, Any]] | connections, |
|
|
str | description = "" ) |
◆ get_component()
Optional[ComponentSpec] zlayout.component_db.ComponentDatabase.get_component |
( |
| self, |
|
|
str | component_id ) |
◆ get_component_library()
Dict[str, Any] zlayout.component_db.ComponentDatabase.get_component_library |
( |
| self | ) |
|
◆ search_components()
List[Dict[str, Any]] zlayout.component_db.ComponentDatabase.search_components |
( |
| self, |
|
|
Optional[str] | category = None, |
|
|
Optional[str] | name_pattern = None ) |
◆ conn
zlayout.component_db.ComponentDatabase.conn = sqlite3.connect(self.db_path) |
◆ db_path
zlayout.component_db.ComponentDatabase.db_path = db_path |
The documentation for this class was generated from the following file: