From d2ed2efc85f7b48c459670ecd32a4b32f331edf5 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 11 Mar 2014 14:50:53 +0100 Subject: [PATCH] Workarounded SWIG problems (does not support nested C++ classes, more on the subject: http://www.swig.org/Doc1.3/SWIGPlus.html#SWIGPlus_nested_classes). --- pcbnew/class_board.h | 2 ++ pcbnew/class_netinfo.h | 15 ++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index cac0f66ffd..92058d0af6 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -871,6 +871,7 @@ public: m_NetInfo.AppendNet( aNewNet ); } +#ifndef SWIG /** * Function BeginNets * @return iterator to the first element of the NETINFO_ITEMs list @@ -888,6 +889,7 @@ public: { return m_NetInfo.end(); } +#endif /** * Function GetNetCount diff --git a/pcbnew/class_netinfo.h b/pcbnew/class_netinfo.h index f566926fcc..64e6e9f8b8 100644 --- a/pcbnew/class_netinfo.h +++ b/pcbnew/class_netinfo.h @@ -145,6 +145,7 @@ public: */ int Translate( int aNetCode ) const; +#ifndef SWIG ///> Wrapper class, so you can iterate through NETINFO_ITEM*s, not ///> std::pair class iterator @@ -212,6 +213,7 @@ public: { return iterator( m_netMapping.end(), this ); } +#endif /** * Function GetSize @@ -329,6 +331,7 @@ public: typedef boost::unordered_map NETNAMES_MAP; typedef boost::unordered_map NETCODES_MAP; +#ifndef SWIG ///> Wrapper class, so you can iterate through NETINFO_ITEM*s, not ///> std::pair class iterator @@ -388,6 +391,7 @@ public: { return iterator( m_netNames.end() ); } +#endif private: /** @@ -438,25 +442,22 @@ class NETINFO_ITEM friend class NETINFO_LIST; private: - const int m_NetCode; ///< A number equivalent to the net name. + int m_NetCode; ///< A number equivalent to the net name. ///< Used for fast comparisons in ratsnest and DRC computations. - const wxString m_Netname; ///< Full net name like /mysheet/mysubsheet/vout - ///< used by Eeschema + wxString m_Netname; ///< Full net name like /mysheet/mysubsheet/vout used by Eeschema - const wxString m_ShortNetname; // short net name, like vout from - // /mysheet/mysubsheet/vout + wxString m_ShortNetname; ///< short net name, like vout from /mysheet/mysubsheet/vout wxString m_NetClassName; // Net Class name. if void this is equivalent // to "default" (the first // item of the net classes list - NETCLASS* m_NetClass; BOARD_ITEM* m_parent; ///< The parent board item object the net belongs to. public: - std::vector m_PadInNetList; // List of pads connected to this net + std::vector m_PadInNetList; ///< List of pads connected to this net unsigned m_RatsnestStartIdx; /* Starting point of ratsnests of this * net (included) in a general buffer of