KiCad PCB EDA Suite
Loading...
Searching...
No Matches
LIB_TABLE_IO Class Referenceabstract

LIB_TABLE_IO abstracts the file I/O operations for the library table loading and saving. More...

#include <lib_table_base.h>

Inheritance diagram for LIB_TABLE_IO:
FILE_LIB_TABLE_IO

Public Member Functions

virtual ~LIB_TABLE_IO ()=default
 
virtual std::unique_ptr< LINE_READERGetReader (const wxString &aURI) const =0
 Create a reader for the given URI.
 
virtual bool CanSaveToUri (const wxString &aURI) const =0
 Check if the given URI is writable.
 
virtual bool UrisAreEquivalent (const wxString &aURI1, const wxString &aURI2) const =0
 Compare two URIs for equivalence.
 
virtual std::unique_ptr< OUTPUTFORMATTERGetWriter (const wxString &aURI) const =0
 Save the given table to the given URI.
 

Detailed Description

LIB_TABLE_IO abstracts the file I/O operations for the library table loading and saving.

Normally, this is file-based-reading, but that's not a requirement.

Definition at line 67 of file lib_table_base.h.

Constructor & Destructor Documentation

◆ ~LIB_TABLE_IO()

virtual LIB_TABLE_IO::~LIB_TABLE_IO ( )
virtualdefault

Member Function Documentation

◆ CanSaveToUri()

virtual bool LIB_TABLE_IO::CanSaveToUri ( const wxString &  aURI) const
pure virtual

Check if the given URI is writable.

Implemented in FILE_LIB_TABLE_IO.

◆ GetReader()

virtual std::unique_ptr< LINE_READER > LIB_TABLE_IO::GetReader ( const wxString &  aURI) const
pure virtual

Create a reader for the given URI.

This can return nullptr, for example if the URI is not a file or is not readable.

Implemented in FILE_LIB_TABLE_IO.

◆ GetWriter()

virtual std::unique_ptr< OUTPUTFORMATTER > LIB_TABLE_IO::GetWriter ( const wxString &  aURI) const
pure virtual

Save the given table to the given URI.

Implemented in FILE_LIB_TABLE_IO.

◆ UrisAreEquivalent()

virtual bool LIB_TABLE_IO::UrisAreEquivalent ( const wxString &  aURI1,
const wxString &  aURI2 
) const
pure virtual

Compare two URIs for equivalence.

For example, two URIs that point to the same file should be considered equivalent, even if they are not string-wise equal (e.g. symlinks)

Implemented in FILE_LIB_TABLE_IO.


The documentation for this class was generated from the following file: