More cleanup of MODULE to see if it fixes SWIG error.

This commit is contained in:
Jeff Young 2020-11-13 21:07:01 +00:00
parent 47e86d76fb
commit 86b6afd14b
22 changed files with 49 additions and 49 deletions

View File

@ -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
{

View File

@ -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

View File

@ -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".

View File

@ -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;
}
}

View File

@ -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.

View File

@ -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;

View File

@ -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.

View File

@ -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;

View File

@ -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;

View File

@ -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 );

View File

@ -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.

View File

@ -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.

View File

@ -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)

View File

@ -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();
}

View File

@ -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;

View File

@ -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' ) )

View File

@ -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 );

View File

@ -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 )

View File

@ -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;

View File

@ -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
*/

View File

@ -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<BOARD_ITEM> 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 <typename ITEM> std::unique_ptr<ITEM> ReadItemFromStream( std::istream& aStream )

View File

@ -180,7 +180,7 @@ template <typename FOUND_CONT> 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