KiCad PCB EDA Suite
DIALOG_SPICE_MODEL::MODEL Struct Reference

Public Member Functions

 MODEL (int aLine, enum SPICE_PRIMITIVE aModel)
 

Static Public Member Functions

static SPICE_PRIMITIVE parseModelType (const wxString &aValue)
 

Convert string to model

More...
 

Public Attributes

int line
 

Line number in the library file

More...
 
SPICE_PRIMITIVE model
 

Type of the device

More...
 

Detailed Description

Definition at line 127 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 138 of file dialog_spice_model.h.

139  : line( aLine ), model( aModel )
140  {
141  }
SPICE_PRIMITIVE model
Type of the device
int line
Line number in the library file

Member Function Documentation

◆ parseModelType()

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

Convert string to model

Definition at line 881 of file dialog_spice_model.cpp.

882 {
883  wxCHECK( !aValue.IsEmpty(), SP_UNKNOWN );
884  const wxString val( aValue.Lower() );
885 
886  for( const auto& model : modelTypes )
887  {
888  for( const auto& keyword : model.keywords )
889  {
890  if( val.StartsWith( keyword ) )
891  return model.type;
892  }
893  }
894 
895  return SP_UNKNOWN;
896 }
SPICE_PRIMITIVE model
Type of the device
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

Definition at line 130 of file dialog_spice_model.h.

◆ model

SPICE_PRIMITIVE DIALOG_SPICE_MODEL::MODEL::model

Type of the device

Definition at line 133 of file dialog_spice_model.h.

Referenced by parseModelType().


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