KiCad PCB EDA Suite
dialog_spice_model.cpp File Reference
#include "wildcards_and_files_ext.h"
#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 43 of file dialog_spice_model.cpp.

Referenced by DIALOG_SPICE_MODEL::addPwlValue().

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

Definition at line 36 of file dialog_spice_model.cpp.

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

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