KiCad PCB EDA Suite
Loading...
Searching...
No Matches
lib_id.cpp File Reference
#include <cstring>
#include <memory>
#include <wx/translation.h>
#include <fmt/format.h>
#include <ki_exception.h>
#include <macros.h>
#include <lib_id.h>
#include <name_validation.h>

Go to the source code of this file.

Functions

const wxString & GetLibIdForbiddenChars ()
 Characters illegal in a LIB_ID item name.
 
const wxString & GetLibFilenameForbiddenChars ()
 Characters illegal in a footprint library filename.
 
static int checkLibNickname (const UTF8 &aField)
 

Function Documentation

◆ checkLibNickname()

static int checkLibNickname ( const UTF8 & aField)
static

Definition at line 49 of file lib_id.cpp.

References UTF8::find_first_of().

Referenced by LIB_ID::Format(), and LIB_ID::SetLibNickname().

◆ GetLibFilenameForbiddenChars()

const wxString & GetLibFilenameForbiddenChars ( )

Characters illegal in a footprint library filename.

This is the LIB_ID set plus the path and format characters that a name may contain but a filename may not.

Definition at line 40 of file lib_id.cpp.

References GetLibIdForbiddenChars().

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), FOOTPRINT_NAME_VALIDATOR::FOOTPRINT_NAME_VALIDATOR(), and FOOTPRINT::StringLibNameInvalidChars().

◆ GetLibIdForbiddenChars()

const wxString & GetLibIdForbiddenChars ( )

Characters illegal in a LIB_ID item name.

Library nicknames use a different set (isLegalLibraryNameChar) and are not covered here.

Definition at line 33 of file lib_id.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), GetLibFilenameForbiddenChars(), and LIB_ID::isLegalChar().