KiCad PCB EDA Suite
dialog_spice_model.cpp File Reference
#include "dialog_spice_model.h"
#include <netlist_exporters/netlist_exporter_pspice.h>
#include <sim/spice_value.h>
#include <confirm.h>
#include <project.h>
#include <wx/tokenzr.h>

Go to the source code of this file.

Functions

static bool empty (const wxTextCtrl *aCtrl)
 
static int wxCALLBACK comparePwlValues (wxIntPtr aItem1, wxIntPtr aItem2, wxIntPtr WXUNUSED(aSortData))
 

Function Documentation

static int wxCALLBACK comparePwlValues ( wxIntPtr  aItem1,
wxIntPtr  aItem2,
wxIntPtr   WXUNUSEDaSortData 
)
static

Definition at line 42 of file dialog_spice_model.cpp.

Referenced by DIALOG_SPICE_MODEL::addPwlValue().

43 {
44  float* t1 = reinterpret_cast<float*>( &aItem1 );
45  float* t2 = reinterpret_cast<float*>( &aItem2 );
46 
47  if( *t1 > *t2 )
48  return 1;
49 
50  if( *t1 < *t2 )
51  return -1;
52 
53  return 0;
54 }
static bool empty ( const wxTextCtrl *  aCtrl)
static

Definition at line 35 of file dialog_spice_model.cpp.

Referenced by DIALOG_SPICE_MODEL::generatePowerSource(), DIALOG_SPICE_MODEL::TransferDataFromWindow(), and DIALOG_SPICE_MODEL::TransferDataToWindow().

36 {
37  return aCtrl->GetValue().IsEmpty();
38 }