70 LIB_ID(
const wxString& aLibraryName,
const wxString& aItemName,
71 const wxString& aRevision = wxEmptyString );
87 int Parse(
const UTF8& aId,
bool aFix =
false );
154 const UTF8& aRevision =
"" );
An 8 bit string that is assuredly encoded in UTF8, and supplies special conversion support to and fro...
const UTF8 & GetLibItemName() const
static UTF8 FixIllegalChars(const UTF8 &aLibItemName, bool aLib=false)
Replace illegal LIB_ID item name characters with underscores '_'.
UTF8 m_revision
The revision of the entry.
A logical library item identifier and consists of various portions much like a URI.
bool IsValid() const
Check if this LID_ID is valid.
static bool isLegalLibraryNameChar(unsigned aUniChar)
Tests whether a Unicode character is a legal LIB_ID library nickname character.
static bool isLegalChar(unsigned aUniChar)
Tests whether a Unicode character is a legal LIB_ID item name character.
int compare(const LIB_ID &aLibId) const
Compare the contents of LIB_ID objects by performing a std::string comparison of the library nickname...
UTF8 GetLibItemNameAndRev() const
bool operator !=(const LIB_ID &aLibId) const
int SetRevision(const UTF8 &aRevision)
bool operator >(const LIB_ID &aLibId) const
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
void clear()
Clear the contents of the library nickname, library entry name, and revision strings.
UTF8 m_libraryName
The nickname of the library or empty.
int SetLibItemName(const UTF8 &aLibItemName, bool aTestForRev=true)
Override the library item name portion of the LIB_ID to aLibItemName.
int SetLibNickname(const UTF8 &aNickname)
Override the logical library name portion of the LIB_ID to aNickname.
const UTF8 & GetRevision() const
int Parse(const UTF8 &aId, bool aFix=false)
Parse LIB_ID with the information from aId.
static int HasIllegalChars(const UTF8 &aLibItemName)
Examine aLibItemName for invalid LIB_ID item name characters.
bool operator<(const LIB_ID &aLibId) const
UTF8 m_itemName
The name of the entry in the logical library.
wxString GetUniStringLibId() const
const wxString GetUniStringLibItemName() const
Get strings for display messages in dialogs.
bool operator==(const LIB_ID &aLibId) const
static unsigned FindIllegalLibraryNameChar(const UTF8 &aLibraryName)
Looks for characters that are illegal in library nicknames.