Low hanging fruit to kicommon

This commit is contained in:
Marek Roszko 2023-09-10 14:41:18 -04:00
parent a4bf2ff41d
commit 66021f0657
4 changed files with 11 additions and 8 deletions

View File

@ -43,6 +43,9 @@ add_library( singletop STATIC EXCLUDE_FROM_ALL
# Functions and data all need to use the #include <import_export.h> and be declared # Functions and data all need to use the #include <import_export.h> and be declared
# as APIEXPORT # as APIEXPORT
set( KICOMMON_SRCS set( KICOMMON_SRCS
asset_archive.cpp
array_axis.cpp
array_options.cpp
exceptions.cpp exceptions.cpp
lib_id.cpp lib_id.cpp
locale_io.cpp locale_io.cpp
@ -351,9 +354,6 @@ set( COMMON_SRCS
${COMMON_IMPORT_GFX_SRCS} ${COMMON_IMPORT_GFX_SRCS}
jobs/job_dispatcher.cpp jobs/job_dispatcher.cpp
advanced_config.cpp advanced_config.cpp
array_axis.cpp
array_options.cpp
asset_archive.cpp
background_jobs_monitor.cpp background_jobs_monitor.cpp
base_screen.cpp base_screen.cpp
bin_mod.cpp bin_mod.cpp

View File

@ -24,6 +24,7 @@
#ifndef ARRAY_AXIS__H #ifndef ARRAY_AXIS__H
#define ARRAY_AXIS__H #define ARRAY_AXIS__H
#include <kicommon.h>
#include <optional> #include <optional>
#include <wx/string.h> #include <wx/string.h>
@ -35,7 +36,7 @@
* For example, a rectangular grid has two axes, X and Y, but a circular array * For example, a rectangular grid has two axes, X and Y, but a circular array
* has only one, that runs around the circle. * has only one, that runs around the circle.
*/ */
class ARRAY_AXIS class KICOMMON_API ARRAY_AXIS
{ {
public: public:
enum NUMBERING_TYPE enum NUMBERING_TYPE

View File

@ -24,6 +24,7 @@
#ifndef PCBNEW_ARRAY_OPTIONS__H #ifndef PCBNEW_ARRAY_OPTIONS__H
#define PCBNEW_ARRAY_OPTIONS__H #define PCBNEW_ARRAY_OPTIONS__H
#include <kicommon.h>
#include <math/vector2d.h> #include <math/vector2d.h>
#include <array_axis.h> #include <array_axis.h>
#include <geometry/eda_angle.h> #include <geometry/eda_angle.h>
@ -33,7 +34,7 @@
* The base #ARRAY_OPTIONS do not encode a specific geometry or numbering * The base #ARRAY_OPTIONS do not encode a specific geometry or numbering
* method, this is done by derived classes. * method, this is done by derived classes.
*/ */
class ARRAY_OPTIONS class KICOMMON_API ARRAY_OPTIONS
{ {
public: public:
enum ARRAY_TYPE_T enum ARRAY_TYPE_T
@ -140,7 +141,7 @@ protected:
}; };
struct ARRAY_GRID_OPTIONS : public ARRAY_OPTIONS struct KICOMMON_API ARRAY_GRID_OPTIONS : public ARRAY_OPTIONS
{ {
ARRAY_GRID_OPTIONS() ARRAY_GRID_OPTIONS()
: ARRAY_OPTIONS( ARRAY_GRID ), : ARRAY_OPTIONS( ARRAY_GRID ),
@ -172,7 +173,7 @@ private:
}; };
struct ARRAY_CIRCULAR_OPTIONS : public ARRAY_OPTIONS struct KICOMMON_API ARRAY_CIRCULAR_OPTIONS : public ARRAY_OPTIONS
{ {
ARRAY_CIRCULAR_OPTIONS() ARRAY_CIRCULAR_OPTIONS()
: ARRAY_OPTIONS( ARRAY_CIRCULAR ), : ARRAY_OPTIONS( ARRAY_CIRCULAR ),

View File

@ -20,6 +20,7 @@
#ifndef KICAD_ASSET_ARCHIVE_H #ifndef KICAD_ASSET_ARCHIVE_H
#define KICAD_ASSET_ARCHIVE_H #define KICAD_ASSET_ARCHIVE_H
#include <kicommon.h>
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
@ -32,7 +33,7 @@
* The entire contents of the archive will be uncompressed and kept resident in memory in the * The entire contents of the archive will be uncompressed and kept resident in memory in the
* current implementation, so consider this before reusing this as-is for new use cases. * current implementation, so consider this before reusing this as-is for new use cases.
*/ */
class ASSET_ARCHIVE class KICOMMON_API ASSET_ARCHIVE
{ {
public: public:
ASSET_ARCHIVE( const wxString& aFilePath, bool aLoadNow = true ); ASSET_ARCHIVE( const wxString& aFilePath, bool aLoadNow = true );