KiCad PCB EDA Suite
net_settings.cpp File Reference

Go to the source code of this file.

Functions

static OPT< int > getInPcbUnits (const nlohmann::json &aObj, const std::string &aKey, OPT< int > aDefault=OPT< int >())
 
static bool isSuperSub (wxChar c)
 

Variables

const int netSettingsSchemaVersion = 0
 

Function Documentation

◆ getInPcbUnits()

static OPT<int> getInPcbUnits ( const nlohmann::json aObj,
const std::string &  aKey,
OPT< int >  aDefault = OPT<int>() 
)
static

Definition at line 29 of file net_settings.cpp.

30 {
31  if( aObj.contains( aKey ) && aObj[aKey].is_number() )
32  return PcbMillimeter2iu( aObj[aKey].get<double>() );
33  else
34  return aDefault;
35 };
constexpr int PcbMillimeter2iu(double mm)

References PcbMillimeter2iu().

Referenced by NET_SETTINGS::NET_SETTINGS().

◆ isSuperSub()

static bool isSuperSub ( wxChar  c)
static

Definition at line 257 of file net_settings.cpp.

258 {
259  return c == '_' || c == '^';
260 }

Referenced by NET_SETTINGS::ParseBusGroup(), and NET_SETTINGS::ParseBusVector().

Variable Documentation

◆ netSettingsSchemaVersion

const int netSettingsSchemaVersion = 0

Definition at line 27 of file net_settings.cpp.