KiCad PCB EDA Suite
Loading...
Searching...
No Matches
FILE_LIB_TABLE_IO Class Reference

Implementations of LIB_TABLE_IO for file-based I/O. More...

#include <lib_table_base.h>

Inheritance diagram for FILE_LIB_TABLE_IO:
LIB_TABLE_IO

Public Member Functions

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

Detailed Description

Implementations of LIB_TABLE_IO for file-based I/O.

This is the default implementation for real usage.

Definition at line 105 of file lib_table_base.h.

Constructor & Destructor Documentation

◆ FILE_LIB_TABLE_IO()

FILE_LIB_TABLE_IO::FILE_LIB_TABLE_IO ( )
default

Member Function Documentation

◆ CanSaveToUri()

bool FILE_LIB_TABLE_IO::CanSaveToUri ( const wxString &  aURI) const
overridevirtual

Check if the given URI is writable.

Implements LIB_TABLE_IO.

Definition at line 53 of file lib_table_base.cpp.

◆ GetReader()

std::unique_ptr< LINE_READER > FILE_LIB_TABLE_IO::GetReader ( const wxString &  aURI) const
overridevirtual

Create a reader for the given URI.

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

Implements LIB_TABLE_IO.

Definition at line 43 of file lib_table_base.cpp.

◆ GetWriter()

std::unique_ptr< OUTPUTFORMATTER > FILE_LIB_TABLE_IO::GetWriter ( const wxString &  aURI) const
overridevirtual

Save the given table to the given URI.

Implements LIB_TABLE_IO.

Definition at line 85 of file lib_table_base.cpp.

◆ UrisAreEquivalent()

bool FILE_LIB_TABLE_IO::UrisAreEquivalent ( const wxString &  aURI1,
const wxString &  aURI2 
) const
overridevirtual

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)

Implements LIB_TABLE_IO.

Definition at line 63 of file lib_table_base.cpp.


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