Ticket #69869: broken-rtti.patch

File broken-rtti.patch, 38.1 KB (added by cdavis5e (Chip Davis), 4 months ago)

Patch to fix broken RTTI references in KiCad

  • include/ki_exception.h

    Fix broken RTTI references that cause crashes at run time
    old new  
    2525#ifndef KI_EXCEPTION_H_
    2626#define KI_EXCEPTION_H_
    2727
     28#include <import_export.h>
    2829#include <wx/string.h>
    2930
    3031
     
    4142 * Hold a translatable error message and may be used when throwing exceptions containing a
    4243 * translated error message.
    4344 */
    44 class KI_PARAM_ERROR // similar to std::invalid_argument for instance
     45class MY_TYPE KI_PARAM_ERROR // similar to std::invalid_argument for instance
    4546{
    4647public:
    4748    /**
     
    7273 *
    7374 * @author Dick Hollenbeck
    7475 */
    75 class IO_ERROR // : std::exception
     76class MY_TYPE IO_ERROR // : std::exception
    7677{
    7778public:
    7879    /**
     
    115116 *
    116117 * @author Dick Hollenbeck
    117118 */
    118 struct PARSE_ERROR : public IO_ERROR
     119struct MY_TYPE PARSE_ERROR : public IO_ERROR
    119120{
    120121    int         lineNumber;     ///< at which line number, 1 based index.
    121122    int         byteIndex;      ///< at which byte offset within the line, 1 based index
     
    171172 * by a file generated by a newer version of KiCad than this. This can be used to generate
    172173 * more informative error messages.
    173174 */
    174 struct FUTURE_FORMAT_ERROR : public PARSE_ERROR
     175struct MY_TYPE FUTURE_FORMAT_ERROR : public PARSE_ERROR
    175176{
    176177    wxString requiredVersion;   ///< version or date of KiCad required to open file
    177178
  • include/settings/kicad_settings.h

    old new  
    2121#ifndef _KICAD_SETTINGS_H
    2222#define _KICAD_SETTINGS_H
    2323
     24#include <import_export.h>
    2425#include <settings/app_settings.h>
    2526#define PCM_DEFAULT_REPOSITORY_URL "https://repository.kicad.org/repository.json"
    2627
    2728
    28 class KICAD_SETTINGS : public APP_SETTINGS_BASE
     29class MY_TYPE KICAD_SETTINGS : public APP_SETTINGS_BASE
    2930{
    3031public:
    3132    KICAD_SETTINGS();
  • include/settings/app_settings.h

    old new  
    2121#ifndef _APP_SETTINGS_H
    2222#define _APP_SETTINGS_H
    2323
     24#include <import_export.h>
    2425#include <gal/color4d.h>
    2526#include <settings/json_settings.h>
    2627
     
    106107 *
    107108 * COMMON_SETTINGS stores settings that are always the same across all applications.
    108109 */
    109 class APP_SETTINGS_BASE : public JSON_SETTINGS
     110class MY_TYPE APP_SETTINGS_BASE : public JSON_SETTINGS
    110111{
    111112public:
    112113    struct FIND_REPLACE
  • include/settings/color_settings.h

    old new  
    2323
    2424#include <unordered_map>
    2525
     26#include <import_export.h>
    2627#include <gal/color4d.h>
    2728#include <settings/json_settings.h>
    2829#include <settings/parameters.h>
     
    4849 * Each application (eeschema, gerbview, pcbnew) can have a different active color scheme selected.
    4950 * The "child applications" (library editors) inherit from either eeschema or pcbnew.
    5051 */
    51 class COLOR_SETTINGS : public JSON_SETTINGS
     52class MY_TYPE COLOR_SETTINGS : public JSON_SETTINGS
    5253{
    5354public:
    5455    explicit COLOR_SETTINGS( const wxString& aFilename = wxT( "user" ),
     
    113114    std::unordered_map<int, COLOR4D> m_defaultColors;
    114115};
    115116
    116 class COLOR_MAP_PARAM : public PARAM_BASE
     117class MY_TYPE COLOR_MAP_PARAM : public PARAM_BASE
    117118{
    118119public:
    119120    COLOR_MAP_PARAM( const std::string& aJsonPath, int aMapKey, COLOR4D aDefault,
  • include/settings/common_settings.h

    old new  
    2121#ifndef _COMMON_SETTINGS_H
    2222#define _COMMON_SETTINGS_H
    2323
     24#include <import_export.h>
    2425#include <settings/environment.h>
    2526#include <settings/json_settings.h>
    2627
     
    4445};
    4546
    4647
    47 class COMMON_SETTINGS : public JSON_SETTINGS
     48class MY_TYPE COMMON_SETTINGS : public JSON_SETTINGS
    4849{
    4950public:
    5051    struct APPEARANCE
  • include/settings/cvpcb_settings.h

    old new  
    2424#ifndef _CVPCB_SETTINGS_H
    2525#define _CVPCB_SETTINGS_H
    2626
     27#include <import_export.h>
    2728#include <pcb_display_options.h>
    2829#include <pcbnew_settings.h>
    2930#include <settings/app_settings.h>
    3031
    31 class CVPCB_SETTINGS : public PCB_VIEWERS_SETTINGS_BASE
     32class MY_TYPE CVPCB_SETTINGS : public PCB_VIEWERS_SETTINGS_BASE
    3233{
    3334public:
    3435    CVPCB_SETTINGS();
  • include/eda_search_data.h

    old new  
    2424#ifndef EDA_ITEM_SEARCH_H
    2525#define EDA_ITEM_SEARCH_H
    2626
     27#include <import_export.h>
    2728#include <wx/string.h>
    2829
    2930enum class EDA_SEARCH_MATCH_MODE
     
    3334    WILDCARD
    3435};
    3536
    36 struct EDA_SEARCH_DATA
     37struct MY_TYPE EDA_SEARCH_DATA
    3738{
    3839    wxString findString;
    3940    wxString replaceString;
     
    5758    virtual ~EDA_SEARCH_DATA() {}
    5859};
    5960
    60 struct SCH_SEARCH_DATA : public EDA_SEARCH_DATA
     61struct MY_TYPE SCH_SEARCH_DATA : public EDA_SEARCH_DATA
    6162{
    6263    bool searchAllFields;
    6364    bool searchAllPins;
     
    7575    }
    7676};
    7777
    78 #endif
    79  No newline at end of file
     78#endif
  • include/lib_table_base.h

    old new  
    3232#include <memory>
    3333#include <mutex>
    3434#include <shared_mutex>
     35#include <import_export.h>
    3536#include <project.h>
    3637#include <string_utf8_map.h>
    3738#include <richio.h>
     
    6263 * Hold a record identifying a library accessed by the appropriate plug in object in the
    6364 * #LIB_TABLE.  This is an abstract base class from which to derive library specific rows.
    6465 */
    65 class LIB_TABLE_ROW : boost::noncopyable
     66class MY_TYPE LIB_TABLE_ROW : boost::noncopyable
    6667{
    6768public:
    6869    LIB_TABLE_ROW() :
     
    286287 *
    287288 * @author Wayne Stambaugh
    288289 */
    289 class LIB_TABLE : public PROJECT::_ELEM
     290class MY_TYPE LIB_TABLE : public PROJECT::_ELEM
    290291{
    291292public:
    292293    /**
  • include/dialog_shim.h

    old new  
    2626#define DIALOG_SHIM_
    2727
    2828#include <wx/dialog.h>
     29#include <import_export.h>
    2930#include <kiway_player.h>
    3031class wxGridEvent;
    3132
     
    7980 * <br>
    8081 * in the dialog window's properties.
    8182 */
    82 class DIALOG_SHIM : public wxDialog, public KIWAY_HOLDER
     83class MY_TYPE DIALOG_SHIM : public wxDialog, public KIWAY_HOLDER
    8384{
    8485public:
    8586    DIALOG_SHIM( wxWindow* aParent, wxWindowID id, const wxString& title,
  • include/import_export.h

    old new  
    5454#else
    5555 #define MY_API(rettype)    APIIMPORT   rettype
    5656#endif
     57// For types used in multiple DSOs where the typeinfo symbols must be weak defs,
     58// or bad things happen at run time.
     59#if defined(_WIN32) || defined(SWIG)
     60 #define MY_TYPE
     61#elif defined(__has_attribute) && __has_attribute(type_visibility)
     62 #define MY_TYPE           __attribute__((type_visibility("default"), weak))
     63#else
     64 #define MY_TYPE           APIEXPORT __attribute__((weak))
     65#endif
    5766
    5867#define MY_LOCAL(rettype)   APILOCAL    rettype
    5968
  • include/board_printout.h

    old new  
    2929#define BOARD_PRINTOUT_H
    3030
    3131#include <wx/print.h>
     32#include <import_export.h>
    3233#include <layer_ids.h>
    3334#include <printout.h>
    3435#include <math/box2.h>
     
    4344};
    4445
    4546
    46 struct BOARD_PRINTOUT_SETTINGS : public PRINTOUT_SETTINGS
     47struct MY_TYPE BOARD_PRINTOUT_SETTINGS : public PRINTOUT_SETTINGS
    4748{
    4849    BOARD_PRINTOUT_SETTINGS( const PAGE_INFO& aPageInfo );
    4950
     
    6364 * An object derived from wxPrintout to handle the necessary information to control a printer
    6465 * when printing a board.
    6566 */
    66 class BOARD_PRINTOUT : public wxPrintout
     67class MY_TYPE BOARD_PRINTOUT : public wxPrintout
    6768{
    6869public:
    6970    BOARD_PRINTOUT( const BOARD_PRINTOUT_SETTINGS& aParams, const KIGFX::VIEW* aView,
  • include/drawing_sheet/ds_draw_item.h

    old new  
    2727
    2828#include <core/typeinfo.h>
    2929#include <math/vector2d.h>
     30#include <import_export.h>
    3031#include <eda_text.h>
    3132#include "widgets/msgpanel.h"
    3233#include <geometry/shape_poly_set.h>
     
    5556 *  - bitmaps (also for logos, but they cannot be plot by SVG, GERBER or HPGL plotters
    5657 *    where we just plot the bounding box)
    5758 */
    58 class DS_DRAW_ITEM_BASE : public EDA_ITEM
     59class MY_TYPE DS_DRAW_ITEM_BASE : public EDA_ITEM
    5960{
    6061public:
    6162    virtual ~DS_DRAW_ITEM_BASE() {}
     
    124125
    125126
    126127// This class draws a thick segment
    127 class DS_DRAW_ITEM_LINE : public DS_DRAW_ITEM_BASE
     128class MY_TYPE DS_DRAW_ITEM_LINE : public DS_DRAW_ITEM_BASE
    128129{
    129130public:
    130131    DS_DRAW_ITEM_LINE( DS_DATA_ITEM* aPeer, int aIndex, VECTOR2I aStart, VECTOR2I aEnd,
     
    164165};
    165166
    166167
    167 class DS_DRAW_ITEM_POLYPOLYGONS : public DS_DRAW_ITEM_BASE
     168class MY_TYPE DS_DRAW_ITEM_POLYPOLYGONS : public DS_DRAW_ITEM_BASE
    168169{
    169170public:
    170171    DS_DRAW_ITEM_POLYPOLYGONS( DS_DATA_ITEM* aPeer, int aIndex, VECTOR2I aPos, int aPenWidth ) :
     
    212213/**
    213214 * Non filled rectangle with thick segment.
    214215 */
    215 class DS_DRAW_ITEM_RECT : public DS_DRAW_ITEM_BASE
     216class MY_TYPE DS_DRAW_ITEM_RECT : public DS_DRAW_ITEM_BASE
    216217{
    217218public:
    218219    DS_DRAW_ITEM_RECT( DS_DATA_ITEM* aPeer, int aIndex, VECTOR2I aStart, VECTOR2I aEnd,
     
    260261 * This only a draw item only.  Therefore m_peer ( the parent DS_DATA_ITEM item in the
    261262 * DS_DATA_MODEL) is always a nullptr.
    262263 */
    263 class DS_DRAW_ITEM_PAGE : public DS_DRAW_ITEM_BASE
     264class MY_TYPE DS_DRAW_ITEM_PAGE : public DS_DRAW_ITEM_BASE
    264265{
    265266public:
    266267    DS_DRAW_ITEM_PAGE( int aPenWidth, double aMarkerSize ) :
     
    307308 * It is derived from an #EDA_TEXT, so it handle all characteristics of this graphic text
    308309 * (justification, rotation ... ).
    309310 */
    310 class DS_DRAW_ITEM_TEXT : public DS_DRAW_ITEM_BASE, public EDA_TEXT
     311class MY_TYPE DS_DRAW_ITEM_TEXT : public DS_DRAW_ITEM_BASE, public EDA_TEXT
    311312{
    312313public:
    313314    DS_DRAW_ITEM_TEXT( DS_DATA_ITEM* aPeer, int aIndex, const wxString& aText, const VECTOR2I& aPos,
     
    351352/**
    352353 * A bitmap.
    353354 */
    354 class DS_DRAW_ITEM_BITMAP : public DS_DRAW_ITEM_BASE
     355class MY_TYPE DS_DRAW_ITEM_BITMAP : public DS_DRAW_ITEM_BASE
    355356{
    356357public:
    357358    DS_DRAW_ITEM_BITMAP( DS_DATA_ITEM* aPeer, int aIndex, VECTOR2I aPos ) :
  • include/fp_lib_table.h

    old new  
    2626#ifndef FP_LIB_TABLE_H_
    2727#define FP_LIB_TABLE_H_
    2828
     29#include <import_export.h>
    2930#include <lib_table_base.h>
    3031#include <io_mgr.h>
    3132
     
    3738 * Hold a record identifying a library accessed by the appropriate footprint library #PLUGIN
    3839 * object in the #FP_LIB_TABLE.
    3940 */
    40 class FP_LIB_TABLE_ROW : public LIB_TABLE_ROW
     41class MY_TYPE FP_LIB_TABLE_ROW : public LIB_TABLE_ROW
    4142{
    4243public:
    4344    typedef IO_MGR::PCB_FILE_T LIB_T;
     
    9394};
    9495
    9596
    96 class FP_LIB_TABLE : public LIB_TABLE
     97class MY_TYPE FP_LIB_TABLE : public LIB_TABLE
    9798{
    9899public:
    99100    KICAD_T Type() override { return FP_LIB_TABLE_T; }
  • include/project/project_file.h

    old new  
    2222#ifndef KICAD_PROJECT_FILE_H
    2323#define KICAD_PROJECT_FILE_H
    2424
     25#include <import_export.h>
    2526#include <common.h> // needed for wxstring hash template
    2627#include <kiid.h>
    2728#include <project/board_project_settings.h>
     
    6263 * There is either zero or one PROJECT_FILE for every PROJECT
    6364 * (you can have a dummy PROJECT that has no file)
    6465 */
    65 class PROJECT_FILE : public JSON_SETTINGS
     66class MY_TYPE PROJECT_FILE : public JSON_SETTINGS
    6667{
    6768public:
    6869    /**
  • include/eda_draw_frame.h

    old new  
    6969 * The Eeschema, Pcbnew and GerbView main windows are just a few examples of classes
    7070 * derived from EDA_DRAW_FRAME.
    7171 */
    72 class EDA_DRAW_FRAME : public KIWAY_PLAYER
     72class MY_TYPE EDA_DRAW_FRAME : public KIWAY_PLAYER
    7373{
    7474public:
    7575    EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType, const wxString& aTitle,
  • include/eda_shape.h

    old new  
    2525#ifndef EDA_SHAPE_H
    2626#define EDA_SHAPE_H
    2727
     28#include <import_export.h>
    2829#include <trigo.h>
    2930#include <geometry/shape_poly_set.h>
    3031#include <geometry/geometry_utils.h>
     
    6869    VECTOR2I center;
    6970};
    7071
    71 class EDA_SHAPE
     72class MY_TYPE EDA_SHAPE
    7273{
    7374public:
    7475    EDA_SHAPE( SHAPE_T aType, int aLineWidth, FILL_T aFill );
  • include/pcb_group.h

    old new  
    3030#ifndef CLASS_PCB_GROUP_H_
    3131#define CLASS_PCB_GROUP_H_
    3232
     33#include <import_export.h>
    3334#include <board_commit.h>
    3435#include <board_item.h>
    3536#include <unordered_set>
     
    4748 * containing a group implicitly contains its members. However other operations on sets of
    4849 * items, like committing, updating the view, etc the set is explicit.
    4950 */
    50 class PCB_GROUP : public BOARD_ITEM
     51class MY_TYPE PCB_GROUP : public BOARD_ITEM
    5152{
    5253public:
    5354    PCB_GROUP( BOARD_ITEM* aParent );
  • include/properties/pg_properties.h

    old new  
    2525#include <wx/propgrid/property.h>
    2626#include <wx/propgrid/props.h>
    2727#include <common.h>
     28#include <import_export.h>
    2829#include <origin_transforms.h>
    2930
    3031class PROPERTY_BASE;
     
    3334wxPGProperty* PGPropertyFactory( const PROPERTY_BASE* aProperty );
    3435
    3536///> Customized abstract wxPGProperty class to handle coordinate/size units
    36 class PGPROPERTY_DISTANCE
     37class MY_TYPE PGPROPERTY_DISTANCE
    3738{
    3839public:
    3940    PGPROPERTY_DISTANCE( const wxString& aRegEx,
     
    5253};
    5354
    5455
    55 class PGPROPERTY_SIZE : public wxUIntProperty, public PGPROPERTY_DISTANCE
     56class MY_TYPE PGPROPERTY_SIZE : public wxUIntProperty, public PGPROPERTY_DISTANCE
    5657{
    5758public:
    5859    PGPROPERTY_SIZE( const wxString& aLabel = wxPG_LABEL, const wxString& aName = wxPG_LABEL,
     
    7273};
    7374
    7475
    75 class PGPROPERTY_COORD : public wxIntProperty, public PGPROPERTY_DISTANCE
     76class MY_TYPE PGPROPERTY_COORD : public wxIntProperty, public PGPROPERTY_DISTANCE
    7677{
    7778public:
    7879    PGPROPERTY_COORD( const wxString& aLabel = wxPG_LABEL, const wxString& aName = wxPG_LABEL,
     
    9495
    9596
    9697///> Customized wxPGProperty class to handle angles
    97 class PGPROPERTY_ANGLE : public wxFloatProperty
     98class MY_TYPE PGPROPERTY_ANGLE : public wxFloatProperty
    9899{
    99100public:
    100101    PGPROPERTY_ANGLE( const wxString& aLabel = wxPG_LABEL, const wxString& aName = wxPG_LABEL,
     
    123124
    124125
    125126///> A wxEnumProperty that displays a color next to the enum value
    126 class PGPROPERTY_COLORENUM : public wxEnumProperty
     127class MY_TYPE PGPROPERTY_COLORENUM : public wxEnumProperty
    127128{
    128129public:
    129130    PGPROPERTY_COLORENUM( const wxString& aLabel, wxString& aName, wxPGChoices* aChoices,
     
    153154};
    154155
    155156
    156 class PGPROPERTY_STRING : public wxStringProperty
     157class MY_TYPE PGPROPERTY_STRING : public wxStringProperty
    157158{
    158159public:
    159160    PGPROPERTY_STRING( const wxString& aLabel = wxPG_LABEL, const wxString& aName = wxPG_LABEL,
     
    170171};
    171172
    172173
    173 class PGPROPERTY_BOOL : public wxBoolProperty
     174class MY_TYPE PGPROPERTY_BOOL : public wxBoolProperty
    174175{
    175176public:
    176177    PGPROPERTY_BOOL( const wxString& aLabel = wxPG_LABEL, const wxString& aName = wxPG_LABEL,
  • include/kiway_express.h

    old new  
    2626#define KIWAY_EXPRESS_H_
    2727
    2828// @see http://wiki.wxwidgets.org/Custom_Events_Tutorial
     29#include <import_export.h>
    2930#include <frame_type.h>
    3031#include <mail_type.h>
    3132#include <wx/string.h>
     
    3536/**
    3637 * Carry a payload from one #KIWAY_PLAYER to another within a #PROJECT.
    3738 */
    38 class KIWAY_EXPRESS : public wxEvent
     39class MY_TYPE KIWAY_EXPRESS : public wxEvent
    3940{
    4041public:
    4142    /**
  • include/eda_text.h

    old new  
    2828#include <memory>
    2929#include <vector>
    3030
     31#include <import_export.h>
    3132#include <outline_mode.h>
    3233#include <eda_search_data.h>
    3334#include <font/glyph.h>
     
    6869 * function names (accessors) that to not collide with function names likely to be seen
    6970 * in the combined derived classes.
    7071 */
    71 class EDA_TEXT
     72class MY_TYPE EDA_TEXT
    7273{
    7374public:
    7475    EDA_TEXT( const EDA_IU_SCALE& aIuScale, const wxString& aText = wxEmptyString );
  • include/gal/hidpi_gl_canvas.h

    old new  
    2727#ifndef HIDPI_GL_CANVAS_H
    2828#define HIDPI_GL_CANVAS_H
    2929
     30#include <import_export.h>
    3031#include <wx/glcanvas.h>
    3132
    3233
     
    3536 *
    3637 * This is a small wrapper class to enable HiDPI/Retina support for wxGLCanvas.
    3738 */
    38 class HIDPI_GL_CANVAS : public wxGLCanvas
     39class MY_TYPE HIDPI_GL_CANVAS : public wxGLCanvas
    3940{
    4041public:
    4142    // wxGLCanvas constructor
  • include/kiway_holder.h

    old new  
    2424#ifndef KIWAY_HOLDER_H_
    2525#define KIWAY_HOLDER_H_
    2626
     27#include <import_export.h>
     28
    2729class KIWAY;
    2830class PROJECT;
    2931class wxWindow;
     
    3335 *
    3436 * It allows calls to Kiway() and SetKiway().
    3537 */
    36 class KIWAY_HOLDER
     38class MY_TYPE KIWAY_HOLDER
    3739{
    3840public:
    3941    enum HOLDER_TYPE { DIALOG, FRAME, PANEL };
  • include/board_item.h

    old new  
    2626#define BOARD_ITEM_STRUCT_H
    2727
    2828
     29#include <import_export.h>
    2930#include <eda_item.h>
    3031#include <layer_ids.h>
    3132#include <geometry/geometry_utils.h>
     
    6667 * therefore instances of derived classes should only be found in Pcbnew or other programs
    6768 * that use class #BOARD and its contents.
    6869 */
    69 class BOARD_ITEM : public EDA_ITEM
     70class MY_TYPE BOARD_ITEM : public EDA_ITEM
    7071{
    7172public:
    7273    BOARD_ITEM( BOARD_ITEM* aParent, KICAD_T idtype, PCB_LAYER_ID aLayer = F_Cu ) :
     
    356357 *
    357358 * Its sole purpose is to flag the item as having been deleted.
    358359 */
    359 class DELETED_BOARD_ITEM : public BOARD_ITEM
     360class MY_TYPE DELETED_BOARD_ITEM : public BOARD_ITEM
    360361{
    361362public:
    362363    DELETED_BOARD_ITEM() :
  • include/units_provider.h

    old new  
    2424#ifndef  UNITS_PROVIDER_H
    2525#define  UNITS_PROVIDER_H
    2626
     27#include <import_export.h>
    2728#include <eda_units.h>
    2829#include <origin_transforms.h>
    2930
    3031
    31 class UNITS_PROVIDER
     32class MY_TYPE UNITS_PROVIDER
    3233{
    3334public:
    3435    UNITS_PROVIDER( const EDA_IU_SCALE& aIuScale, EDA_UNITS aUnits ) :
  • include/eda_item.h

    old new  
    2929
    3030#include <deque>
    3131
     32#include <import_export.h>
    3233#include <core/typeinfo.h>
    3334#include <eda_item_flags.h>
    3435#include <eda_search_data.h>
     
    8182/**
    8283 * A base class for most all the KiCad significant classes used in schematics and boards.
    8384 */
    84 class EDA_ITEM : public KIGFX::VIEW_ITEM
     85class MY_TYPE EDA_ITEM : public KIGFX::VIEW_ITEM
    8586{
    8687public:
    8788    virtual ~EDA_ITEM() { };
  • include/font/glyph.h

    old new  
    2626#define GLYPH_H
    2727
    2828#include <memory>
     29#include <import_export.h>
    2930#include <math/box2.h>
    3031#include <geometry/shape_poly_set.h>
    3132#include <wx/debug.h>
     
    5556};
    5657
    5758
    58 class OUTLINE_GLYPH : public GLYPH, public SHAPE_POLY_SET
     59class MY_TYPE OUTLINE_GLYPH : public GLYPH, public SHAPE_POLY_SET
    5960{
    6061public:
    6162    OUTLINE_GLYPH() :
     
    8081};
    8182
    8283
    83 class STROKE_GLYPH : public GLYPH, public std::vector<std::vector<VECTOR2D>>
     84class MY_TYPE STROKE_GLYPH : public GLYPH, public std::vector<std::vector<VECTOR2D>>
    8485{
    8586public:
    8687    STROKE_GLYPH()
  • include/pcb_base_frame.h

    old new  
    2727#define  PCB_BASE_FRAME_H
    2828
    2929
     30#include <import_export.h>
    3031#include <eda_item.h>
    3132#include <board.h>
    3233#include <eda_draw_frame.h>
     
    6667/**
    6768 * Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
    6869 */
    69 class PCB_BASE_FRAME : public EDA_DRAW_FRAME
     70class MY_TYPE PCB_BASE_FRAME : public EDA_DRAW_FRAME
    7071{
    7172public:
    7273    PCB_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType,
  • include/search_stack.h

    old new  
    2828
    2929#include <wx/filefn.h>
    3030#include <wx/filename.h>
     31#include <import_export.h>
    3132#include <project.h>
    3233
    3334
     
    3839 * reminder that anything you put in here means searching work at some point in time.
    3940 * (An alternative is to simply know where something is.)
    4041 */
    41 class SEARCH_STACK : public wxPathList, public PROJECT::_ELEM
     42class MY_TYPE SEARCH_STACK : public wxPathList, public PROJECT::_ELEM
    4243{
    4344public:
    4445    KICAD_T Type() override { return SEARCH_STACK_T; }
  • include/eda_base_frame.h

    old new  
    3636#include <map>
    3737
    3838#include <wx/aui/aui.h>
     39#include <import_export.h>
    3940#include <layer_ids.h>
    4041#include <frame_type.h>
    4142#include <hotkeys_basic.h>
     
    101102 * calling it from the derived class's SaveSettings().  This class is not a #KIWAY_PLAYER
    102103 * because #KICAD_MANAGER_FRAME is derived from it and that class is not a player.
    103104 */
    104 class EDA_BASE_FRAME : public wxFrame, public TOOLS_HOLDER, public KIWAY_HOLDER,
    105                        public UNITS_PROVIDER
     105class MY_TYPE EDA_BASE_FRAME : public wxFrame, public TOOLS_HOLDER,
     106                                        public KIWAY_HOLDER, public UNITS_PROVIDER
    106107{
    107108public:
    108109    /**
     
    802803 * then after a //==// break has additional calls to anchor toolbars in a way that matches
    803804 * present functionality.
    804805 */
    805 class EDA_PANE : public wxAuiPaneInfo
     806class MY_TYPE EDA_PANE : public wxAuiPaneInfo
    806807{
    807808public:
    808809    EDA_PANE()
  • include/widgets/color_swatch.h

    old new  
    3232
    3333#include <functional>
    3434
     35#include <import_export.h>
    3536#include <gal/color4d.h>
    3637#include <dialogs/dialog_color_picker.h>
    3738
     
    5354/**
    5455 * A simple color swatch of the kind used to set layer colors.
    5556 */
    56 class COLOR_SWATCH: public wxPanel
     57class MY_TYPE COLOR_SWATCH: public wxPanel
    5758{
    5859public:
    5960
  • include/widgets/search_pane_tab.h

    old new  
    2424#include <wx/listctrl.h>
    2525#include <wx/sizer.h>
    2626#include <wx/panel.h>
     27#include <import_export.h>
    2728
    2829class SEARCH_HANDLER;
    2930
    3031
    31 class SEARCH_PANE_LISTVIEW : public wxListView
     32class MY_TYPE SEARCH_PANE_LISTVIEW : public wxListView
    3233{
    3334public:
    3435    SEARCH_PANE_LISTVIEW( SEARCH_HANDLER* handler,
     
    5354};
    5455
    5556
    56 class SEARCH_PANE_TAB : public wxPanel
     57class MY_TYPE SEARCH_PANE_TAB : public wxPanel
    5758{
    5859public:
    5960    SEARCH_PANE_TAB( SEARCH_HANDLER* handler, wxWindow* parent, wxWindowID aId = wxID_ANY,
  • include/widgets/footprint_preview_widget.h

    old new  
    3434class wxSizer;
    3535
    3636
    37 class FOOTPRINT_PREVIEW_WIDGET: public wxPanel
     37class MY_TYPE FOOTPRINT_PREVIEW_WIDGET: public wxPanel
    3838{
    3939public:
    4040
  • include/widgets/bitmap_button.h

    old new  
    2525#ifndef BITMAP_BUTTON_H_
    2626#define BITMAP_BUTTON_H_
    2727
     28#include <import_export.h>
    2829#include <wx/bitmap.h>
    2930#include <wx/panel.h>
    3031#include <wx/colour.h>
     
    3738 *     * It has a rectangle highlight when the mouse is hovering/pressed
    3839 *     * It has the ability to be checked/toggled
    3940 */
    40 class BITMAP_BUTTON : public wxPanel
     41class MY_TYPE BITMAP_BUTTON : public wxPanel
    4142{
    4243public:
    4344    BITMAP_BUTTON( wxWindow* aParent, wxWindowID aId, const wxPoint& aPos = wxDefaultPosition,
  • include/widgets/paged_dialog.h

    old new  
    2121#ifndef PAGED_DIALOG_H
    2222#define PAGED_DIALOG_H
    2323
     24#include <import_export.h>
    2425#include <dialog_shim.h>
    2526#include <widgets/wx_treebook.h>
    2627
     
    2829class WX_INFOBAR;
    2930class WX_TREEBOOK;
    3031
    31 class PAGED_DIALOG : public DIALOG_SHIM
     32class MY_TYPE PAGED_DIALOG : public DIALOG_SHIM
    3233{
    3334public:
    3435    PAGED_DIALOG( wxWindow* aParent, const wxString& aTitle, bool aShowReset,
  • include/widgets/wx_grid.h

    old new  
    3131#include <wx/event.h>
    3232#include <wx/grid.h>
    3333#include <wx/version.h>
     34#include <import_export.h>
    3435#include <units_provider.h>
    3536#include <libeval/numeric_evaluator.h>
    3637
    3738
    38 class WX_GRID : public wxGrid
     39class MY_TYPE WX_GRID : public wxGrid
    3940{
    4041public:
    4142    // Constructor has to be wxFormBuilder-compatible
  • include/tool/action_toolbar.h

    old new  
    3232#include <wx/aui/framemanager.h>
    3333#include <wx/popupwin.h>
    3434#include <wx/panel.h>
     35#include <import_export.h>
    3536#include <tool/action_manager.h>
    3637
    3738class ACTION_MENU;
     
    99100/**
    100101 * A popup window that contains a row of toolbar-like buttons for the user to choose from.
    101102 */
    102 class ACTION_TOOLBAR_PALETTE : public wxPopupTransientWindow
     103class MY_TYPE ACTION_TOOLBAR_PALETTE : public wxPopupTransientWindow
    103104{
    104105public:
    105106    /**
     
    180181/**
    181182 * Define the structure of a toolbar with buttons that invoke ACTIONs.
    182183 */
    183 class ACTION_TOOLBAR : public wxAuiToolBar
     184class MY_TYPE ACTION_TOOLBAR : public wxAuiToolBar
    184185{
    185186public:
    186187    ACTION_TOOLBAR( EDA_BASE_FRAME* parent, wxWindowID id = wxID_ANY,
  • include/tool/action_menu.h

    old new  
    3434
    3535#include <wx/menu.h>
    3636#include <wx/textentry.h>
     37#include <import_export.h>
    3738#include <tool/tool_event.h>
    3839
    3940class KIFACE_BASE;
     
    4546/**
    4647 * Defines the structure of a menu based on ACTIONs.
    4748 */
    48 class ACTION_MENU : public wxMenu
     49class MY_TYPE ACTION_MENU : public wxMenu
    4950{
    5051public:
    5152    ///< Default constructor
  • include/tool/conditional_menu.h

    old new  
    3838enum class BITMAPS : unsigned int;
    3939
    4040
    41 class CONDITIONAL_MENU : public ACTION_MENU
     41class MY_TYPE CONDITIONAL_MENU : public ACTION_MENU
    4242{
    4343public:
    4444    ///< Constant to indicate that we do not care about an #ENTRY location in the menu.
  • include/kiway_player.h

    old new  
    2828#include <wx/frame.h>
    2929
    3030#include <vector>
     31#include <import_export.h>
    3132#include <kiway_holder.h>
    3233#include <eda_base_frame.h>
    3334
     
    6162#ifdef SWIG
    6263class KIWAY_PLAYER : public wxFrame, public KIWAY_HOLDER
    6364#else
    64 class KIWAY_PLAYER : public EDA_BASE_FRAME
     65class MY_TYPE KIWAY_PLAYER : public EDA_BASE_FRAME
    6566#endif
    6667{
    6768public:
  • libs/kimath/include/geometry/shape_null.h

    old new  
    3131
    3232#include <algorithm>
    3333
    34 class SHAPE_NULL : public SHAPE
     34class MY_TYPE SHAPE_NULL : public SHAPE
    3535{
    3636public:
    3737    SHAPE_NULL() :
  • libs/kimath/include/geometry/shape_compound.h

    old new  
    3535
    3636class SHAPE_SIMPLE;
    3737
    38 class SHAPE_COMPOUND : public SHAPE
     38class MY_TYPE SHAPE_COMPOUND : public SHAPE
    3939{
    4040public:
    4141    SHAPE_COMPOUND() :
  • libs/kimath/include/geometry/shape_rect.h

    old new  
    3434#include <math/vector2d.h>
    3535#include <trigo.h>
    3636
    37 class SHAPE_RECT : public SHAPE
     37class MY_TYPE SHAPE_RECT : public SHAPE
    3838{
    3939public:
    4040    /**
  • libs/kimath/include/geometry/shape_simple.h

    old new  
    3838 * there is a "virtual" line segment between the last and first vertex.
    3939 */
    4040
    41 class SHAPE_SIMPLE : public SHAPE_LINE_CHAIN_BASE
     41class MY_TYPE SHAPE_SIMPLE : public SHAPE_LINE_CHAIN_BASE
    4242{
    4343public:
    4444    /**
  • libs/kimath/include/geometry/shape_line_chain.h

    old new  
    7878 *
    7979 * @note The SHAPE_LINE_CHAIN class shall not be used for polygons!
    8080 */
    81 class SHAPE_LINE_CHAIN : public SHAPE_LINE_CHAIN_BASE
     81class MY_TYPE SHAPE_LINE_CHAIN : public SHAPE_LINE_CHAIN_BASE
    8282{
    8383private:
    8484    typedef std::vector<VECTOR2I>::iterator point_iter;
  • libs/kimath/include/geometry/shape_circle.h

    old new  
    3434
    3535#include <algorithm>
    3636
    37 class SHAPE_CIRCLE : public SHAPE
     37class MY_TYPE SHAPE_CIRCLE : public SHAPE
    3838{
    3939public:
    4040    SHAPE_CIRCLE() :
  • libs/kimath/include/geometry/shape_arc.h

    old new  
    3333
    3434class SHAPE_LINE_CHAIN;
    3535
    36 class SHAPE_ARC : public SHAPE
     36class MY_TYPE SHAPE_ARC : public SHAPE
    3737{
    3838public:
    3939
  • libs/kimath/include/geometry/shape_segment.h

    old new  
    3434
    3535#include <algorithm>
    3636
    37 class SHAPE_SEGMENT : public SHAPE
     37class MY_TYPE SHAPE_SEGMENT : public SHAPE
    3838{
    3939public:
    4040    SHAPE_SEGMENT() :
  • libs/kimath/include/geometry/shape.h

    old new  
    2828
    2929#include <sstream>
    3030#include <vector>
     31#include <import_export.h>
    3132#include <geometry/seg.h>
    3233#include <geometry/eda_angle.h>
    3334#include <math/vector2d.h>
     
    7475
    7576class SHAPE;
    7677
    77 class SHAPE_BASE
     78class MY_TYPE SHAPE_BASE
    7879{
    7980public:
    8081    /**
     
    119120/**
    120121 * An abstract shape on 2D plane.
    121122 */
    122 class SHAPE : public SHAPE_BASE
     123class MY_TYPE SHAPE : public SHAPE_BASE
    123124{
    124125public:
    125126    /**
     
    250251};
    251252
    252253
    253 class SHAPE_LINE_CHAIN_BASE : public SHAPE
     254class MY_TYPE SHAPE_LINE_CHAIN_BASE : public SHAPE
    254255{
    255256public:
    256257    SHAPE_LINE_CHAIN_BASE( SHAPE_TYPE aType ) :
  • libs/sexpr/include/sexpr/sexpr.h

    old new  
    2222#include <cstdint>
    2323#include <string>
    2424#include <vector>
     25#include "import_export.h"
    2526#include "sexpr/isexprable.h"
    2627#include "sexpr/sexpr_exception.h"
    2728
     
    4243
    4344    typedef std::vector< class SEXPR * > SEXPR_VECTOR;
    4445
    45     class SEXPR
     46    class MY_TYPE SEXPR
    4647    {
    4748    public:
    4849        virtual ~SEXPR() {};
     
    9495            SEXPR( SEXPR_TYPE::SEXPR_TYPE_ATOM_DOUBLE, aLineNumber ), m_value( aValue ) {};
    9596    };
    9697
    97     struct SEXPR_STRING : public SEXPR
     98    struct MY_TYPE SEXPR_STRING : public SEXPR
    9899    {
    99100        std::string m_value;
    100101
     
    105106            SEXPR( SEXPR_TYPE::SEXPR_TYPE_ATOM_STRING, aLineNumber ), m_value( aValue ) {};
    106107    };
    107108
    108     struct SEXPR_SYMBOL : public SEXPR
     109    struct MY_TYPE SEXPR_SYMBOL : public SEXPR
    109110    {
    110111        std::string m_value;
    111112
  • include/properties/eda_angle_variant.h

    old new  
    2020#ifndef KICAD_EDA_ANGLE_VARIANT_H
    2121#define KICAD_EDA_ANGLE_VARIANT_H
    2222
     23#include <import_export.h>
    2324#include <geometry/eda_angle.h>
    2425
    2526#include <wx/variant.h>
    2627
    27 class EDA_ANGLE_VARIANT_DATA : public wxVariantData
     28class MY_TYPE EDA_ANGLE_VARIANT_DATA : public wxVariantData
    2829{
    2930public:
    3031    EDA_ANGLE_VARIANT_DATA();
  • libs/kimath/include/geometry/shape_poly_set.h

    old new  
    6262 *
    6363 * TODO: add convex partitioning & spatial index
    6464 */
    65 class SHAPE_POLY_SET : public SHAPE
     65class MY_TYPE SHAPE_POLY_SET : public SHAPE
    6666{
    6767public:
    6868    ///< represents a single polygon outline with holes. The first entry is the outline,
     
    7373    class TRIANGULATED_POLYGON
    7474    {
    7575    public:
    76         struct TRI : public SHAPE_LINE_CHAIN_BASE
     76        struct MY_TYPE TRI : public SHAPE_LINE_CHAIN_BASE
    7777        {
    7878            TRI( int _a = 0, int _b = 0, int _c = 0, TRIANGULATED_POLYGON* aParent = nullptr ) :
    7979                SHAPE_LINE_CHAIN_BASE( SH_POLY_SET_TRIANGLE ),
  • pcbnew/CMakeLists.txt

    old new  
    435435    -I${CMAKE_SOURCE_DIR}/common/swig
    436436    -I${CMAKE_SOURCE_DIR}/libs/kimath/include
    437437    -I${CMAKE_BINARY_DIR}
     438    -DMY_TYPE=
    438439    )
    439440
    440441if( DEBUG )
  • include/settings/json_settings.h

    old new  
    2121#ifndef _JSON_SETTINGS_H
    2222#define _JSON_SETTINGS_H
    2323
     24#include <import_export.h>
    2425#include <core/wx_stl_compat.h>
    2526
    2627#include <utility>
     
    5657/// pimpl to allow hiding json.hpp
    5758class JSON_SETTINGS_INTERNALS;
    5859
    59 class JSON_SETTINGS
     60class MY_TYPE JSON_SETTINGS
    6061{
    6162public:
    6263    friend class NESTED_SETTINGS;
  • include/settings/parameters.h

    old new  
    2727#include <math/util.h>
    2828
    2929#include <optional>
     30#include <import_export.h>
    3031#include <settings/json_settings.h>
    3132
    3233
    33 class PARAM_BASE
     34class MY_TYPE PARAM_BASE
    3435{
    3536public:
    3637    PARAM_BASE( std::string aJsonPath, bool aReadOnly ) :
     
    160161/**
    161162 * Stores a path as a string with directory separators normalized to unix-style
    162163 */
    163 class PARAM_PATH : public PARAM<wxString>
     164class MY_TYPE PARAM_PATH : public PARAM<wxString>
    164165{
    165166public:
    166167    PARAM_PATH( const std::string& aJsonPath, wxString* aPtr, const wxString& aDefault,
     
    485486 * Represents a list of strings holding directory paths.
    486487 * Normalizes paths to unix directory separator style in the file.
    487488 */
    488 class PARAM_PATH_LIST : public PARAM_LIST<wxString>
     489class MY_TYPE PARAM_PATH_LIST : public PARAM_LIST<wxString>
    489490{
    490491public:
    491492    PARAM_PATH_LIST( const std::string& aJsonPath, std::vector<wxString>* aPtr,
     
    576577/**
    577578 * A helper for <wxString, wxString> maps
    578579 */
    579 class PARAM_WXSTRING_MAP : public PARAM_BASE
     580class MY_TYPE PARAM_WXSTRING_MAP : public PARAM_BASE
    580581{
    581582public:
    582583    PARAM_WXSTRING_MAP( const std::string& aJsonPath, std::map<wxString, wxString>* aPtr,
  • pcbnew/pcbnew_settings.h

    old new  
    101101
    102102
    103103// base class to handle Pcbnew SETTINGS also used in Cvpcb
    104 class PCB_VIEWERS_SETTINGS_BASE : public APP_SETTINGS_BASE
     104class MY_TYPE PCB_VIEWERS_SETTINGS_BASE : public APP_SETTINGS_BASE
    105105{
    106106public:
    107107    struct VIEWERS_DISPLAY_OPTIONS
  • include/printout.h

    old new  
    2828/**
    2929 * Handle the parameters used to print a board drawing.
    3030 */
    31 struct PRINTOUT_SETTINGS
     31struct MY_TYPE PRINTOUT_SETTINGS
    3232{
    3333    PRINTOUT_SETTINGS( const PAGE_INFO& aPageInfo )
    3434        : m_pageInfo( aPageInfo )
  • include/project.h

    old new  
    2929 */
    3030#include <map>
    3131#include <vector>
     32#include <import_export.h>
    3233#include <kiid.h>
    3334#include <wx_filename.h>
    3435#include <wx/string.h>
     
    7172     * include derived class headers in this file, you are doing incompatible with the goal
    7273     * of this class.  Keep knowledge of derived classes opaque to class PROJECT please.
    7374    */
    74     class _ELEM
     75    class MY_TYPE _ELEM
    7576    {
    7677    public:
    7778        virtual ~_ELEM() {}
  • include/view/view_item.h

    old new  
    2929
    3030#include <vector>
    3131#include <bitset>
     32#include <import_export.h>
    3233#include <math/box2.h>
    3334#include <inspectable.h>
    3435
     
    7374 * VIEW_ITEM objects are never owned by a #VIEW. A single VIEW_ITEM can belong to any number of
    7475 * static VIEWs, but only one dynamic VIEW due to storage of only one VIEW reference.
    7576 */
    76 class VIEW_ITEM : public INSPECTABLE
     77class MY_TYPE VIEW_ITEM : public INSPECTABLE
    7778{
    7879public:
    7980    VIEW_ITEM() :
  • include/tool/tools_holder.h

    old new  
    2525#define  TOOL_HOLDER_H
    2626
    2727#include <vector>
     28#include <import_export.h>
    2829#include <view/view_controls.h>
    2930#include <tool/selection.h>
    3031#include <tool/tool_action.h>
     
    4142 * This is just the framework; the owner is responsible for registering individual tools,
    4243 * creating the dispatcher, etc.
    4344 */
    44 class TOOLS_HOLDER
     45class MY_TYPE TOOLS_HOLDER
    4546{
    4647public:
    4748    TOOLS_HOLDER();
  • include/inspectable.h

    old new  
    2222#ifndef INSPECTABLE_H
    2323#define INSPECTABLE_H
    2424
     25#include <import_export.h>
     26
    2527#include <core/wx_stl_compat.h>
    2628
    2729#include <properties/property_mgr.h>
     
    3234/**
    3335 * Class that other classes need to inherit from, in order to be inspectable.
    3436 */
    35 class INSPECTABLE
     37class MY_TYPE INSPECTABLE
    3638{
    3739public:
    3840    virtual ~INSPECTABLE()