Fix a few doxygen warnings and add a few comments.

This commit is contained in:
jean-pierre charras 2017-07-04 11:07:36 +02:00
parent 098814e205
commit 969209c2cc
4 changed files with 41 additions and 29 deletions

View File

@ -17,6 +17,9 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/**
* @file streamwrapper.cpp
*/
#if !defined( WIN32 ) || !defined( __GNUC__ ) #if !defined( WIN32 ) || !defined( __GNUC__ )
#error streamwrapper.cpp should not be included in this build #error streamwrapper.cpp should not be included in this build
@ -35,7 +38,6 @@ kicad::stream::stream()
{ {
m_buf = NULL; m_buf = NULL;
m_stream = NULL; m_stream = NULL;
return;
} }
@ -49,8 +51,6 @@ kicad::stream::~stream()
m_buf->close(); // ensure file is closed regardless of m_buf's destructor m_buf->close(); // ensure file is closed regardless of m_buf's destructor
delete m_buf; delete m_buf;
} }
return;
} }
@ -110,8 +110,6 @@ void kicad::stream::Close( void )
{ {
if( m_buf ) if( m_buf )
m_buf->close(); m_buf->close();
return;
} }

View File

@ -23,6 +23,10 @@
#ifndef PROJECT_H_ #ifndef PROJECT_H_
#define PROJECT_H_ #define PROJECT_H_
/**
* @file project.h
*/
#include <vector> #include <vector>
#include <wx/string.h> #include <wx/string.h>
#include <wx/filename.h> #include <wx/filename.h>

View File

@ -17,6 +17,9 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/**
* @file streamwrapper.h
*/
#ifndef STREAMWRAPPER_H #ifndef STREAMWRAPPER_H
#define STREAMWRAPPER_H #define STREAMWRAPPER_H
@ -43,8 +46,15 @@
#define CLOSE_STREAM( var ) var ## _BUF_.Close() #define CLOSE_STREAM( var ) var ## _BUF_.Close()
/**
* \namespace kicad
*/
namespace kicad namespace kicad
{ {
/**
* class stream is equivalent to std::stream, but accept UTF8 chars
* in filenames
*/
class stream class stream
{ {
private: private:

View File

@ -275,10 +275,10 @@ private:
* If \e point is outside the triangulation, or the input dart is not valid, * If \e point is outside the triangulation, or the input dart is not valid,
* \c false is returned. * \c false is returned.
* *
* \require * \b require
* - \ref hed::TTLtraits::splitTriangle "TRAITS_TYPE::splitTriangle" (DART_TYPE&, const POINT_TYPE&) * - \ref hed::TTLtraits::splitTriangle "TRAITS_TYPE::splitTriangle" (DART_TYPE&, const POINT_TYPE&)
* *
* \using * \a using
* - locateTriangle * - locateTriangle
* - RecSwapDelaunay * - RecSwapDelaunay
* *
@ -367,11 +367,11 @@ void TRIANGULATION_HELPER::insertNodes( FORWARD_ITERATOR aFirst, FORWARD_ITERATO
* The four nodes at the corners will be removed and the resulting triangulation * The four nodes at the corners will be removed and the resulting triangulation
* will have a convex boundary and be Delaunay. * will have a convex boundary and be Delaunay.
* *
* \param dart * \param aDart
* A CCW dart at the boundary of the triangulation\n * A CCW dart at the boundary of the triangulation\n
* Output: A CCW dart at the new boundary * Output: A CCW dart at the new boundary
* *
* \using * \a using
* - RemoveBoundaryNode * - RemoveBoundaryNode
* *
* \note * \note
@ -398,7 +398,7 @@ void TRIANGULATION_HELPER::RemoveRectangularBoundary( DART_TYPE& aDart )
/** Removes the node associated with \e dart and /** Removes the node associated with \e dart and
* updates the triangulation to be Delaunay. * updates the triangulation to be Delaunay.
* *
* \using * \a using
* - RemoveBoundaryNode if \e dart represents a node at the boundary * - RemoveBoundaryNode if \e dart represents a node at the boundary
* - RemoveInteriorNode if \e dart represents an interior node * - RemoveInteriorNode if \e dart represents an interior node
* *
@ -419,11 +419,11 @@ void TRIANGULATION_HELPER::RemoveNode( DART_TYPE& aDart )
/** Removes the boundary node associated with \e dart and /** Removes the boundary node associated with \e dart and
* updates the triangulation to be Delaunay. * updates the triangulation to be Delaunay.
* *
* \using * \a using
* - SwapEdgesAwayFromBoundaryNode * - SwapEdgesAwayFromBoundaryNode
* - OptimizeDelaunay * - OptimizeDelaunay
* *
* \require * \b require
* - \ref hed::TTLtraits::removeBoundaryTriangle "TRAITS_TYPE::removeBoundaryTriangle" (Dart&) * - \ref hed::TTLtraits::removeBoundaryTriangle "TRAITS_TYPE::removeBoundaryTriangle" (Dart&)
*/ */
template <class TRAITS_TYPE, class DART_TYPE> template <class TRAITS_TYPE, class DART_TYPE>
@ -481,11 +481,11 @@ void TRIANGULATION_HELPER::RemoveBoundaryNode( DART_TYPE& aDart )
/** Removes the interior node associated with \e dart and /** Removes the interior node associated with \e dart and
* updates the triangulation to be Delaunay. * updates the triangulation to be Delaunay.
* *
* \using * \a using
* - SwapEdgesAwayFromInteriorNode * - SwapEdgesAwayFromInteriorNode
* - OptimizeDelaunay * - OptimizeDelaunay
* *
* \require * \b require
* - \ref hed::TTLtraits::reverse_splitTriangle "TRAITS_TYPE::reverse_splitTriangle" (Dart&) * - \ref hed::TTLtraits::reverse_splitTriangle "TRAITS_TYPE::reverse_splitTriangle" (Dart&)
* *
* \note * \note
@ -600,7 +600,7 @@ bool TRIANGULATION_HELPER::locateFaceWithNode( const NODE_TYPE& aNode, DART_TYPE
* \retval bool * \retval bool
* \c true if a face is found; \c false if not. * \c true if a face is found; \c false if not.
* *
* \require * \b require
* - \ref hed::TTLtraits::Orient2D "TRAITS_TYPE::Orient2D" (DART_TYPE&, DART_TYPE&, POINT_TYPE&) * - \ref hed::TTLtraits::Orient2D "TRAITS_TYPE::Orient2D" (DART_TYPE&, DART_TYPE&, POINT_TYPE&)
* *
* \note * \note
@ -678,7 +678,7 @@ bool TRIANGULATION_HELPER::LocateFaceSimplest( const POINT_TYPE& aPoint, DART_TY
* If \e point is outside the m_triangulation, in which case \c false is returned, * If \e point is outside the m_triangulation, in which case \c false is returned,
* then the edge associated with \e dart will be at the boundary of the m_triangulation. * then the edge associated with \e dart will be at the boundary of the m_triangulation.
* *
* \using * \a using
* - LocateFaceSimplest * - LocateFaceSimplest
* - InTriangle * - InTriangle
*/ */
@ -728,7 +728,7 @@ bool TRIANGULATION_HELPER::LocateTriangle( const POINT_TYPE& aPoint, DART_TYPE&
* \param aDart * \param aDart
* A CCW dart in the triangle * A CCW dart in the triangle
* *
* \require * \b require
* - \ref hed::TTLtraits::CrossProduct2D "TRAITS_TYPE::CrossProduct2D" (DART_TYPE&, POINT_TYPE&) * - \ref hed::TTLtraits::CrossProduct2D "TRAITS_TYPE::CrossProduct2D" (DART_TYPE&, POINT_TYPE&)
* - \ref hed::TTLtraits::ScalarProduct2D "TRAITS_TYPE::ScalarProduct2D" (DART_TYPE&, POINT_TYPE&) * - \ref hed::TTLtraits::ScalarProduct2D "TRAITS_TYPE::ScalarProduct2D" (DART_TYPE&, POINT_TYPE&)
* *
@ -867,7 +867,7 @@ void TRIANGULATION_HELPER::getAdjacentTriangles( const DART_TYPE& aDart, DART_TY
* \param aBoundary * \param aBoundary
* A sequence of darts, where the associated edges are the boundary edges * A sequence of darts, where the associated edges are the boundary edges
* *
* \require * \b require
* - DART_LIST_TYPE::push_back (DART_TYPE&) * - DART_LIST_TYPE::push_back (DART_TYPE&)
*/ */
template <class DART_TYPE, class DART_LIST_TYPE> template <class DART_TYPE, class DART_LIST_TYPE>
@ -1098,7 +1098,7 @@ void TRIANGULATION_HELPER::getNeighborNodes( const DART_TYPE& aDart,
* orientation (CCW or CW) as \e dart, and \e dart is the first element * orientation (CCW or CW) as \e dart, and \e dart is the first element
* in the sequence. * in the sequence.
* *
* \require * \b require
* - DART_LIST_TYPE::push_back (DART_TYPE&) * - DART_LIST_TYPE::push_back (DART_TYPE&)
* *
* \see * \see
@ -1128,7 +1128,7 @@ void TRIANGULATION_HELPER::Get0OrbitInterior( const DART_TYPE& aDart, DART_LIST_
* have the same orientation (CCW or CW) as \e dart, and \e dart is the first element * have the same orientation (CCW or CW) as \e dart, and \e dart is the first element
* in the sequence. * in the sequence.
* *
* \require * \b require
* - DART_LIST_TYPE::push_back (DART_TYPE&) * - DART_LIST_TYPE::push_back (DART_TYPE&)
* *
* \note * \note
@ -1249,7 +1249,7 @@ bool TRIANGULATION_HELPER::degenerateTriangle( const DART_TYPE& aDart )
* indicate that the quadrilateral is convex only, and not necessarily strictly * indicate that the quadrilateral is convex only, and not necessarily strictly
* convex. * convex.
* *
* \require * \b require
* - \ref hed::TTLtraits::CrossProduct2D "TRAITS_TYPE::CrossProduct2D" (Dart&, Dart&) * - \ref hed::TTLtraits::CrossProduct2D "TRAITS_TYPE::CrossProduct2D" (Dart&, Dart&)
*/ */
template <class TRAITS_TYPE, class DART_TYPE> template <class TRAITS_TYPE, class DART_TYPE>
@ -1331,7 +1331,7 @@ void TRIANGULATION_HELPER::PositionAtNextBoundaryEdge( DART_TYPE& aDart )
* \param aDart * \param aDart
* A CCW dart at the boundary of the m_triangulation * A CCW dart at the boundary of the m_triangulation
* *
* \require * \b require
* - \ref hed::TTLtraits::CrossProduct2D "TRAITS_TYPE::CrossProduct2D" (const Dart&, const Dart&) * - \ref hed::TTLtraits::CrossProduct2D "TRAITS_TYPE::CrossProduct2D" (const Dart&, const Dart&)
*/ */
template <class TRAITS_TYPE, class DART_TYPE> template <class TRAITS_TYPE, class DART_TYPE>
@ -1393,12 +1393,12 @@ bool TRIANGULATION_HELPER::ConvexBoundary( const DART_TYPE& aDart )
* \param aElist * \param aElist
* The sequence of edges * The sequence of edges
* *
* \require * \b require
* - \ref hed::TTLtraits::swapEdge "TRAITS_TYPE::swapEdge" (DART_TYPE& \e dart)\n * - \ref hed::TTLtraits::swapEdge "TRAITS_TYPE::swapEdge" (DART_TYPE& \e dart)\n
* \b Note: Must be implemented such that \e dart is delivered back in a position as * \b Note: Must be implemented such that \e dart is delivered back in a position as
* seen if it was glued to the edge when swapping (rotating) the edge CCW * seen if it was glued to the edge when swapping (rotating) the edge CCW
* *
* \using * \a using
* - swapTestDelaunay * - swapTestDelaunay
*/ */
template <class TRAITS_TYPE, class DART_TYPE, class DART_LIST_TYPE> template <class TRAITS_TYPE, class DART_TYPE, class DART_LIST_TYPE>
@ -1479,7 +1479,7 @@ void TRIANGULATION_HELPER::OptimizeDelaunay( DART_LIST_TYPE& aElist,
* e.g., OptimizeDelaunay. This will avoid cycling and infinite loops in nearly * e.g., OptimizeDelaunay. This will avoid cycling and infinite loops in nearly
* neutral cases. * neutral cases.
* *
* \require * \b require
* - \ref hed::TTLtraits::ScalarProduct2D "TRAITS_TYPE::ScalarProduct2D" (DART_TYPE&, DART_TYPE&) * - \ref hed::TTLtraits::ScalarProduct2D "TRAITS_TYPE::ScalarProduct2D" (DART_TYPE&, DART_TYPE&)
* - \ref hed::TTLtraits::CrossProduct2D "TRAITS_TYPE::CrossProduct2D" (DART_TYPE&, DART_TYPE&) * - \ref hed::TTLtraits::CrossProduct2D "TRAITS_TYPE::CrossProduct2D" (DART_TYPE&, DART_TYPE&)
*/ */
@ -1595,12 +1595,12 @@ bool TRIANGULATION_HELPER::SwapTestDelaunay( const DART_TYPE& aDart, bool aCycli
* \param aDiagonal * \param aDiagonal
* A CCW dart representing the edge where the recursion starts from. * A CCW dart representing the edge where the recursion starts from.
* *
* \require * \b require
* - \ref hed::TTLtraits::swapEdge "TRAITS_TYPE::swapEdge" (DART_TYPE&)\n * - \ref hed::TTLtraits::swapEdge "TRAITS_TYPE::swapEdge" (DART_TYPE&)\n
* \b Note: Must be implemented such that the darts outside the quadrilateral * \b Note: Must be implemented such that the darts outside the quadrilateral
* are not affected by the swap. * are not affected by the swap.
* *
* \using * \a using
* - Calls itself recursively * - Calls itself recursively
*/ */
template <class TRAITS_TYPE, class DART_TYPE> template <class TRAITS_TYPE, class DART_TYPE>
@ -1657,7 +1657,7 @@ void TRIANGULATION_HELPER::RecSwapDelaunay( DART_TYPE& aDiagonal )
* - The node associated with \e dart is interior to the * - The node associated with \e dart is interior to the
* triangulation. * triangulation.
* *
* \require * \b require
* - \ref hed::TTLtraits::swapEdge "TRAITS_TYPE::swapEdge" (DART_TYPE& \e dart)\n * - \ref hed::TTLtraits::swapEdge "TRAITS_TYPE::swapEdge" (DART_TYPE& \e dart)\n
* \b Note: Must be implemented such that \e dart is delivered back in a position as * \b Note: Must be implemented such that \e dart is delivered back in a position as
* seen if it was glued to the edge when swapping (rotating) the edge CCW * seen if it was glued to the edge when swapping (rotating) the edge CCW
@ -1721,7 +1721,7 @@ void TRIANGULATION_HELPER::SwapEdgesAwayFromInteriorNode( DART_TYPE& aDart,
* \retval dart * \retval dart
* A CCW dart incident with the node * A CCW dart incident with the node
* *
* \require * \b require
* - \ref hed::TTLtraits::swapEdge "TRAITS_TYPE::swapEdge" (DART_TYPE& \e dart)\n * - \ref hed::TTLtraits::swapEdge "TRAITS_TYPE::swapEdge" (DART_TYPE& \e dart)\n
* \b Note: Must be implemented such that \e dart is delivered back in a position as * \b Note: Must be implemented such that \e dart is delivered back in a position as
* seen if it was glued to the edge when swapping (rotating) the edge CCW * seen if it was glued to the edge when swapping (rotating) the edge CCW