KiCad PCB EDA Suite
Loading...
Searching...
No Matches
IO_BASE::IO_FILE_DESC Struct Reference

Container that describes file type info. More...

#include <io_base.h>

Public Member Functions

 IO_FILE_DESC (const wxString &aDescription, const std::vector< std::string > &aFileExtensions, const std::vector< std::string > &aExtsInFolder={}, bool aIsFile=true, bool aCanRead=true, bool aCanWrite=true)
 
 IO_FILE_DESC ()
 
wxString FileFilter () const
 
 operator bool () const
 

Public Attributes

wxString m_Description
 Description shown in the file picker dialog.
 
std::vector< std::string > m_FileExtensions
 Filter used for file pickers if m_IsFile is true.
 
std::vector< std::string > m_ExtensionsInDir
 In case of folders: extensions of files inside.
 
bool m_IsFile
 Whether the library is a folder or a file.
 
bool m_CanRead
 Whether the IO can read this file type.
 
bool m_CanWrite
 Whether the IO can write this file type.
 

Detailed Description

Container that describes file type info.

Definition at line 38 of file io_base.h.

Constructor & Destructor Documentation

◆ IO_FILE_DESC() [1/2]

IO_BASE::IO_FILE_DESC::IO_FILE_DESC ( const wxString &  aDescription,
const std::vector< std::string > &  aFileExtensions,
const std::vector< std::string > &  aExtsInFolder = {},
bool  aIsFile = true,
bool  aCanRead = true,
bool  aCanWrite = true 
)
inline

Definition at line 47 of file io_base.h.

◆ IO_FILE_DESC() [2/2]

IO_BASE::IO_FILE_DESC::IO_FILE_DESC ( )
inline

Definition at line 56 of file io_base.h.

Member Function Documentation

◆ FileFilter()

◆ operator bool()

IO_BASE::IO_FILE_DESC::operator bool ( ) const
inline

Definition at line 63 of file io_base.h.

References m_Description.

Member Data Documentation

◆ m_CanRead

bool IO_BASE::IO_FILE_DESC::m_CanRead

Whether the IO can read this file type.

Definition at line 44 of file io_base.h.

Referenced by AskLoadBoardFileName(), and SCH_EDIT_FRAME::OnImportProject().

◆ m_CanWrite

bool IO_BASE::IO_FILE_DESC::m_CanWrite

Whether the IO can write this file type.

Definition at line 45 of file io_base.h.

◆ m_Description

wxString IO_BASE::IO_FILE_DESC::m_Description

Description shown in the file picker dialog.

Definition at line 40 of file io_base.h.

Referenced by FileFilter(), and operator bool().

◆ m_ExtensionsInDir

std::vector<std::string> IO_BASE::IO_FILE_DESC::m_ExtensionsInDir

In case of folders: extensions of files inside.

Definition at line 42 of file io_base.h.

Referenced by IO_BASE::CanReadLibrary().

◆ m_FileExtensions

◆ m_IsFile

bool IO_BASE::IO_FILE_DESC::m_IsFile

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