KiCad PCB EDA Suite
DIALOG_SPICE_MODEL::MODEL Struct Reference

Models available in the selected library file. More...

Public Member Functions

 MODEL (int aLine, enum SPICE_PRIMITIVE aModel)
 

Static Public Member Functions

static SPICE_PRIMITIVE parseModelType (const wxString &aValue)
 

Public Attributes

int line
 < Line number in the library file More...
 
SPICE_PRIMITIVE model
 Convert string to model. More...
 

Detailed Description

Models available in the selected library file.

Definition at line 144 of file dialog_spice_model.h.

Constructor & Destructor Documentation

◆ MODEL()

DIALOG_SPICE_MODEL::MODEL::MODEL ( int  aLine,
enum SPICE_PRIMITIVE  aModel 
)
inline

Definition at line 155 of file dialog_spice_model.h.

156  : line( aLine ), model( aModel )
157  {
158  }
SPICE_PRIMITIVE model
Convert string to model.
int line
< Line number in the library file

Member Function Documentation

◆ parseModelType()

SPICE_PRIMITIVE DIALOG_SPICE_MODEL::MODEL::parseModelType ( const wxString &  aValue)
static

Definition at line 1111 of file dialog_spice_model.cpp.

1112 {
1113  wxCHECK( !aValue.IsEmpty(), SP_UNKNOWN );
1114  const wxString val( aValue.Lower() );
1115 
1116  for( const auto& model : modelTypes )
1117  {
1118  for( const auto& keyword : model.keywords )
1119  {
1120  if( val.StartsWith( keyword ) )
1121  return model.type;
1122  }
1123  }
1124 
1125  return SP_UNKNOWN;
1126 }
SPICE_PRIMITIVE model
Convert string to model.
static const std::vector< SPICE_MODEL_INFO > modelTypes

References model, modelTypes, and SP_UNKNOWN.

Referenced by DIALOG_SPICE_MODEL::loadLibrary().

Member Data Documentation

◆ line

int DIALOG_SPICE_MODEL::MODEL::line

< Line number in the library file

Type of the device

Definition at line 147 of file dialog_spice_model.h.

◆ model

SPICE_PRIMITIVE DIALOG_SPICE_MODEL::MODEL::model

Convert string to model.

Definition at line 150 of file dialog_spice_model.h.

Referenced by parseModelType().


The documentation for this struct was generated from the following files: