From 86b6afd14b93338b360b292faf4d0a0281225426 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 13 Nov 2020 21:07:01 +0000 Subject: [PATCH] More cleanup of MODULE to see if it fixes SWIG error. --- pcbnew/array_pad_name_provider.h | 2 +- pcbnew/board_item_container.h | 2 +- pcbnew/collectors.h | 4 ++-- pcbnew/footprint.cpp | 6 +++--- pcbnew/footprint.h | 6 +++--- pcbnew/fp_shape.h | 6 +++--- pcbnew/io_mgr.h | 2 +- pcbnew/pcb_shape.h | 2 +- pcbnew/plugins/altium/altium_pcb.cpp | 2 +- pcbnew/plugins/eagle/eagle_plugin.h | 10 +++++----- pcbnew/plugins/geda/gpcb_plugin.cpp | 2 +- pcbnew/plugins/kicad/kicad_plugin.cpp | 2 +- pcbnew/plugins/kicad/kicad_plugin.h | 2 +- pcbnew/plugins/legacy/legacy_plugin.cpp | 8 ++++---- pcbnew/plugins/legacy/legacy_plugin.h | 2 +- pcbnew/plugins/pcad/pcb_module.cpp | 12 ++++++------ pcbnew/specctra_import_export/specctra.h | 8 ++++---- pcbnew/specctra_import_export/specctra_export.cpp | 10 +++++----- pcbnew/tools/selection_tool.cpp | 2 +- pcbnew/tools/selection_tool.h | 2 +- .../include/pcbnew_utils/board_file_utils.h | 4 ++-- .../include/unit_test_utils/unit_test_utils.h | 2 +- 22 files changed, 49 insertions(+), 49 deletions(-) diff --git a/pcbnew/array_pad_name_provider.h b/pcbnew/array_pad_name_provider.h index ba1c436b63..259afd45cf 100644 --- a/pcbnew/array_pad_name_provider.h +++ b/pcbnew/array_pad_name_provider.h @@ -31,7 +31,7 @@ /** * Simple class that sequentially provides names from an #ARRAY_OPTIONS * object, making sure that they do not conflict with names already existing - * in a #MODULE. + * in a #FOOTPRINT. */ class ARRAY_PAD_NAME_PROVIDER { diff --git a/pcbnew/board_item_container.h b/pcbnew/board_item_container.h index 9f4b7f4ea5..8829669dc0 100644 --- a/pcbnew/board_item_container.h +++ b/pcbnew/board_item_container.h @@ -38,7 +38,7 @@ enum class ADD_MODE /** * @brief Abstract interface for BOARD_ITEMs capable of storing other items inside. - * @see MODULE + * @see FOOTPRINT * @see BOARD */ class BOARD_ITEM_CONTAINER : public BOARD_ITEM diff --git a/pcbnew/collectors.h b/pcbnew/collectors.h index 430e6a475d..888622d515 100644 --- a/pcbnew/collectors.h +++ b/pcbnew/collectors.h @@ -279,7 +279,7 @@ public: /** * A scan list for all primary board items, omitting items which are subordinate to - * a MODULE, such as PAD and FP_TEXT. + * a FOOTPRINT, such as PAD and FP_TEXT. */ static const KICAD_T BoardLevelItems[]; @@ -372,7 +372,7 @@ public: /** * Scan a BOARD_ITEM using this class's Inspector method, which does the collection. * - * @param aItem A BOARD_ITEM to scan, may be a BOARD or MODULE, or whatever. + * @param aItem A BOARD_ITEM to scan, may be a BOARD or FOOTPRINT, or whatever. * @param aScanList A list of KICAD_Ts with a terminating EOT, that specs * what is to be collected and the priority order of the resultant * collection in "m_list". diff --git a/pcbnew/footprint.cpp b/pcbnew/footprint.cpp index b133a863ae..62ffebd5b7 100644 --- a/pcbnew/footprint.cpp +++ b/pcbnew/footprint.cpp @@ -478,7 +478,7 @@ void FOOTPRINT::Add( BOARD_ITEM* aBoardItem, ADD_MODE aMode ) default: { wxString msg; - msg.Printf( wxT( "MODULE::Add() needs work: BOARD_ITEM type (%d) not handled" ), + msg.Printf( wxT( "FOOTPRINT::Add() needs work: BOARD_ITEM type (%d) not handled" ), aBoardItem->Type() ); wxFAIL_MSG( msg ); @@ -553,7 +553,7 @@ void FOOTPRINT::Remove( BOARD_ITEM* aBoardItem ) default: { wxString msg; - msg.Printf( wxT( "MODULE::Remove() needs work: BOARD_ITEM type (%d) not handled" ), + msg.Printf( wxT( "FOOTPRINT::Remove() needs work: BOARD_ITEM type (%d) not handled" ), aBoardItem->Type() ); wxFAIL_MSG( msg ); } @@ -1306,7 +1306,7 @@ void FOOTPRINT::Flip( const wxPoint& aCentre, bool aFlipLeftRight ) break; default: - wxMessageBox( wxT( "MODULE::Flip() error: Unknown Draw Type" ) ); + wxMessageBox( wxT( "FOOTPRINT::Flip() error: Unknown Draw Type" ) ); break; } } diff --git a/pcbnew/footprint.h b/pcbnew/footprint.h index a1f6a32f6d..c76ac8a2ac 100644 --- a/pcbnew/footprint.h +++ b/pcbnew/footprint.h @@ -575,7 +575,7 @@ public: wxString GetClass() const override { - return wxT( "MODULE" ); + return wxT( "FOOTPRINT" ); } wxString GetSelectMenuText( EDA_UNITS aUnits ) const override; @@ -639,7 +639,7 @@ public: * Note that a block of single line comments constitutes a multiline block of single * line comments. That is, the block is made of consecutive single line comments. * @param aInitialComments is a heap allocated wxArrayString or NULL, which the caller - * gives up ownership of over to this MODULE. + * gives up ownership of over to this FOOTPRINT. */ void SetInitialComments( wxArrayString* aInitialComments ) { @@ -700,7 +700,7 @@ private: wxPoint m_pos; // Position of footprint on the board in internal units. FP_TEXT* m_reference; // Component reference designator value (U34, R18..) FP_TEXT* m_value; // Component value (74LS00, 22K..) - LIB_ID m_fpid; // The #LIB_ID of the MODULE. + LIB_ID m_fpid; // The #LIB_ID of the FOOTPRINT. int m_attributes; // Flag bits ( see FOOTPRINT_ATTR_T ) int m_fpStatus; // For autoplace: flags (LOCKED, FIELDS_AUTOPLACED) EDA_RECT m_boundingBox; // Bounding box : coordinates on board, real orientation. diff --git a/pcbnew/fp_shape.h b/pcbnew/fp_shape.h index 2304422390..5d86c90462 100644 --- a/pcbnew/fp_shape.h +++ b/pcbnew/fp_shape.h @@ -93,9 +93,9 @@ public: /** * Flip entity relative to aCentre. - * The item is mirrored, and layer changed to the paired corresponding layer if it is on - * a paired layer. - * This function should be called only from MODULE::Flip because it is not usual to flip + * The item is mirrored, and layer changed to the paired corresponding layer if it is on a + * paired layer. + * This function should be called only from FOOTPRINT::Flip because it is not usual to flip * an item alone, without flipping the parent footprint (consider Mirror() instead). */ void Flip( const wxPoint& aCentre, bool aFlipLeftRight ) override; diff --git a/pcbnew/io_mgr.h b/pcbnew/io_mgr.h index 84c24bfc9a..cb0aa1dd07 100644 --- a/pcbnew/io_mgr.h +++ b/pcbnew/io_mgr.h @@ -403,7 +403,7 @@ public: * The caller continues to own this object (plugin may not delete it), and * plugins should expect it to be optionally NULL. * - * @return MODULE* - if found caller owns it, else NULL if not found. + * @return FOOTPRINT* - if found caller owns it, else NULL if not found. * * @throw IO_ERROR if the library cannot be found or read. No exception * is thrown in the case where aFootprintName cannot be found. diff --git a/pcbnew/pcb_shape.h b/pcbnew/pcb_shape.h index be00cca8c8..231fc5e33a 100644 --- a/pcbnew/pcb_shape.h +++ b/pcbnew/pcb_shape.h @@ -217,7 +217,7 @@ public: * Function GetParentFootprint * returns a pointer to the parent footprint, or NULL if PCB_SHAPE does not * belong to a footprint. - * @return MODULE* - pointer to the parent footprint or NULL. + * @return FOOTPRINT* - pointer to the parent footprint or NULL. */ FOOTPRINT* GetParentFootprint() const; diff --git a/pcbnew/plugins/altium/altium_pcb.cpp b/pcbnew/plugins/altium/altium_pcb.cpp index 88ffaa652e..a57ce4b314 100644 --- a/pcbnew/plugins/altium/altium_pcb.cpp +++ b/pcbnew/plugins/altium/altium_pcb.cpp @@ -2243,7 +2243,7 @@ void ALTIUM_PCB::ParseTexts6Data( const CFB::CompoundFileReader& aReader, continue; } - // TODO: better approach to select if item belongs to a MODULE + // TODO: better approach to select if item belongs to a FOOTPRINT EDA_TEXT* tx = nullptr; BOARD_ITEM* itm = nullptr; diff --git a/pcbnew/plugins/eagle/eagle_plugin.h b/pcbnew/plugins/eagle/eagle_plugin.h index efb1343851..e85fc823b6 100644 --- a/pcbnew/plugins/eagle/eagle_plugin.h +++ b/pcbnew/plugins/eagle/eagle_plugin.h @@ -150,7 +150,7 @@ public: /* void Save( const wxString& aFileName, BOARD* aBoard, const PROPERTIES* aProperties = NULL ); - void FootprintSave( const wxString& aLibraryPath, const MODULE* aFootprint, const PROPERTIES* aProperties = NULL ); + void FootprintSave( const wxString& aLibraryPath, const FOOTPRINT* aFootprint, const PROPERTIES* aProperties = NULL ); void FootprintDelete( const wxString& aLibraryPath, const wxString& aFootprintName, const PROPERTIES* aProperties = NULL ); @@ -196,8 +196,8 @@ private: NET_MAP m_pads_to_nets; ///< net list - FOOTPRINT_MAP m_templates; ///< is part of a MODULE factory that operates - ///< using copy construction. + FOOTPRINT_MAP m_templates; ///< is part of a FOOTPRINT factory that operates using copy + ///< construction. ///< lookup key is either libname.packagename or simply ///< packagename if FootprintLoad() or FootprintEnumberate() @@ -287,8 +287,8 @@ private: void centerBoard(); /** - * Function makeModule - * creates a MODULE from an Eagle package. + * Function makeFootprint + * creates a FOOTPRINT from an Eagle package. */ FOOTPRINT* makeFootprint( wxXmlNode* aPackage, const wxString& aPkgName ); diff --git a/pcbnew/plugins/geda/gpcb_plugin.cpp b/pcbnew/plugins/geda/gpcb_plugin.cpp index 49d375ea80..0a1ac18db4 100644 --- a/pcbnew/plugins/geda/gpcb_plugin.cpp +++ b/pcbnew/plugins/geda/gpcb_plugin.cpp @@ -134,7 +134,7 @@ class GPCB_FPL_CACHE { GPCB_PLUGIN* m_owner; ///< Plugin object that owns the cache. wxFileName m_lib_path; ///< The path of the library. - FOOTPRINT_MAP m_footprints; ///< Map of footprint file name to MODULE*. + FOOTPRINT_MAP m_footprints; ///< Map of footprint file name to FOOTPRINT*. bool m_cache_dirty; ///< Stored separately because it's expensive to check ///< m_cache_timestamp against all the files. diff --git a/pcbnew/plugins/kicad/kicad_plugin.cpp b/pcbnew/plugins/kicad/kicad_plugin.cpp index c03c42d9be..50dd6e1ed6 100644 --- a/pcbnew/plugins/kicad/kicad_plugin.cpp +++ b/pcbnew/plugins/kicad/kicad_plugin.cpp @@ -87,7 +87,7 @@ class FP_CACHE PCB_IO* m_owner; // Plugin object that owns the cache. wxFileName m_lib_path; // The path of the library. wxString m_lib_raw_path; // For quick comparisons. - FOOTPRINT_MAP m_modules; // Map of footprint file name per MODULE*. + FOOTPRINT_MAP m_modules; // Map of footprint file name per FOOTPRINT*. bool m_cache_dirty; // Stored separately because it's expensive to check // m_cache_timestamp against all the files. diff --git a/pcbnew/plugins/kicad/kicad_plugin.h b/pcbnew/plugins/kicad/kicad_plugin.h index ca083f3906..0e6befa205 100644 --- a/pcbnew/plugins/kicad/kicad_plugin.h +++ b/pcbnew/plugins/kicad/kicad_plugin.h @@ -95,7 +95,7 @@ class PCB_TEXT; #define CTL_OMIT_NETS (1 << 1) ///< Omit pads net names (useless in library) #define CTL_OMIT_TSTAMPS (1 << 2) ///< Omit component time stamp (useless in library) -#define CTL_OMIT_INITIAL_COMMENTS (1 << 3) ///< omit MODULE initial comments +#define CTL_OMIT_INITIAL_COMMENTS (1 << 3) ///< omit FOOTPRINT initial comments #define CTL_OMIT_PATH (1 << 4) ///< Omit component sheet time stamp (useless in library) #define CTL_OMIT_AT (1 << 5) ///< Omit position and rotation // (always saved with potion 0,0 and rotation = 0 in library) diff --git a/pcbnew/plugins/legacy/legacy_plugin.cpp b/pcbnew/plugins/legacy/legacy_plugin.cpp index 1c85f12130..dc6dc7b38d 100644 --- a/pcbnew/plugins/legacy/legacy_plugin.cpp +++ b/pcbnew/plugins/legacy/legacy_plugin.cpp @@ -1753,8 +1753,8 @@ void LEGACY_PLUGIN::loadFP_SHAPE( FOOTPRINT* aFootprint ) aFootprint->Add( fpShape ); - // this had been done at the MODULE level before, presumably because the - // FP_SHAPE needs to be already added to a module before this function will work. + // this had been done at the FOOTPRINT level before, presumably because the FP_SHAPE needs + // to be already added to a module before this function will work. fpShape->SetDrawCoord(); } @@ -3074,7 +3074,7 @@ void LEGACY_PLUGIN::SaveFP3DModels( const FOOTPRINT* aFootprint ) const lifetime, so it only needs to be good enough for a short duration of time. Caching all the MODULEs is a bit memory intensive, but it is a considerably faster way of fulfilling the API contract. Otherwise, without the cache, you - would have to re-read the file when searching for any MODULE, and this would + would have to re-read the file when searching for any FOOTPRINT, and this would be very problematic filling a FOOTPRINT_LIST via this PLUGIN API. If memory becomes a concern, consider the cache lifetime policy, which determines the time that a LP_CACHE is in RAM. Note PLUGIN lifetime also plays a role in @@ -3384,7 +3384,7 @@ FOOTPRINT* LEGACY_PLUGIN::FootprintLoad( const wxString& aLibraryPath, return NULL; } - // Return copy of already loaded MODULE + // Return copy of already loaded FOOTPRINT return (FOOTPRINT*) it->second->Duplicate(); } diff --git a/pcbnew/plugins/legacy/legacy_plugin.h b/pcbnew/plugins/legacy/legacy_plugin.h index f38c296226..b63b1fb6ef 100644 --- a/pcbnew/plugins/legacy/legacy_plugin.h +++ b/pcbnew/plugins/legacy/legacy_plugin.h @@ -120,7 +120,7 @@ protected: LINE_READER* m_reader; ///< no ownership here. FILE* m_fp; ///< no ownership here. - wxString m_field; ///< reused to stuff MODULE fields. + wxString m_field; ///< reused to stuff FOOTPRINT fields. int m_loading_format_version; ///< which BOARD_FORMAT_VERSION am I Load()ing? LP_CACHE* m_cache; bool m_showLegacyZoneWarning; diff --git a/pcbnew/plugins/pcad/pcb_module.cpp b/pcbnew/plugins/pcad/pcb_module.cpp index a922adcc25..de42e3b6f3 100644 --- a/pcbnew/plugins/pcad/pcb_module.cpp +++ b/pcbnew/plugins/pcad/pcb_module.cpp @@ -40,12 +40,12 @@ namespace PCAD2KICAD { -PCB_MODULE::PCB_MODULE( PCB_CALLBACKS* aCallbacks, BOARD* aBoard ) : PCB_COMPONENT( aCallbacks, - aBoard ) +PCB_MODULE::PCB_MODULE( PCB_CALLBACKS* aCallbacks, BOARD* aBoard ) : + PCB_COMPONENT( aCallbacks, aBoard ) { InitTTextValue( &m_value ); m_mirror = 0; - m_objType = wxT( 'M' ); // MODULE + m_objType = wxT( 'M' ); // FOOTPRINT m_KiCadLayer = F_SilkS; // default } @@ -578,21 +578,21 @@ void PCB_MODULE::AddToBoard() } } - // MODULE LINES + // FOOTPRINT LINES for( i = 0; i < (int) m_moduleObjects.GetCount(); i++ ) { if( m_moduleObjects[i]->m_objType == wxT( 'L' ) ) m_moduleObjects[ i ]->AddToFootprint( module ); } - // MODULE Arcs + // FOOTPRINT ARCS for( i = 0; i < (int) m_moduleObjects.GetCount(); i++ ) { if( m_moduleObjects[i]->m_objType == wxT( 'A' ) ) m_moduleObjects[ i ]->AddToFootprint( module ); } - // MODULE POLYGONS + // FOOTPRINT POLYGONS for( i = 0; i < (int) m_moduleObjects.GetCount(); i++ ) { if( m_moduleObjects[i]->m_objType == wxT( 'Z' ) ) diff --git a/pcbnew/specctra_import_export/specctra.h b/pcbnew/specctra_import_export/specctra.h index 5108c63572..c1bfda4b1d 100644 --- a/pcbnew/specctra_import_export/specctra.h +++ b/pcbnew/specctra_import_export/specctra.h @@ -3762,10 +3762,10 @@ class SPECCTRA_DB : public SPECCTRA_LEXER /** * Function makeIMAGE - * allocates an IMAGE on the heap and creates all the PINs according - * to the D_PADs in the MODULE. - * @param aBoard The owner of the MODULE. - * @param aFootprint The MODULE from which to build the IMAGE. + * allocates an IMAGE on the heap and creates all the PINs according to the PADs in the + * FOOTPRINT. + * @param aBoard The owner of the FOOTPRINT. + * @param aFootprint The FOOTPRINT from which to build the IMAGE. * @return IMAGE* - not tested for duplication yet. */ IMAGE* makeIMAGE( BOARD* aBoard, FOOTPRINT* aFootprint ); diff --git a/pcbnew/specctra_import_export/specctra_export.cpp b/pcbnew/specctra_import_export/specctra_export.cpp index 6a85922c04..d5966f997c 100644 --- a/pcbnew/specctra_import_export/specctra_export.cpp +++ b/pcbnew/specctra_import_export/specctra_export.cpp @@ -92,9 +92,9 @@ bool PCB_EDIT_FRAME::ExportSpecctraFile( const wxString& aFullFilename ) LOCALE_IO toggle; // Switch the locale to standard C - // DSN Images (=KiCad FOOTPRINTs and PADs) must be presented from the - // top view. So we temporarily flip any modules which are on the back - // side of the board to the front, and record this in the MODULE's flag field. + // DSN Images (=KiCad FOOTPRINTs and PADs) must be presented from the top view. So we + // temporarily flip any footprints which are on the back side of the board to the front, + // and record this in the FOOTPRINT's flag field. db.FlipMODULEs( GetBoard() ); try @@ -117,7 +117,7 @@ bool PCB_EDIT_FRAME::ExportSpecctraFile( const wxString& aFullFilename ) // done assuredly, even if an exception was thrown and caught. db.RevertMODULEs( GetBoard() ); - // The two calls below to MODULE::Flip(), both set the + // The two calls below to FOOTPRINT::Flip(), both set the // modified flag, yet their actions cancel each other out, so it should // be ok to clear the modify flag. if( !wasModified ) @@ -699,7 +699,7 @@ IMAGE* SPECCTRA_DB::makeIMAGE( BOARD* aBoard, FOOTPRINT* aFootprint ) #if 1 // enable image (outline) scopes. static const KICAD_T scanEDGEs[] = { PCB_FP_SHAPE_T, EOT }; - // get all the MODULE's EDGE_MODULEs and convert those to DSN outlines. + // get all the FOOTPRINT's FP_SHAPEs and convert those to DSN outlines. fpItems.Collect( aFootprint, scanEDGEs ); for( int i = 0; i < fpItems.GetCount(); ++i ) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index eb01bfc15f..55f39ea5db 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -1789,7 +1789,7 @@ BOARD_ITEM* SELECTION_TOOL::pickSmallestComponent( GENERAL_COLLECTOR* aCollector return NULL; } - // All are footprints, now find smallest MODULE + // All are footprints, now find smallest FOOTPRINT int minDim = 0x7FFFFFFF; int minNdx = 0; diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 297b7c4306..a646c324eb 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -57,7 +57,7 @@ typedef void (*CLIENT_SELECTION_FILTER)( const VECTOR2I&, GENERAL_COLLECTOR&, SE * - pick single objects (click LMB) * - add objects to existing selection (Shift+LMB) * - draw selection box (drag LMB) - * - handles MODULEs properly (i.e. selects either MODULE or its PADs, TEXTs, etc.) + * - handles MODULEs properly (i.e. selects either FOOTPRINT or its PADs, TEXTs, etc.) * - takes into account high-contrast & layer visibility settings * - invokes InteractiveEdit tool when user starts to drag selected items */ diff --git a/qa/pcbnew_utils/include/pcbnew_utils/board_file_utils.h b/qa/pcbnew_utils/include/pcbnew_utils/board_file_utils.h index 4f39b9fbdf..a98e66abd7 100644 --- a/qa/pcbnew_utils/include/pcbnew_utils/board_file_utils.h +++ b/qa/pcbnew_utils/include/pcbnew_utils/board_file_utils.h @@ -53,7 +53,7 @@ namespace KI_TEST void DumpBoardToFile( BOARD& aBoard, const std::string& aFilename ); /** - * Utility function to read a #BOARD_ITEM (probably a #MODULE or a #BOARD) + * Utility function to read a #BOARD_ITEM (probably a #FOOTPRINT or a #BOARD) * from a file. * * Helps when writing tests or utilities that can be fed an external file. @@ -66,7 +66,7 @@ std::unique_ptr ReadBoardItemFromStream( std::istream& aStream ); /** * Read a specific kind of #BOARD_ITEM from a stream * - * @tparam ITEM the item type to return (probably a #MODULE or #BOARD) + * @tparam ITEM the item type to return (probably a #FOOTPRINT or #BOARD) * @param aStream the stream to read from. */ template std::unique_ptr ReadItemFromStream( std::istream& aStream ) diff --git a/qa/unit_test_utils/include/unit_test_utils/unit_test_utils.h b/qa/unit_test_utils/include/unit_test_utils/unit_test_utils.h index a993d3b66c..8763a01da6 100644 --- a/qa/unit_test_utils/include/unit_test_utils/unit_test_utils.h +++ b/qa/unit_test_utils/include/unit_test_utils/unit_test_utils.h @@ -180,7 +180,7 @@ template using FOUND_OBJ = typename FOUND_CONT::value_type * an "expected" object, perhaps of a different type. * * Exactly what "equivalent to" means depends heavily on the context and what - * is care about. For example, if you only care about a #MODULE's refdes, + * is care about. For example, if you only care about a #FOOTPRINT's refdes, * std::string is sufficient to indicate a "match". * * This can be used, for example, for checking a set of results without having