KiCad PCB EDA Suite
net_settings.cpp File Reference
#include <nlohmann/json.hpp>
#include <project/net_settings.h>
#include <settings/parameters.h>
#include <settings/json_settings_internals.h>
#include <settings/settings_manager.h>
#include <kicad_string.h>
#include <convert_to_biu.h>

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 isSuperSubOverbar (wxChar c)
 

Variables

const int netSettingsSchemaVersion = 1
 

Function Documentation

◆ getInPcbUnits()

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

Definition at line 37 of file net_settings.cpp.

39 {
40  if( aObj.contains( aKey ) && aObj[aKey].is_number() )
41  return PcbMillimeter2iu( aObj[aKey].get<double>() );
42  else
43  return aDefault;
44 };
constexpr int PcbMillimeter2iu(double mm)

References PcbMillimeter2iu().

Referenced by NET_SETTINGS::NET_SETTINGS().

◆ isSuperSubOverbar()

static bool isSuperSubOverbar ( wxChar  c)
static

Definition at line 302 of file net_settings.cpp.

303 {
304  return c == '_' || c == '^' || c == '~';
305 }

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

Variable Documentation

◆ netSettingsSchemaVersion

const int netSettingsSchemaVersion = 1

Definition at line 34 of file net_settings.cpp.