KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_io_kicad_sexpr.h File Reference
#include <pcb_io/pcb_io.h>
#include <pcb_io/pcb_io_mgr.h>
#include <richio.h>
#include <string>
#include <layer_ids.h>
#include <boost/ptr_container/ptr_map.hpp>
#include <wx_filename.h>
#include "widgets/report_severity.h"

Go to the source code of this file.

Classes

class  FP_CACHE_ITEM
 Helper class for creating a footprint library cache. More...
 
class  FP_CACHE
 
class  PCB_IO_KICAD_SEXPR
 A #PLUGIN derivation for saving and loading Pcbnew s-expression formatted files. More...
 

Macros

#define SEXPR_BOARD_FILE_VERSION   20240225
 Current s-expression file format version. 2 was the last legacy format version.
 
#define BOARD_FILE_HOST_VERSION   20200825
 Earlier files than this include the host tag.
 
#define LEGACY_ARC_FORMATTING   20210925
 These were the last to use old arc formatting.
 
#define LEGACY_NET_TIES   20220815
 These were the last to use the keywords field to indicate a net-tie.
 
#define FIRST_NORMALIZED_VERISON   20230924
 Earlier files did not have normalized bools.
 
#define CTL_OMIT_PAD_NETS   (1 << 1)
 Omit pads net names (useless in library)
 
#define CTL_OMIT_UUIDS   (1 << 2)
 Omit component unique ids (useless in library)
 
#define CTL_OMIT_INITIAL_COMMENTS   (1 << 3)
 omit FOOTPRINT initial comments
 
#define CTL_OMIT_PATH   (1 << 4)
 Omit component sheet time stamp (useless in library)
 
#define CTL_OMIT_AT   (1 << 5)
 Omit position and rotation.
 
#define CTL_OMIT_LIBNAME   (1 << 7)
 Omit lib alias when saving (used for board/not library).
 
#define CTL_OMIT_FOOTPRINT_VERSION   (1 << 8)
 Omit the version string from the (footprint) sexpr group.
 
#define CTL_FOR_CLIPBOARD   (CTL_OMIT_INITIAL_COMMENTS)
 Format output for the clipboard instead of footprint library or BOARD.
 
#define CTL_FOR_LIBRARY    ( CTL_OMIT_PAD_NETS | CTL_OMIT_UUIDS | CTL_OMIT_PATH | CTL_OMIT_AT | CTL_OMIT_LIBNAME )
 Format output for a footprint library instead of clipboard or BOARD.
 
#define CTL_FOR_BOARD   (CTL_OMIT_INITIAL_COMMENTS|CTL_OMIT_FOOTPRINT_VERSION)
 The zero arg constructor when PCB_PLUGIN is used for PLUGIN::Load() and PLUGIN::Save()ing a BOARD file underneath IO_MGR.
 

Typedefs

typedef boost::ptr_map< wxString, FP_CACHE_ITEMFP_CACHE_FOOTPRINT_MAP
 

Macro Definition Documentation

◆ BOARD_FILE_HOST_VERSION

#define BOARD_FILE_HOST_VERSION   20200825

Earlier files than this include the host tag.

Definition at line 158 of file pcb_io_kicad_sexpr.h.

◆ CTL_FOR_BOARD

The zero arg constructor when PCB_PLUGIN is used for PLUGIN::Load() and PLUGIN::Save()ing a BOARD file underneath IO_MGR.

Definition at line 187 of file pcb_io_kicad_sexpr.h.

◆ CTL_FOR_CLIPBOARD

#define CTL_FOR_CLIPBOARD   (CTL_OMIT_INITIAL_COMMENTS)

Format output for the clipboard instead of footprint library or BOARD.

Definition at line 179 of file pcb_io_kicad_sexpr.h.

◆ CTL_FOR_LIBRARY

#define CTL_FOR_LIBRARY    ( CTL_OMIT_PAD_NETS | CTL_OMIT_UUIDS | CTL_OMIT_PATH | CTL_OMIT_AT | CTL_OMIT_LIBNAME )

Format output for a footprint library instead of clipboard or BOARD.

Definition at line 182 of file pcb_io_kicad_sexpr.h.

◆ CTL_OMIT_AT

#define CTL_OMIT_AT   (1 << 5)

Omit position and rotation.

(always saved with position 0,0 and rotation = 0 in library).

Definition at line 169 of file pcb_io_kicad_sexpr.h.

◆ CTL_OMIT_FOOTPRINT_VERSION

#define CTL_OMIT_FOOTPRINT_VERSION   (1 << 8)

Omit the version string from the (footprint) sexpr group.

Definition at line 174 of file pcb_io_kicad_sexpr.h.

◆ CTL_OMIT_INITIAL_COMMENTS

#define CTL_OMIT_INITIAL_COMMENTS   (1 << 3)

omit FOOTPRINT initial comments

Definition at line 166 of file pcb_io_kicad_sexpr.h.

◆ CTL_OMIT_LIBNAME

#define CTL_OMIT_LIBNAME   (1 << 7)

Omit lib alias when saving (used for board/not library).

Definition at line 172 of file pcb_io_kicad_sexpr.h.

◆ CTL_OMIT_PAD_NETS

#define CTL_OMIT_PAD_NETS   (1 << 1)

Omit pads net names (useless in library)

Definition at line 164 of file pcb_io_kicad_sexpr.h.

◆ CTL_OMIT_PATH

#define CTL_OMIT_PATH   (1 << 4)

Omit component sheet time stamp (useless in library)

Definition at line 167 of file pcb_io_kicad_sexpr.h.

◆ CTL_OMIT_UUIDS

#define CTL_OMIT_UUIDS   (1 << 2)

Omit component unique ids (useless in library)

Definition at line 165 of file pcb_io_kicad_sexpr.h.

◆ FIRST_NORMALIZED_VERISON

#define FIRST_NORMALIZED_VERISON   20230924

Earlier files did not have normalized bools.

Definition at line 162 of file pcb_io_kicad_sexpr.h.

◆ LEGACY_ARC_FORMATTING

#define LEGACY_ARC_FORMATTING   20210925

These were the last to use old arc formatting.

Definition at line 159 of file pcb_io_kicad_sexpr.h.

◆ LEGACY_NET_TIES

#define LEGACY_NET_TIES   20220815

These were the last to use the keywords field to indicate a net-tie.

Definition at line 161 of file pcb_io_kicad_sexpr.h.

◆ SEXPR_BOARD_FILE_VERSION

#define SEXPR_BOARD_FILE_VERSION   20240225

Current s-expression file format version. 2 was the last legacy format version.

Definition at line 156 of file pcb_io_kicad_sexpr.h.

Typedef Documentation

◆ FP_CACHE_FOOTPRINT_MAP

typedef boost::ptr_map<wxString, FP_CACHE_ITEM> FP_CACHE_FOOTPRINT_MAP

Definition at line 210 of file pcb_io_kicad_sexpr.h.