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 116 of file dialog_spice_model.h.

Constructor & Destructor Documentation

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

Definition at line 127 of file dialog_spice_model.h.

128  : line( aLine ), model( aModel )
129  {
130  }
SPICE_PRIMITIVE model
Type of the device
int line
Line number in the library file

Member Function Documentation

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

Convert string to model

Definition at line 821 of file dialog_spice_model.cpp.

References SP_UNKNOWN.

Referenced by DIALOG_SPICE_MODEL::loadLibrary().

822 {
823  wxCHECK( !aValue.IsEmpty(), SP_UNKNOWN );
824  const wxString val( aValue.Lower() );
825 
826  for( const auto& model : modelTypes )
827  {
828  for( const auto& keyword : model.keywords )
829  {
830  if( val.StartsWith( keyword ) )
831  return model.type;
832  }
833  }
834 
835  return SP_UNKNOWN;
836 }
SPICE_PRIMITIVE model
Type of the device
static const std::vector< SPICE_MODEL_INFO > modelTypes

Member Data Documentation

int DIALOG_SPICE_MODEL::MODEL::line

Line number in the library file

Definition at line 119 of file dialog_spice_model.h.

SPICE_PRIMITIVE DIALOG_SPICE_MODEL::MODEL::model

Type of the device

Definition at line 122 of file dialog_spice_model.h.


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