You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1147 lines
43 KiB

5 years ago
7 months ago
7 months ago
11 years ago
7 months ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
11 years ago
4 years ago
5 years ago
  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
  5. * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License
  9. * as published by the Free Software Foundation; either version 2
  10. * of the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, you may find one here:
  19. * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  20. * or you may search the http://www.gnu.org website for the version 2 license,
  21. * or you may write to the Free Software Foundation, Inc.,
  22. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  23. */
  24. #ifndef FOOTPRINT_H
  25. #define FOOTPRINT_H
  26. #include <deque>
  27. #include <template_fieldnames.h>
  28. #include <board_item_container.h>
  29. #include <board_item.h>
  30. #include <collectors.h>
  31. #include <component_classes/component_class_manager.h>
  32. #include <embedded_files.h>
  33. #include <layer_ids.h> // ALL_LAYERS definition.
  34. #include <lset.h>
  35. #include <lib_id.h>
  36. #include <list>
  37. #include <zones.h>
  38. #include <convert_shape_list_to_polygon.h>
  39. #include <pcb_item_containers.h>
  40. #include <pcb_text.h>
  41. #include <pcb_field.h>
  42. #include <functional>
  43. #include <math/vector3.h>
  44. class LINE_READER;
  45. class EDA_3D_CANVAS;
  46. class PAD;
  47. class BOARD;
  48. class MSG_PANEL_ITEM;
  49. class SHAPE;
  50. class REPORTER;
  51. class COMPONENT_CLASS_CACHE_PROXY;
  52. namespace KIGFX {
  53. class VIEW;
  54. }
  55. namespace KIFONT {
  56. class OUTLINE_FONT;
  57. }
  58. enum INCLUDE_NPTH_T
  59. {
  60. DO_NOT_INCLUDE_NPTH = false,
  61. INCLUDE_NPTH = true
  62. };
  63. /**
  64. * The set of attributes allowed within a FOOTPRINT, using FOOTPRINT::SetAttributes()
  65. * and FOOTPRINT::GetAttributes(). These are to be ORed together when calling
  66. * FOOTPRINT::SetAttributes()
  67. */
  68. enum FOOTPRINT_ATTR_T
  69. {
  70. FP_THROUGH_HOLE = 0x0001,
  71. FP_SMD = 0x0002,
  72. FP_EXCLUDE_FROM_POS_FILES = 0x0004,
  73. FP_EXCLUDE_FROM_BOM = 0x0008,
  74. FP_BOARD_ONLY = 0x0010, // Footprint has no corresponding symbol
  75. FP_JUST_ADDED = 0x0020, // Footprint just added by netlist update
  76. FP_DNP = 0x0040
  77. };
  78. class FP_3DMODEL
  79. {
  80. public:
  81. FP_3DMODEL() :
  82. // Initialize with sensible values
  83. m_Scale { 1, 1, 1 },
  84. m_Rotation { 0, 0, 0 },
  85. m_Offset { 0, 0, 0 },
  86. m_Opacity( 1.0 ),
  87. m_Show( true )
  88. {
  89. }
  90. VECTOR3D m_Scale; ///< 3D model scaling factor (dimensionless)
  91. VECTOR3D m_Rotation; ///< 3D model rotation (degrees)
  92. VECTOR3D m_Offset; ///< 3D model offset (mm)
  93. double m_Opacity;
  94. wxString m_Filename; ///< The 3D shape filename in 3D library
  95. bool m_Show; ///< Include model in rendering
  96. bool operator==( const FP_3DMODEL& aOther ) const
  97. {
  98. return m_Scale == aOther.m_Scale
  99. && m_Rotation == aOther.m_Rotation
  100. && m_Offset == aOther.m_Offset
  101. && m_Opacity == aOther.m_Opacity
  102. && m_Filename == aOther.m_Filename
  103. && m_Show == aOther.m_Show;
  104. }
  105. };
  106. class FOOTPRINT : public BOARD_ITEM_CONTAINER, public EMBEDDED_FILES
  107. {
  108. public:
  109. FOOTPRINT( BOARD* parent );
  110. FOOTPRINT( const FOOTPRINT& aFootprint );
  111. // Move constructor and operator needed due to std containers inside the footprint
  112. FOOTPRINT( FOOTPRINT&& aFootprint );
  113. ~FOOTPRINT();
  114. FOOTPRINT& operator=( const FOOTPRINT& aOther );
  115. FOOTPRINT& operator=( FOOTPRINT&& aOther );
  116. void CopyFrom( const BOARD_ITEM* aOther ) override;
  117. void Serialize( google::protobuf::Any &aContainer ) const override;
  118. bool Deserialize( const google::protobuf::Any &aContainer ) override;
  119. static inline bool ClassOf( const EDA_ITEM* aItem )
  120. {
  121. return aItem && aItem->Type() == PCB_FOOTPRINT_T;
  122. }
  123. /// Resets the caches for this footprint, for example if it was modified via the API
  124. void InvalidateGeometryCaches();
  125. LSET GetPrivateLayers() const { return m_privateLayers; }
  126. void SetPrivateLayers( const LSET& aLayers ) { m_privateLayers = aLayers; }
  127. ///< @copydoc BOARD_ITEM_CONTAINER::Add()
  128. void Add( BOARD_ITEM* aItem, ADD_MODE aMode = ADD_MODE::INSERT,
  129. bool aSkipConnectivity = false ) override;
  130. ///< @copydoc BOARD_ITEM_CONTAINER::Remove()
  131. void Remove( BOARD_ITEM* aItem, REMOVE_MODE aMode = REMOVE_MODE::NORMAL ) override;
  132. /**
  133. * Clear (i.e. force the ORPHANED dummy net info) the net info which
  134. * depends on a given board for all pads of the footprint.
  135. *
  136. * This is needed when a footprint is copied between the fp editor and
  137. * the board editor for instance, because net info become fully broken
  138. */
  139. void ClearAllNets();
  140. /**
  141. * Old footprints do not always have a valid UUID (some can be set to null uuid)
  142. * However null UUIDs, having a special meaning in editor, create issues when
  143. * editing a footprint
  144. * So all null uuids a re replaced by a valid uuid
  145. * @return true if at least one uuid is changed, false if no change
  146. */
  147. bool FixUuids();
  148. /**
  149. * Return the bounding box containing pads when the footprint is on the front side,
  150. * orientation 0, position 0,0.
  151. *
  152. * Mainly used in Gerber place file to draw a footprint outline when the courtyard
  153. * is missing or broken.
  154. *
  155. * @return The rectangle containing the pads for the normalized footprint.
  156. */
  157. BOX2I GetFpPadsLocalBbox() const;
  158. /**
  159. * Return a bounding polygon for the shapes and pads in the footprint.
  160. *
  161. * This operation is slower but more accurate than calculating a bounding box.
  162. */
  163. SHAPE_POLY_SET GetBoundingHull() const;
  164. SHAPE_POLY_SET GetBoundingHull( PCB_LAYER_ID aLayer ) const;
  165. bool TextOnly() const;
  166. // Virtual function
  167. const BOX2I GetBoundingBox() const override;
  168. const BOX2I GetBoundingBox( bool aIncludeText ) const;
  169. /**
  170. * Return the bounding box of the footprint on a given set of layers
  171. */
  172. const BOX2I GetLayerBoundingBox( const LSET& aLayers ) const;
  173. VECTOR2I GetCenter() const override { return GetBoundingBox( false ).GetCenter(); }
  174. std::deque<PAD*>& Pads() { return m_pads; }
  175. const std::deque<PAD*>& Pads() const { return m_pads; }
  176. DRAWINGS& GraphicalItems() { return m_drawings; }
  177. const DRAWINGS& GraphicalItems() const { return m_drawings; }
  178. ZONES& Zones() { return m_zones; }
  179. const ZONES& Zones() const { return m_zones; }
  180. GROUPS& Groups() { return m_groups; }
  181. const GROUPS& Groups() const { return m_groups; }
  182. bool HasThroughHolePads() const;
  183. std::vector<FP_3DMODEL>& Models() { return m_3D_Drawings; }
  184. const std::vector<FP_3DMODEL>& Models() const { return m_3D_Drawings; }
  185. void SetPosition( const VECTOR2I& aPos ) override;
  186. VECTOR2I GetPosition() const override { return m_pos; }
  187. void SetOrientation( const EDA_ANGLE& aNewAngle );
  188. EDA_ANGLE GetOrientation() const { return m_orient; }
  189. /**
  190. * Used as Layer property setter -- performs a flip if necessary to set the footprint layer
  191. * @param aLayer is the target layer (F_Cu or B_Cu)
  192. */
  193. void SetLayerAndFlip( PCB_LAYER_ID aLayer );
  194. // to make property magic work
  195. PCB_LAYER_ID GetLayer() const override { return BOARD_ITEM::GetLayer(); }
  196. // For property system:
  197. void SetOrientationDegrees( double aOrientation )
  198. {
  199. SetOrientation( EDA_ANGLE( aOrientation, DEGREES_T ) );
  200. }
  201. double GetOrientationDegrees() const
  202. {
  203. return m_orient.AsDegrees();
  204. }
  205. const LIB_ID& GetFPID() const { return m_fpid; }
  206. void SetFPID( const LIB_ID& aFPID )
  207. {
  208. m_fpid = aFPID;
  209. }
  210. wxString GetFPIDAsString() const { return m_fpid.Format(); }
  211. void SetFPIDAsString( const wxString& aFPID ) { m_fpid.Parse( aFPID ); }
  212. wxString GetLibDescription() const { return m_libDescription; }
  213. void SetLibDescription( const wxString& aDesc ) { m_libDescription = aDesc; }
  214. wxString GetKeywords() const { return m_keywords; }
  215. void SetKeywords( const wxString& aKeywords ) { m_keywords = aKeywords; }
  216. const KIID_PATH& GetPath() const { return m_path; }
  217. void SetPath( const KIID_PATH& aPath ) { m_path = aPath; }
  218. wxString GetSheetname() const { return m_sheetname; }
  219. void SetSheetname( const wxString& aSheetname ) { m_sheetname = aSheetname; }
  220. wxString GetSheetfile() const { return m_sheetfile; }
  221. void SetSheetfile( const wxString& aSheetfile ) { m_sheetfile = aSheetfile; }
  222. wxString GetFilters() const { return m_filters; }
  223. void SetFilters( const wxString& aFilters ) { m_filters = aFilters; }
  224. std::optional<int> GetLocalClearance() const { return m_clearance; }
  225. void SetLocalClearance( std::optional<int> aClearance ) { m_clearance = aClearance; }
  226. std::optional<int> GetLocalSolderMaskMargin() const { return m_solderMaskMargin; }
  227. void SetLocalSolderMaskMargin( std::optional<int> aMargin ) { m_solderMaskMargin = aMargin; }
  228. std::optional<int> GetLocalSolderPasteMargin() const { return m_solderPasteMargin; }
  229. void SetLocalSolderPasteMargin( std::optional<int> aMargin ) { m_solderPasteMargin = aMargin; }
  230. std::optional<double> GetLocalSolderPasteMarginRatio() const { return m_solderPasteMarginRatio; }
  231. void SetLocalSolderPasteMarginRatio( std::optional<double> aRatio ) { m_solderPasteMarginRatio = aRatio; }
  232. void SetLocalZoneConnection( ZONE_CONNECTION aType ) { m_zoneConnection = aType; }
  233. ZONE_CONNECTION GetLocalZoneConnection() const { return m_zoneConnection; }
  234. int GetAttributes() const { return m_attributes; }
  235. void SetAttributes( int aAttributes ) { m_attributes = aAttributes; }
  236. bool AllowMissingCourtyard() const { return m_allowMissingCourtyard; }
  237. void SetAllowMissingCourtyard( bool aAllow ) { m_allowMissingCourtyard = aAllow; }
  238. bool AllowSolderMaskBridges() const { return m_allowSolderMaskBridges; }
  239. void SetAllowSolderMaskBridges( bool aAllow ) { m_allowSolderMaskBridges = aAllow; }
  240. void SetFlag( int aFlag ) { m_arflag = aFlag; }
  241. void IncrementFlag() { m_arflag += 1; }
  242. int GetFlag() const { return m_arflag; }
  243. bool IsNetTie() const
  244. {
  245. for( const wxString& group : m_netTiePadGroups )
  246. {
  247. if( !group.IsEmpty() )
  248. return true;
  249. }
  250. return false;
  251. }
  252. std::optional<int> GetLocalClearance( wxString* aSource ) const
  253. {
  254. if( m_clearance.has_value() && aSource )
  255. *aSource = wxString::Format( _( "footprint %s" ), GetReference() );
  256. return m_clearance;
  257. }
  258. /**
  259. * Return any local clearance overrides set in the "classic" (ie: pre-rule) system.
  260. *
  261. * @param aSource [out] optionally reports the source as a user-readable string.
  262. * @return the clearance in internal units.
  263. */
  264. std::optional<int> GetClearanceOverrides( wxString* aSource ) const
  265. {
  266. return GetLocalClearance( aSource );
  267. }
  268. ZONE_CONNECTION GetZoneConnectionOverrides( wxString* aSource ) const
  269. {
  270. if( m_zoneConnection != ZONE_CONNECTION::INHERITED && aSource )
  271. *aSource = wxString::Format( _( "footprint %s" ), GetReference() );
  272. return m_zoneConnection;
  273. }
  274. /**
  275. * @return a list of pad groups, each of which is allowed to short nets within their group.
  276. * A pad group is a comma-separated list of pad numbers.
  277. */
  278. const std::vector<wxString>& GetNetTiePadGroups() const { return m_netTiePadGroups; }
  279. void ClearNetTiePadGroups()
  280. {
  281. m_netTiePadGroups.clear();
  282. }
  283. void AddNetTiePadGroup( const wxString& aGroup )
  284. {
  285. m_netTiePadGroups.emplace_back( aGroup );
  286. }
  287. /**
  288. * @return a map from pad numbers to net-tie group indices. If a pad is not a member of
  289. * a net-tie group its index will be -1.
  290. */
  291. std::map<wxString, int> MapPadNumbersToNetTieGroups() const;
  292. /**
  293. * @return a list of pads that appear in \a aPad's net-tie pad group.
  294. */
  295. std::vector<PAD*> GetNetTiePads( PAD* aPad ) const;
  296. /**
  297. * Returns the most likely attribute based on pads
  298. * Either FP_THROUGH_HOLE/FP_SMD/OTHER(0)
  299. * @return 0/FP_SMD/FP_THROUGH_HOLE
  300. */
  301. int GetLikelyAttribute() const;
  302. void Move( const VECTOR2I& aMoveVector ) override;
  303. void Rotate( const VECTOR2I& aRotCentre, const EDA_ANGLE& aAngle ) override;
  304. void Flip( const VECTOR2I& aCentre, FLIP_DIRECTION aFlipDirection ) override;
  305. /**
  306. * Move the reference point of the footprint.
  307. *
  308. * It looks like a move footprint:
  309. * the footprints elements (pads, outlines, edges .. ) are moved
  310. * However:
  311. * - the footprint position is not modified.
  312. * - the relative (local) coordinates of these items are modified
  313. * (a move footprint does not change these local coordinates,
  314. * but changes the footprint position)
  315. */
  316. void MoveAnchorPosition( const VECTOR2I& aMoveVector );
  317. /**
  318. * @return true if the footprint is flipped, i.e. on the back side of the board
  319. */
  320. bool IsFlipped() const { return GetLayer() == B_Cu; }
  321. /**
  322. * Use instead of IsFlipped() when you also need to account for unsided footprints (those
  323. * purely on user-layers, etc.).
  324. */
  325. PCB_LAYER_ID GetSide() const;
  326. /**
  327. * @copydoc BOARD_ITEM::IsOnLayer
  328. */
  329. bool IsOnLayer( PCB_LAYER_ID aLayer ) const override;
  330. // m_footprintStatus bits:
  331. #define FP_is_LOCKED 0x01 ///< footprint LOCKED: no autoplace allowed
  332. #define FP_is_PLACED 0x02 ///< In autoplace: footprint automatically placed
  333. #define FP_to_PLACE 0x04 ///< In autoplace: footprint waiting for autoplace
  334. #define FP_PADS_are_LOCKED 0x08
  335. bool IsLocked() const override
  336. {
  337. return ( m_fpStatus & FP_is_LOCKED ) != 0;
  338. }
  339. /**
  340. * Set the #MODULE_is_LOCKED bit in the m_ModuleStatus.
  341. *
  342. * @param isLocked true means turn on locked status, else unlock
  343. */
  344. void SetLocked( bool isLocked ) override
  345. {
  346. if( isLocked )
  347. m_fpStatus |= FP_is_LOCKED;
  348. else
  349. m_fpStatus &= ~FP_is_LOCKED;
  350. }
  351. /**
  352. * @return true if the footprint is flagged with conflicting with some item
  353. */
  354. bool IsConflicting() const;
  355. bool IsPlaced() const { return m_fpStatus & FP_is_PLACED; }
  356. void SetIsPlaced( bool isPlaced )
  357. {
  358. if( isPlaced )
  359. m_fpStatus |= FP_is_PLACED;
  360. else
  361. m_fpStatus &= ~FP_is_PLACED;
  362. }
  363. bool NeedsPlaced() const { return m_fpStatus & FP_to_PLACE; }
  364. void SetNeedsPlaced( bool needsPlaced )
  365. {
  366. if( needsPlaced )
  367. m_fpStatus |= FP_to_PLACE;
  368. else
  369. m_fpStatus &= ~FP_to_PLACE;
  370. }
  371. bool LegacyPadsLocked() const { return m_fpStatus & FP_PADS_are_LOCKED; }
  372. /**
  373. * Test if footprint attributes for type (SMD/Through hole/Other) match the expected
  374. * type based on the pads in the footprint.
  375. * Footprints with plated through-hole pads should usually be marked through hole even if they
  376. * also have SMD because they might not be auto-placed. Exceptions to this might be shielded
  377. * connectors. Otherwise, footprints with SMD pads should be marked SMD.
  378. * Footprints with no connecting pads should be marked "Other"
  379. *
  380. * @param aErrorHandler callback to handle the error messages generated
  381. */
  382. void CheckFootprintAttributes( const std::function<void( const wxString& )>& aErrorHandler );
  383. /**
  384. * Run non-board-specific DRC checks on footprint's pads. These are the checks supported by
  385. * both the PCB DRC and the Footprint Editor Footprint Checker.
  386. *
  387. * @param aErrorHandler callback to handle the error messages generated
  388. */
  389. void CheckPads( UNITS_PROVIDER* aUnitsProvider,
  390. const std::function<void( const PAD*, int, const wxString& )>& aErrorHandler );
  391. /**
  392. * Check for overlapping, different-numbered, non-net-tie pads.
  393. *
  394. * @param aErrorHandler callback to handle the error messages generated
  395. */
  396. void CheckShortingPads( const std::function<void( const PAD*, const PAD*, int aErrorCode,
  397. const VECTOR2I& )>& aErrorHandler );
  398. /**
  399. * Check for un-allowed shorting of pads in net-tie footprints. If two pads are shorted,
  400. * they must both appear in one of the allowed-shorting lists.
  401. *
  402. * @param aErrorHandler callback to handle the error messages generated
  403. */
  404. void CheckNetTies( const std::function<void( const BOARD_ITEM* aItem,
  405. const BOARD_ITEM* bItem,
  406. const BOARD_ITEM* cItem,
  407. const VECTOR2I& )>& aErrorHandler );
  408. /**
  409. * Sanity check net-tie pad groups. Pads cannot be listed more than once, and pad numbers
  410. * must correspond to a pad.
  411. *
  412. * @param aErrorHandler callback to handle the error messages generated
  413. */
  414. void CheckNetTiePadGroups( const std::function<void( const wxString& )>& aErrorHandler );
  415. void CheckClippedSilk( const std::function<void( BOARD_ITEM* aItemA,
  416. BOARD_ITEM* aItemB,
  417. const VECTOR2I& aPt )>& aErrorHandler );
  418. /**
  419. * Cache the pads that are allowed to connect to each other in the footprint.
  420. */
  421. void BuildNetTieCache();
  422. /**
  423. * Get the set of net codes that are allowed to connect to a footprint item
  424. */
  425. const std::set<int>& GetNetTieCache( const BOARD_ITEM* aItem ) const
  426. {
  427. static const std::set<int> emptySet;
  428. auto it = m_netTieCache.find( aItem );
  429. if( it == m_netTieCache.end() )
  430. return emptySet;
  431. return it->second;
  432. }
  433. /**
  434. * Generate pads shapes on layer \a aLayer as polygons and adds these polygons to
  435. * \a aBuffer.
  436. *
  437. * Useful to generate a polygonal representation of a footprint in 3D view and plot functions,
  438. * when a full polygonal approach is needed.
  439. *
  440. * @param aLayer is the layer to consider, or #UNDEFINED_LAYER to consider all layers.
  441. * @param aBuffer i the buffer to store polygons.
  442. * @param aClearance is an additional size to add to pad shapes.
  443. * @param aMaxError is the maximum deviation from true for arcs.
  444. */
  445. void TransformPadsToPolySet( SHAPE_POLY_SET& aBuffer, PCB_LAYER_ID aLayer, int aClearance,
  446. int aMaxError, ERROR_LOC aErrorLoc ) const;
  447. /**
  448. * Generate shapes of graphic items (outlines) on layer \a aLayer as polygons and adds these
  449. * polygons to \a aBuffer.
  450. *
  451. * Useful to generate a polygonal representation of a footprint in 3D view and plot functions,
  452. * when a full polygonal approach is needed.
  453. *
  454. * @param aLayer is the layer to consider, or #UNDEFINED_LAYER to consider all.
  455. * @param aBuffer is the buffer to store polygons.
  456. * @param aClearance is a value to inflate shapes.
  457. * @param aError is the maximum error between true arc and polygon approximation.
  458. * @param aIncludeText set to true to transform text shapes.
  459. * @param aIncludeShapes set to true to transform footprint shapes.
  460. */
  461. void TransformFPShapesToPolySet( SHAPE_POLY_SET& aBuffer, PCB_LAYER_ID aLayer, int aClearance,
  462. int aError, ERROR_LOC aErrorLoc,
  463. bool aIncludeText = true,
  464. bool aIncludeShapes = true,
  465. bool aIncludePrivateItems = false ) const;
  466. /**
  467. * This function is the same as TransformFPShapesToPolySet but only generates text.
  468. */
  469. void TransformFPTextToPolySet( SHAPE_POLY_SET& aBuffer, PCB_LAYER_ID aLayer, int aClearance,
  470. int aError, ERROR_LOC aErrorLoc ) const
  471. {
  472. TransformFPShapesToPolySet( aBuffer, aLayer, aClearance, aError, aErrorLoc, true, false );
  473. }
  474. /**
  475. * Return the list of system text vars for this footprint.
  476. */
  477. void GetContextualTextVars( wxArrayString* aVars ) const;
  478. /**
  479. * Resolve any references to system tokens supported by the component.
  480. *
  481. * @param aDepth a counter to limit recursion and circular references.
  482. */
  483. bool ResolveTextVar( wxString* token, int aDepth = 0 ) const;
  484. /// @copydoc EDA_ITEM::GetMsgPanelInfo
  485. void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
  486. bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override;
  487. bool Matches( const EDA_SEARCH_DATA& aSearchData, void* aAuxData ) const override;
  488. /**
  489. * Test if a point is inside the bounding polygon of the footprint.
  490. *
  491. * The other hit test methods are just checking the bounding box, which can be quite
  492. * inaccurate for rotated or oddly-shaped footprints.
  493. *
  494. * @param aPosition is the point to test
  495. * @return true if aPosition is inside the bounding polygon
  496. */
  497. bool HitTestAccurate( const VECTOR2I& aPosition, int aAccuracy = 0 ) const;
  498. bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override;
  499. bool HitTest( const SHAPE_LINE_CHAIN& aPoly, bool aContained ) const override;
  500. /**
  501. * Test if the point hits one or more of the footprint elements on a given layer.
  502. *
  503. * @param aPosition is the point to test
  504. * @param aAccuracy is the hit test accuracy
  505. * @param aLayer is the layer to test
  506. * @return true if aPosition hits a footprint element on aLayer
  507. */
  508. bool HitTestOnLayer( const VECTOR2I& aPosition, PCB_LAYER_ID aLayer, int aAccuracy = 0 ) const;
  509. bool HitTestOnLayer( const BOX2I& aRect, bool aContained, PCB_LAYER_ID aLayer, int aAccuracy = 0 ) const;
  510. /**
  511. * @return reference designator text.
  512. */
  513. const wxString& GetReference() const { return Reference().GetText(); }
  514. /**
  515. * @param aReference A reference to a wxString object containing the reference designator
  516. * text.
  517. */
  518. void SetReference( const wxString& aReference ) { Reference().SetText( aReference ); }
  519. // Property system doesn't like const references
  520. wxString GetReferenceAsString() const
  521. {
  522. return GetReference();
  523. }
  524. /**
  525. * Bump the current reference by \a aDelta.
  526. */
  527. void IncrementReference( int aDelta );
  528. /**
  529. * @return the value text.
  530. */
  531. const wxString& GetValue() const { return Value().GetText(); }
  532. /**
  533. * @param aValue A reference to a wxString object containing the value text.
  534. */
  535. void SetValue( const wxString& aValue ) { Value().SetText( aValue ); }
  536. // Property system doesn't like const references
  537. wxString GetValueAsString() const
  538. {
  539. return GetValue();
  540. }
  541. /// read/write accessors:
  542. PCB_FIELD& Value() { return *GetField( FIELD_T::VALUE ); }
  543. PCB_FIELD& Reference() { return *GetField( FIELD_T::REFERENCE ); }
  544. /// The const versions to keep the compiler happy.
  545. const PCB_FIELD& Value() const { return *GetField( FIELD_T::VALUE ); }
  546. const PCB_FIELD& Reference() const { return *GetField( FIELD_T::REFERENCE ); }
  547. //-----<Fields>-----------------------------------------------------------
  548. /**
  549. * Return a mandatory field in this footprint. The const version will return nullptr if
  550. * the field doesn't exist; the non-const version will create the field and return it.
  551. */
  552. PCB_FIELD* GetField( FIELD_T aFieldType );
  553. const PCB_FIELD* GetField( FIELD_T aFieldNdx ) const;
  554. /**
  555. * Return a field in this symbol.
  556. *
  557. * @param aFieldName is the name of the field
  558. *
  559. * @return is the field with \a aFieldName or NULL if the field does not exist.
  560. */
  561. PCB_FIELD* GetField( const wxString& aFieldName ) const;
  562. bool HasField( const wxString& aFieldName ) const;
  563. /**
  564. * Populate a std::vector with PCB_TEXTs.
  565. *
  566. * @param aVector is the vector to populate.
  567. * @param aVisibleOnly is used to add only the fields that are visible and contain text.
  568. */
  569. void GetFields( std::vector<PCB_FIELD*>& aVector, bool aVisibleOnly ) const;
  570. /**
  571. * Return a reference to the deque holding the footprint's fields
  572. */
  573. const std::deque<PCB_FIELD*>& GetFields() const { return m_fields; }
  574. std::deque<PCB_FIELD*>& GetFields() { return m_fields; }
  575. /**
  576. * Return the next ordinal for a user field for this footprint
  577. */
  578. int GetNextFieldOrdinal() const;
  579. /**
  580. * @brief Apply default board settings to the footprint field text properties.
  581. *
  582. * This is needed because the board settings are not available when the footprint is
  583. * being created in the footprint library cache, and we want these fields to have
  584. * the correct default text properties.
  585. */
  586. void ApplyDefaultSettings( const BOARD& board, bool aStyleFields, bool aStyleText,
  587. bool aStyleShapes );
  588. bool IsBoardOnly() const { return m_attributes & FP_BOARD_ONLY; }
  589. void SetBoardOnly( bool aIsBoardOnly = true )
  590. {
  591. if( aIsBoardOnly )
  592. m_attributes |= FP_BOARD_ONLY;
  593. else
  594. m_attributes &= ~FP_BOARD_ONLY;
  595. }
  596. bool IsExcludedFromPosFiles() const { return m_attributes & FP_EXCLUDE_FROM_POS_FILES; }
  597. void SetExcludedFromPosFiles( bool aExclude = true )
  598. {
  599. if( aExclude )
  600. m_attributes |= FP_EXCLUDE_FROM_POS_FILES;
  601. else
  602. m_attributes &= ~FP_EXCLUDE_FROM_POS_FILES;
  603. }
  604. bool IsExcludedFromBOM() const { return m_attributes & FP_EXCLUDE_FROM_BOM; }
  605. void SetExcludedFromBOM( bool aExclude = true )
  606. {
  607. if( aExclude )
  608. m_attributes |= FP_EXCLUDE_FROM_BOM;
  609. else
  610. m_attributes &= ~FP_EXCLUDE_FROM_BOM;
  611. }
  612. bool IsDNP() const { return m_attributes & FP_DNP; }
  613. void SetDNP( bool aDNP = true )
  614. {
  615. if( aDNP )
  616. m_attributes |= FP_DNP;
  617. else
  618. m_attributes &= ~FP_DNP;
  619. }
  620. void SetFileFormatVersionAtLoad( int aVersion ) { m_fileFormatVersionAtLoad = aVersion; }
  621. int GetFileFormatVersionAtLoad() const { return m_fileFormatVersionAtLoad; }
  622. /**
  623. * Return a #PAD with a matching number.
  624. *
  625. * @note Numbers may not be unique depending on how the footprint was created.
  626. *
  627. * @param aPadNumber the pad number to find.
  628. * @param aSearchAfterMe = not nullptr to find a pad living after aAfterMe
  629. * @return the first matching numbered #PAD is returned or NULL if not found.
  630. */
  631. PAD* FindPadByNumber( const wxString& aPadNumber, PAD* aSearchAfterMe = nullptr ) const;
  632. /**
  633. * Get a pad at \a aPosition on \a aLayerMask in the footprint.
  634. *
  635. * @param aPosition A VECTOR2I object containing the position to hit test.
  636. * @param aLayerMask A layer or layers to mask the hit test.
  637. * @return A pointer to a #PAD object if found otherwise NULL.
  638. */
  639. PAD* GetPad( const VECTOR2I& aPosition, const LSET& aLayerMask = LSET::AllLayersMask() );
  640. std::vector<const PAD*> GetPads( const wxString& aPadNumber,
  641. const PAD* aIgnore = nullptr ) const;
  642. /**
  643. * Return the number of pads.
  644. *
  645. * @param aIncludeNPTH includes non-plated through holes when true. Does not include
  646. * non-plated through holes when false.
  647. * @return the number of pads according to \a aIncludeNPTH.
  648. */
  649. unsigned GetPadCount( INCLUDE_NPTH_T aIncludeNPTH = INCLUDE_NPTH_T(INCLUDE_NPTH) ) const;
  650. /**
  651. * Return the number of unique non-blank pads.
  652. *
  653. * A complex pad can be built with many pads having the same pad name to create a complex
  654. * shape or fragmented solder paste areas.
  655. *
  656. * @param aIncludeNPTH includes non-plated through holes when true. Does not include
  657. * non-plated through holes when false.
  658. * @return the number of unique pads according to \a aIncludeNPTH.
  659. */
  660. unsigned GetUniquePadCount( INCLUDE_NPTH_T aIncludeNPTH = INCLUDE_NPTH_T(INCLUDE_NPTH) ) const;
  661. /**
  662. * Return the names of the unique, non-blank pads.
  663. */
  664. std::set<wxString>
  665. GetUniquePadNumbers( INCLUDE_NPTH_T aIncludeNPTH = INCLUDE_NPTH_T(INCLUDE_NPTH) ) const;
  666. /**
  667. * Return the next available pad number in the footprint.
  668. *
  669. * @param aFillSequenceGaps true if the numbering should "fill in" gaps in the sequence,
  670. * else return the highest value + 1
  671. * @return the next available pad number
  672. */
  673. wxString GetNextPadNumber( const wxString& aLastPadName ) const;
  674. bool GetDuplicatePadNumbersAreJumpers() const { return m_duplicatePadNumbersAreJumpers; }
  675. void SetDuplicatePadNumbersAreJumpers( bool aEnabled ) { m_duplicatePadNumbersAreJumpers = aEnabled; }
  676. /**
  677. * Each jumper pad group is a set of pad numbers that should be treated as internally connected.
  678. * @return The list of jumper pad groups in this footprint
  679. */
  680. std::vector<std::set<wxString>>& JumperPadGroups() { return m_jumperPadGroups; }
  681. const std::vector<std::set<wxString>>& JumperPadGroups() const { return m_jumperPadGroups; }
  682. /// Retrieves the jumper group containing the specified pad number, if one exists
  683. std::optional<const std::set<wxString>> GetJumperPadGroup( const wxString& aPadNumber ) const;
  684. /**
  685. * Position Reference and Value fields at the top and bottom of footprint's bounding box.
  686. */
  687. void AutoPositionFields();
  688. /**
  689. * Get the type of footprint
  690. * @return "SMD"/"Through hole"/"Other" based on attributes
  691. */
  692. wxString GetTypeName() const;
  693. double GetArea( int aPadding = 0 ) const;
  694. KIID GetLink() const { return m_link; }
  695. void SetLink( const KIID& aLink ) { m_link = aLink; }
  696. BOARD_ITEM* Duplicate( bool addToParentGroup, BOARD_COMMIT* aCommit = nullptr ) const override;
  697. /**
  698. * Duplicate a given item within the footprint, optionally adding it to the board.
  699. *
  700. * @return the new item, or NULL if the item could not be duplicated.
  701. */
  702. BOARD_ITEM* DuplicateItem( bool addToParentGroup, BOARD_COMMIT* aCommit, const BOARD_ITEM* aItem,
  703. bool addToFootprint = false );
  704. /**
  705. * Add \a a3DModel definition to the end of the 3D model list.
  706. *
  707. * @param a3DModel A pointer to a #FP_3DMODEL to add to the list.
  708. */
  709. void Add3DModel( FP_3DMODEL* a3DModel );
  710. INSPECT_RESULT Visit( INSPECTOR inspector, void* testData,
  711. const std::vector<KICAD_T>& aScanTypes ) override;
  712. wxString GetClass() const override
  713. {
  714. return wxT( "FOOTPRINT" );
  715. }
  716. wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider, bool aFull ) const override;
  717. BITMAPS GetMenuImage() const override;
  718. EDA_ITEM* Clone() const override;
  719. ///< @copydoc BOARD_ITEM::RunOnChildren
  720. void RunOnChildren( const std::function<void( BOARD_ITEM* )>& aFunction, RECURSE_MODE aMode ) const override;
  721. virtual std::vector<int> ViewGetLayers() const override;
  722. double ViewGetLOD( int aLayer, const KIGFX::VIEW* aView ) const override;
  723. virtual const BOX2I ViewBBox() const override;
  724. /**
  725. * Test for validity of a name of a footprint to be used in a footprint library
  726. * ( no spaces, dir separators ... ).
  727. *
  728. * @param aName is the name in library to validate.
  729. * @return true if the given name is valid
  730. */
  731. static bool IsLibNameValid( const wxString& aName );
  732. /**
  733. * Test for validity of the name in a library of the footprint ( no spaces, dir
  734. * separators ... ).
  735. *
  736. * @param aUserReadable set to false to get the list of invalid characters or true to get
  737. * a readable form (i.e ' ' = 'space' '\\t'= 'tab').
  738. *
  739. * @return the list of invalid chars in the library name.
  740. */
  741. static const wxChar* StringLibNameInvalidChars( bool aUserReadable );
  742. /**
  743. * Return true if a board footprint differs from the library version.
  744. */
  745. bool FootprintNeedsUpdate( const FOOTPRINT* aLibFP, int aCompareFlags = 0,
  746. REPORTER* aReporter = nullptr );
  747. /**
  748. * Take ownership of caller's heap allocated aInitialComments block.
  749. *
  750. * The comments are single line strings already containing the s-expression comments with
  751. * optional leading whitespace and then a '#' character followed by optional single line
  752. * text (text with no line endings, not even one). This block of single line comments
  753. * will be output upfront of any generated s-expression text in the PCBIO::Format() function.
  754. *
  755. * @note A block of single line comments constitutes a multiline block of single line
  756. * comments. That is, the block is made of consecutive single line comments.
  757. *
  758. * @param aInitialComments is a heap allocated wxArrayString or NULL, which the caller
  759. * gives up ownership of over to this FOOTPRINT.
  760. */
  761. void SetInitialComments( wxArrayString* aInitialComments )
  762. {
  763. delete m_initial_comments;
  764. m_initial_comments = aInitialComments;
  765. }
  766. /**
  767. * Calculate the ratio of total area of the footprint pads and graphical items to the
  768. * area of the footprint. Used by selection tool heuristics.
  769. *
  770. * @return the ratio.
  771. */
  772. double CoverageRatio( const GENERAL_COLLECTOR& aCollector ) const;
  773. static double GetCoverageArea( const BOARD_ITEM* aItem, const GENERAL_COLLECTOR& aCollector );
  774. /// Return the initial comments block or NULL if none, without transfer of ownership.
  775. const wxArrayString* GetInitialComments() const { return m_initial_comments; }
  776. /**
  777. * Used in DRC to test the courtyard area (a complex polygon).
  778. *
  779. * @return the courtyard polygon.
  780. */
  781. const SHAPE_POLY_SET& GetCourtyard( PCB_LAYER_ID aLayer ) const;
  782. /**
  783. * Return the cached courtyard area. No checks are performed.
  784. *
  785. * @return the cached courtyard polygon.
  786. */
  787. const SHAPE_POLY_SET& GetCachedCourtyard( PCB_LAYER_ID aLayer ) const;
  788. /**
  789. * Build complex polygons of the courtyard areas from graphic items on the courtyard layers.
  790. *
  791. * @note Set the #MALFORMED_F_COURTYARD and #MALFORMED_B_COURTYARD status flags if the given
  792. * courtyard layer does not contain a (single) closed shape.
  793. */
  794. void BuildCourtyardCaches( OUTLINE_ERROR_HANDLER* aErrorHandler = nullptr );
  795. // @copydoc BOARD_ITEM::GetEffectiveShape
  796. std::shared_ptr<SHAPE> GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER,
  797. FLASHING aFlash = FLASHING::DEFAULT ) const override;
  798. EMBEDDED_FILES* GetEmbeddedFiles() override
  799. {
  800. return static_cast<EMBEDDED_FILES*>( this );
  801. }
  802. const EMBEDDED_FILES* GetEmbeddedFiles() const
  803. {
  804. return static_cast<const EMBEDDED_FILES*>( this );
  805. }
  806. /**
  807. * Get a list of outline fonts referenced in the footprint
  808. */
  809. std::set<KIFONT::OUTLINE_FONT*> GetFonts() const override;
  810. void EmbedFonts() override;
  811. double Similarity( const BOARD_ITEM& aOther ) const override;
  812. /// Sets the component class object pointer for this footprint
  813. void SetStaticComponentClass( const COMPONENT_CLASS* aClass ) const;
  814. /// Returns the component class for this footprint
  815. const COMPONENT_CLASS* GetStaticComponentClass() const;
  816. /// Returns the component class for this footprint
  817. const COMPONENT_CLASS* GetComponentClass() const;
  818. /// Used for display in the properties panel
  819. wxString GetComponentClassAsString() const;
  820. /// Forces immediate recalculation of the component class for this footprint
  821. void RecomputeComponentClass() const;
  822. /// Forces deferred (on next access) recalculation of the component class for this footprint
  823. void InvalidateComponentClassCache() const;
  824. /**
  825. * @brief Sets the transient component class names
  826. *
  827. * This is used during paste operations as we can't resolve the component classes immediately
  828. * until we have the true board context once the pasted items have been placed
  829. */
  830. void SetTransientComponentClassNames( const std::unordered_set<wxString>& classNames )
  831. {
  832. m_transientComponentClassNames = classNames;
  833. }
  834. /// Gets the transient component class names
  835. const std::unordered_set<wxString>& GetTransientComponentClassNames()
  836. {
  837. return m_transientComponentClassNames;
  838. }
  839. /// Remove the transient component class names
  840. void ClearTransientComponentClassNames() { m_transientComponentClassNames.clear(); };
  841. /// Resolves a set of component class names to this footprint's actual component class
  842. void ResolveComponentClassNames( BOARD* aBoard,
  843. const std::unordered_set<wxString>& aComponentClassNames );
  844. bool operator==( const BOARD_ITEM& aOther ) const override;
  845. bool operator==( const FOOTPRINT& aOther ) const;
  846. #if defined(DEBUG)
  847. virtual void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
  848. #endif
  849. struct cmp_drawings
  850. {
  851. bool operator()( const BOARD_ITEM* itemA, const BOARD_ITEM* itemB ) const;
  852. };
  853. struct cmp_pads
  854. {
  855. bool operator()( const PAD* aFirst, const PAD* aSecond ) const;
  856. };
  857. // TODO(JE) padstacks -- this code isn't used anywhere though
  858. #if 0
  859. struct cmp_padstack
  860. {
  861. bool operator()( const PAD* aFirst, const PAD* aSecond ) const;
  862. };
  863. #endif
  864. struct cmp_zones
  865. {
  866. bool operator()( const ZONE* aFirst, const ZONE* aSecond ) const;
  867. };
  868. protected:
  869. virtual void swapData( BOARD_ITEM* aImage ) override;
  870. void addMandatoryFields();
  871. private:
  872. std::deque<PCB_FIELD*> m_fields; // Fields, mapped by name, owned by pointer
  873. std::deque<BOARD_ITEM*> m_drawings; // Drawings in the footprint, owned by pointer
  874. std::deque<PAD*> m_pads; // Pads, owned by pointer
  875. std::vector<ZONE*> m_zones; // Rule area zones, owned by pointer
  876. std::deque<PCB_GROUP*> m_groups; // Groups, owned by pointer
  877. EDA_ANGLE m_orient; // Orientation
  878. VECTOR2I m_pos; // Position of footprint on the board in internal units.
  879. LIB_ID m_fpid; // The #LIB_ID of the FOOTPRINT.
  880. int m_attributes; // Flag bits (see FOOTPRINT_ATTR_T)
  881. int m_fpStatus; // For autoplace: flags (LOCKED, FIELDS_AUTOPLACED)
  882. int m_fileFormatVersionAtLoad;
  883. // Bounding box caching strategy:
  884. // While we attempt to notice the low-hanging fruit operations and update the bounding boxes
  885. // accordingly, we rely mostly on a "if anything changed then the caches are stale" approach.
  886. // We implement this by having PCB_BASE_FRAME's OnModify() method increment an operation
  887. // counter, and storing that as a timestamp for the various caches.
  888. // This means caches will get regenerated often -- but still far less often than if we had no
  889. // caches at all. The principal opitmization would be to change to dirty flag and make sure
  890. // that any edit that could affect the bounding boxes (including edits to the footprint
  891. // children) marked the bounding boxes dirty. It would definitely be faster -- but also more
  892. // fragile.
  893. mutable BOX2I m_cachedBoundingBox;
  894. mutable int m_boundingBoxCacheTimeStamp;
  895. mutable BOX2I m_cachedTextExcludedBBox;
  896. mutable int m_textExcludedBBoxCacheTimeStamp;
  897. mutable SHAPE_POLY_SET m_cachedHull;
  898. mutable int m_hullCacheTimeStamp;
  899. // A list of pad groups, each of which is allowed to short nets within their group.
  900. // A pad group is a comma-separated list of pad numbers.
  901. std::vector<wxString> m_netTiePadGroups;
  902. // A list of 1:N footprint item to allowed net numbers
  903. std::map<const BOARD_ITEM*, std::set<int>> m_netTieCache;
  904. /// A list of jumper pad groups, each of which is a set of pad numbers that should be jumpered
  905. /// together (treated as internally connected for the purposes of connectivity)
  906. std::vector<std::set<wxString>> m_jumperPadGroups;
  907. /// Flag that this footprint should automatically treat sets of two or more pads with the same
  908. /// number as jumpered pin groups
  909. bool m_duplicatePadNumbersAreJumpers;
  910. bool m_allowMissingCourtyard;
  911. bool m_allowSolderMaskBridges;
  912. // Optional overrides
  913. ZONE_CONNECTION m_zoneConnection;
  914. std::optional<int> m_clearance;
  915. std::optional<int> m_solderMaskMargin; // Solder mask margin
  916. std::optional<int> m_solderPasteMargin; // Solder paste margin absolute value
  917. std::optional<double> m_solderPasteMarginRatio; // Solder mask margin ratio of pad size
  918. // The final margin is the sum of these 2 values
  919. wxString m_libDescription; // File name and path for documentation file.
  920. wxString m_keywords; // Search keywords to find footprint in library.
  921. KIID_PATH m_path; // Path to associated symbol ([sheetUUID, .., symbolUUID]).
  922. wxString m_sheetname; // Name of the sheet containing the symbol for this footprint
  923. wxString m_sheetfile; // File of the sheet containing the symbol for this footprint
  924. wxString m_filters; // Footprint filters from symbol
  925. timestamp_t m_lastEditTime;
  926. int m_arflag; // Use to trace ratsnest and auto routing.
  927. KIID m_link; // Temporary logical link used during editing
  928. LSET m_privateLayers; // Layers visible only in the footprint editor
  929. std::vector<FP_3DMODEL> m_3D_Drawings; // 3D models.
  930. wxArrayString* m_initial_comments; // s-expression comments in the footprint,
  931. // lazily allocated only if needed for speed
  932. SHAPE_POLY_SET m_courtyard_cache_front; // Note that a footprint can have both front and back
  933. SHAPE_POLY_SET m_courtyard_cache_back; // courtyards populated.
  934. mutable HASH_128 m_courtyard_cache_front_hash;
  935. mutable HASH_128 m_courtyard_cache_back_hash;
  936. mutable std::mutex m_courtyard_cache_mutex;
  937. std::unordered_set<wxString> m_transientComponentClassNames;
  938. std::unique_ptr<COMPONENT_CLASS_CACHE_PROXY> m_componentClassCacheProxy;
  939. };
  940. #endif // FOOTPRINT_H