KiCad PCB EDA Suite
Loading...
Searching...
No Matches
autotrax_parser.cpp File Reference
#include "autotrax_parser.h"
#include <reporter.h>
#include <wx/tokenzr.h>
#include <wx/translation.h>

Go to the source code of this file.

Functions

static double toDouble (const wxString &aToken)
 Parse a token as a double using the C locale, returning 0 on failure so a malformed field degrades to zero rather than corrupting on comma-decimal locales the way bare strtod() would.
 
static int toInt (const wxString &aToken)
 Parse a token as an integer using the C locale, returning 0 on failure.
 

Function Documentation

◆ toDouble()

static double toDouble ( const wxString & aToken)
static

Parse a token as a double using the C locale, returning 0 on failure so a malformed field degrades to zero rather than corrupting on comma-decimal locales the way bare strtod() would.

Definition at line 41 of file autotrax_parser.cpp.

Referenced by AUTOTRAX_PARSER::parseArc(), AUTOTRAX_PARSER::parseComponent(), AUTOTRAX_PARSER::parseFill(), AUTOTRAX_PARSER::parsePad(), AUTOTRAX_PARSER::parseText(), AUTOTRAX_PARSER::parseTrack(), and AUTOTRAX_PARSER::parseVia().

◆ toInt()

static int toInt ( const wxString & aToken)
static

Parse a token as an integer using the C locale, returning 0 on failure.

Definition at line 50 of file autotrax_parser.cpp.

Referenced by AUTOTRAX_PARSER::parseArc(), AUTOTRAX_PARSER::parseFill(), AUTOTRAX_PARSER::parsePad(), AUTOTRAX_PARSER::parseText(), and AUTOTRAX_PARSER::parseTrack().