mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-20 00:21:31 +00:00
Fix kicommon exports
This commit is contained in:
parent
00f2e56e51
commit
aceca713d8
@ -477,8 +477,6 @@ set( PLOTTERS_CONTROL_SRCS
|
||||
)
|
||||
|
||||
set( COMMON_IO_SRCS
|
||||
io/io_base.cpp
|
||||
io/io_utils.cpp
|
||||
|
||||
# Altium
|
||||
io/altium/altium_binary_parser.cpp
|
||||
|
@ -28,6 +28,8 @@
|
||||
|
||||
namespace IO_UTILS
|
||||
{
|
||||
const std::vector<uint8_t> COMPOUND_FILE_HEADER = { 0xD0, 0xCF, 0x11, 0xE0,
|
||||
0xA1, 0xB1, 0x1A, 0xE1 };
|
||||
|
||||
bool fileStartsWithPrefix( const wxString& aFilePath, const wxString& aPrefix,
|
||||
bool aIgnoreWhitespace )
|
||||
|
@ -24,6 +24,7 @@
|
||||
#ifndef IO_UTILS_H
|
||||
#define IO_UTILS_H
|
||||
|
||||
#include <kicommon.h>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
@ -32,7 +33,7 @@
|
||||
namespace IO_UTILS
|
||||
{
|
||||
|
||||
static const std::vector<uint8_t> COMPOUND_FILE_HEADER{ 0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1};
|
||||
extern KICOMMON_API const std::vector<uint8_t> COMPOUND_FILE_HEADER;
|
||||
|
||||
/**
|
||||
* Check if a file starts with a defined string
|
||||
@ -40,14 +41,15 @@ static const std::vector<uint8_t> COMPOUND_FILE_HEADER{ 0xD0, 0xCF, 0x11, 0xE0,
|
||||
* @param aPrefix prefix string which should match with the initial characters in the file
|
||||
* @param aIgnoreWhitespace true if whitespace characters should be ignored before the prefix
|
||||
*/
|
||||
bool fileStartsWithPrefix( const wxString& aFilePath, const wxString& aPrefix, bool aIgnoreWhitespace );
|
||||
KICOMMON_API bool fileStartsWithPrefix( const wxString& aFilePath, const wxString& aPrefix, bool aIgnoreWhitespace );
|
||||
|
||||
/**
|
||||
* Check if a file starts with a defined binary header
|
||||
* @param aFilePath path to the file where we want to check the prefix
|
||||
* @param aHeader vector of bytes which need to match with the start of the file
|
||||
*/
|
||||
bool fileStartsWithBinaryHeader( const wxString& aFilePath, const std::vector<uint8_t>& aHeader );
|
||||
KICOMMON_API bool fileStartsWithBinaryHeader( const wxString& aFilePath,
|
||||
const std::vector<uint8_t>& aHeader );
|
||||
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ public:
|
||||
/**
|
||||
* Container that describes file type info
|
||||
*/
|
||||
struct IO_FILE_DESC
|
||||
struct KICOMMON_API IO_FILE_DESC
|
||||
{
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user