KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_writer_v10.cpp File Reference
#include <sch_io/kicad_sexpr/writers/sch_writer_v10.h>
#include <algorithm>
#include <fmt/format.h>
#include <wx/mstream.h>
#include <base_units.h>
#include <bitmap_base.h>
#include <build_version.h>
#include <schematic_lexer.h>
#include <io/kicad/kicad_io_utils.h>
#include <io/kicad/legacy_format.h>
#include <schematic.h>
#include <sch_bitmap.h>
#include <sch_bus_entry.h>
#include <sch_edit_frame.h>
#include <sch_group.h>
#include <sch_junction.h>
#include <sch_line.h>
#include <sch_no_connect.h>
#include <sch_pin.h>
#include <sch_rule_area.h>
#include <sch_screen.h>
#include <sch_shape.h>
#include <sch_sheet.h>
#include <sch_sheet_pin.h>
#include <sch_symbol.h>
#include <sch_table.h>
#include <sch_tablecell.h>
#include <sch_text.h>
#include <sch_textbox.h>
#include <string_utils.h>
#include <locale_io.h>
#include <richio.h>

Go to the source code of this file.

Functions

static void formatArc (OUTPUTFORMATTER *aFormatter, EDA_SHAPE *aArc, bool aIsPrivate, const STROKE_PARAMS &aStroke, FILL_T aFillMode, const COLOR4D &aFillColor, bool aInvertY, const KIID &aUuid=niluuid)
 
static void formatCircle (OUTPUTFORMATTER *aFormatter, EDA_SHAPE *aCircle, bool aIsPrivate, const STROKE_PARAMS &aStroke, FILL_T aFillMode, const COLOR4D &aFillColor, bool aInvertY, const KIID &aUuid=niluuid)
 
static void formatRect (OUTPUTFORMATTER *aFormatter, EDA_SHAPE *aRect, bool aIsPrivate, const STROKE_PARAMS &aStroke, FILL_T aFillMode, const COLOR4D &aFillColor, bool aInvertY, const KIID &aUuid=niluuid)
 
static void formatBezier (OUTPUTFORMATTER *aFormatter, EDA_SHAPE *aBezier, bool aIsPrivate, const STROKE_PARAMS &aStroke, FILL_T aFillMode, const COLOR4D &aFillColor, bool aInvertY, const KIID &aUuid=niluuid)
 
static void formatPoly (OUTPUTFORMATTER *aFormatter, EDA_SHAPE *aPolyLine, bool aIsPrivate, const STROKE_PARAMS &aStroke, FILL_T aFillMode, const COLOR4D &aFillColor, bool aInvertY, const KIID &aUuid=niluuid)
 
static void formatFill (OUTPUTFORMATTER *aFormatter, FILL_T aFillMode, const COLOR4D &aFillColor)
 
static const char * getPinElectricalTypeToken (ELECTRICAL_PINTYPE aType)
 
static const char * getPinShapeToken (GRAPHIC_PINSHAPE aShape)
 
static EDA_ANGLE getPinAngle (PIN_ORIENTATION aOrientation)
 
static const char * getSheetPinShapeToken (LABEL_FLAG_SHAPE aShape)
 
static EDA_ANGLE getSheetPinAngle (SHEET_SIDE aSide)
 
static const char * getTextTypeToken (KICAD_T aType)
 
static std::string formatIU (const int &aValue)
 
static std::string formatIU (const VECTOR2I &aPt, bool aInvertY)
 
static void libSaveSymbol (LIB_SYMBOL *aSymbol, OUTPUTFORMATTER &aFormatter, const wxString &aLibName=wxEmptyString, bool aIncludeData=true)
 
static void libSaveSymbolDrawItem (SCH_ITEM *aItem, OUTPUTFORMATTER &aFormatter)
 
static void libSaveField (SCH_FIELD *aField, OUTPUTFORMATTER &aFormatter)
 
static void libSavePin (SCH_PIN *aPin, OUTPUTFORMATTER &aFormatter)
 
static void libSaveText (SCH_TEXT *aText, OUTPUTFORMATTER &aFormatter)
 
static void libSaveTextBox (SCH_TEXTBOX *aTextBox, OUTPUTFORMATTER &aFormatter)
 
static void libSaveDcmInfoAsFields (LIB_SYMBOL *aSymbol, OUTPUTFORMATTER &aFormatter)
 

Variables

static const char * emptyString = ""
 

Function Documentation

◆ formatArc()

static void formatArc ( OUTPUTFORMATTER * aFormatter,
EDA_SHAPE * aArc,
bool aIsPrivate,
const STROKE_PARAMS & aStroke,
FILL_T aFillMode,
const COLOR4D & aFillColor,
bool aInvertY,
const KIID & aUuid = niluuid )
static

◆ formatBezier()

static void formatBezier ( OUTPUTFORMATTER * aFormatter,
EDA_SHAPE * aBezier,
bool aIsPrivate,
const STROKE_PARAMS & aStroke,
FILL_T aFillMode,
const COLOR4D & aFillColor,
bool aInvertY,
const KIID & aUuid = niluuid )
static

◆ formatCircle()

static void formatCircle ( OUTPUTFORMATTER * aFormatter,
EDA_SHAPE * aCircle,
bool aIsPrivate,
const STROKE_PARAMS & aStroke,
FILL_T aFillMode,
const COLOR4D & aFillColor,
bool aInvertY,
const KIID & aUuid = niluuid )
static

◆ formatFill()

◆ formatIU() [1/2]

static std::string formatIU ( const int & aValue)
static

◆ formatIU() [2/2]

static std::string formatIU ( const VECTOR2I & aPt,
bool aInvertY )
static

◆ formatPoly()

◆ formatRect()

static void formatRect ( OUTPUTFORMATTER * aFormatter,
EDA_SHAPE * aRect,
bool aIsPrivate,
const STROKE_PARAMS & aStroke,
FILL_T aFillMode,
const COLOR4D & aFillColor,
bool aInvertY,
const KIID & aUuid = niluuid )
static

◆ getPinAngle()

static EDA_ANGLE getPinAngle ( PIN_ORIENTATION aOrientation)
static

Definition at line 171 of file sch_writer_v10.cpp.

References ANGLE_0, ANGLE_180, ANGLE_270, ANGLE_90, PIN_DOWN, PIN_LEFT, PIN_RIGHT, and PIN_UP.

◆ getPinElectricalTypeToken()

static const char * getPinElectricalTypeToken ( ELECTRICAL_PINTYPE aType)
static

◆ getPinShapeToken()

static const char * getPinShapeToken ( GRAPHIC_PINSHAPE aShape)
static

◆ getSheetPinAngle()

static EDA_ANGLE getSheetPinAngle ( SHEET_SIDE aSide)
static

Definition at line 202 of file sch_writer_v10.cpp.

References ANGLE_0, ANGLE_180, ANGLE_270, ANGLE_90, BOTTOM, LEFT, RIGHT, TOP, and UNDEFINED.

◆ getSheetPinShapeToken()

static const char * getSheetPinShapeToken ( LABEL_FLAG_SHAPE aShape)
static

◆ getTextTypeToken()

static const char * getTextTypeToken ( KICAD_T aType)
static

◆ libSaveDcmInfoAsFields()

static void libSaveDcmInfoAsFields ( LIB_SYMBOL * aSymbol,
OUTPUTFORMATTER & aFormatter )
static

◆ libSaveField()

◆ libSavePin()

◆ libSaveSymbol()

static void libSaveSymbol ( LIB_SYMBOL * aSymbol,
OUTPUTFORMATTER & aFormatter,
const wxString & aLibName = wxEmptyString,
bool aIncludeData = true )
static

◆ libSaveSymbolDrawItem()

◆ libSaveText()

◆ libSaveTextBox()

Variable Documentation

◆ emptyString

const char* emptyString = ""
static

Definition at line 61 of file sch_writer_v10.cpp.