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

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

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

Convert string to model

Definition at line 878 of file dialog_spice_model.cpp.

References SP_UNKNOWN.

Referenced by DIALOG_SPICE_MODEL::loadLibrary().

879 {
880  wxCHECK( !aValue.IsEmpty(), SP_UNKNOWN );
881  const wxString val( aValue.Lower() );
882 
883  for( const auto& model : modelTypes )
884  {
885  for( const auto& keyword : model.keywords )
886  {
887  if( val.StartsWith( keyword ) )
888  return model.type;
889  }
890  }
891 
892  return SP_UNKNOWN;
893 }
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 130 of file dialog_spice_model.h.

SPICE_PRIMITIVE DIALOG_SPICE_MODEL::MODEL::model

Type of the device

Definition at line 133 of file dialog_spice_model.h.


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