KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_io_kicad_legacy_lib_cache.cpp File Reference
#include <magic_enum.hpp>
#include <wx/log.h>
#include <lib_symbol.h>
#include <sch_shape.h>
#include <sch_pin.h>
#include <sch_text.h>
#include <macros.h>
#include <richio.h>
#include <string_utils.h>
#include <template_fieldnames.h>
#include <trace_helpers.h>
#include <wildcards_and_files_ext.h>
#include "sch_io_kicad_legacy_lib_cache.h"
#include "sch_io_kicad_legacy_helpers.h"

Go to the source code of this file.

Macros

#define LIB_VERSION_MAJOR   2
 Legacy symbol library major version.
 
#define LIB_VERSION_MINOR   4
 Legacy symbol library minor version.
 
#define LIB_VERSION(major, minor)   ( major * 100 + minor )
 
#define LIBFILE_IDENT   "EESchema-LIBRARY Version"
 Legacy symbol library (.lib) file header.
 
#define DOCFILE_IDENT   "EESchema-DOCLIB Version 2.0"
 Legacy symbol library document (.dcm) file header.
 
#define USE_OLD_DOC_FILE_FORMAT(major, minor)    ( LIB_VERSION( major, minor ) <= LIB_VERSION( 2, 4 ) )
 Library versions 2.4 and lower use the old separate library (.lib) and document (.dcm) files.
 

Functions

static bool MapAnglesV6 (int *aAngle1, int *aAngle2)
 This function based on version 6.0 is required for reading legacy arcs.
 

Variables

const int fill_tab [3] = { 'N', 'F', 'f' }
 

Macro Definition Documentation

◆ DOCFILE_IDENT

#define DOCFILE_IDENT   "EESchema-DOCLIB Version 2.0"

Legacy symbol library document (.dcm) file header.

Definition at line 47 of file sch_io_kicad_legacy_lib_cache.cpp.

◆ LIB_VERSION

#define LIB_VERSION (   major,
  minor 
)    ( major * 100 + minor )

Definition at line 41 of file sch_io_kicad_legacy_lib_cache.cpp.

◆ LIB_VERSION_MAJOR

#define LIB_VERSION_MAJOR   2

Legacy symbol library major version.

Definition at line 38 of file sch_io_kicad_legacy_lib_cache.cpp.

◆ LIB_VERSION_MINOR

#define LIB_VERSION_MINOR   4

Legacy symbol library minor version.

Definition at line 39 of file sch_io_kicad_legacy_lib_cache.cpp.

◆ LIBFILE_IDENT

#define LIBFILE_IDENT   "EESchema-LIBRARY Version"

Legacy symbol library (.lib) file header.

Definition at line 44 of file sch_io_kicad_legacy_lib_cache.cpp.

◆ USE_OLD_DOC_FILE_FORMAT

#define USE_OLD_DOC_FILE_FORMAT (   major,
  minor 
)     ( LIB_VERSION( major, minor ) <= LIB_VERSION( 2, 4 ) )

Library versions 2.4 and lower use the old separate library (.lib) and document (.dcm) files.

Symbol libraries after 2.4 merged the library and document files into a single library file. This macro checks if the library version supports the old format.

Definition at line 55 of file sch_io_kicad_legacy_lib_cache.cpp.

Function Documentation

◆ MapAnglesV6()

static bool MapAnglesV6 ( int *  aAngle1,
int *  aAngle2 
)
static

This function based on version 6.0 is required for reading legacy arcs.

Changing it in any way will likely break arcs.

Definition at line 779 of file sch_io_kicad_legacy_lib_cache.cpp.

References delta, KiROUND(), NORMALIZE_ANGLE_POS(), RAD2DECIDEG(), and swap.

Referenced by SCH_IO_KICAD_LEGACY_LIB_CACHE::loadArc().

Variable Documentation

◆ fill_tab