Commit 31a864e7 authored by dickelbeck's avatar dickelbeck

comment cleanups

parent 780c49b4
...@@ -5,6 +5,16 @@ Please add newer entries at the top, list the date and your name with ...@@ -5,6 +5,16 @@ Please add newer entries at the top, list the date and your name with
email address. email address.
2007-Oct-31 UPDATE Dick Hollenbeck <dickelbeck@yahoo.com>
================================================================================
+ all
* Added Doxygen configuration file, whose standard name is Doxyfile. Output
is set to go to ./doxygen directory just off the project tree.
* added a note to todo.txt which asks folks to start using "Doxygen compatible"
comments in member functions and classes. Run Doxygen on the project, then
look at the documentation for class INSPECTOR as an example.
2007-Oct-31 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> 2007-Oct-31 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================ ================================================================================
+all: +all:
......
...@@ -505,7 +505,7 @@ public: ...@@ -505,7 +505,7 @@ public:
/** /**
* Function Save * Function Save
* writes the data structures for this object out to a FILE in "*.pcb" format. * writes the data structures for this object out to a FILE in "*.brd" format.
* @param aFile The FILE to write to. * @param aFile The FILE to write to.
* @return bool - true if success writing else false. * @return bool - true if success writing else false.
*/ */
......
...@@ -268,18 +268,6 @@ public: ...@@ -268,18 +268,6 @@ public:
const KICAD_T scanTypes[] ); const KICAD_T scanTypes[] );
/**
* Function FindPadOrModule
* searches for either a pad or module, giving precedence to pads.
* Any Pad or Module on the desired layer that HitTest()s true will be
* returned, otherwise any visible Pad or Module on any other layer.
* The provided layer must be visible.
* @param refPos The wxPoint to hit-test.
* @return BOARD_ITEM* - if a direct hit, else NULL.
*/
// BOARD_ITEM* FindPadOrModule( const wxPoint& refPos, int layer );
/** /**
* Function FindNet * Function FindNet
* searches for a net with the given netcode. * searches for a net with the given netcode.
...@@ -291,7 +279,7 @@ public: ...@@ -291,7 +279,7 @@ public:
/** /**
* Function Save * Function Save
* writes the data structures for this object out to a FILE in "*.pcb" format. * writes the data structures for this object out to a FILE in "*.brd" format.
* @param aFile The FILE to write to. * @param aFile The FILE to write to.
* @return bool - true if success writing else false. * @return bool - true if success writing else false.
*/ */
...@@ -382,7 +370,7 @@ public: ...@@ -382,7 +370,7 @@ public:
/** /**
* Function Save * Function Save
* writes the data structures for this object out to a FILE in "*.pcb" format. * writes the data structures for this object out to a FILE in "*.brd" format.
* @param aFile The FILE to write to. * @param aFile The FILE to write to.
* @return bool - true if success writing else false. * @return bool - true if success writing else false.
*/ */
...@@ -448,7 +436,7 @@ public: ...@@ -448,7 +436,7 @@ public:
/** /**
* Function Save * Function Save
* writes the data structures for this object out to a FILE in "*.pcb" format. * writes the data structures for this object out to a FILE in "*.brd" format.
* @param aFile The FILE to write to. * @param aFile The FILE to write to.
* @return bool - true if success writing else false. * @return bool - true if success writing else false.
*/ */
......
...@@ -724,6 +724,11 @@ public: ...@@ -724,6 +724,11 @@ public:
EDGE_ZONE* Del_SegmEdgeZone( wxDC* DC, EDGE_ZONE* edge_zone ); EDGE_ZONE* Del_SegmEdgeZone( wxDC* DC, EDGE_ZONE* edge_zone );
void CaptureNetName( wxDC* DC ); void CaptureNetName( wxDC* DC );
EDGE_ZONE* Begin_Zone(); EDGE_ZONE* Begin_Zone();
/**
* Function End_Zone
* terminates the zone edge creation process
*/
void End_Zone( wxDC* DC ); void End_Zone( wxDC* DC );
void Fill_Zone( wxDC* DC ); void Fill_Zone( wxDC* DC );
......
...@@ -562,17 +562,17 @@ BOARD_ITEM* BOARD::FindPadOrModule( const wxPoint& refPos, int layer ) ...@@ -562,17 +562,17 @@ BOARD_ITEM* BOARD::FindPadOrModule( const wxPoint& refPos, int layer )
*/ */
EQUIPOT* BOARD::FindNet( int anetcode ) const EQUIPOT* BOARD::FindNet( int anetcode ) const
{ {
if( anetcode <= 0 ) // the first valid netcode is 1.
return NULL; // zero is reserved for "no connection" and is not used.
if( anetcode > 0 )
EQUIPOT* net = (EQUIPOT*) m_Equipots; {
while( net ) for( EQUIPOT* net = m_Equipots; net; net=net->Next() )
{ {
if( net->GetNet() == anetcode ) if( net->GetNet() == anetcode )
break;
net = (EQUIPOT*) net->Pnext;
}
return net; return net;
}
}
return NULL;
} }
......
...@@ -32,7 +32,7 @@ public: ...@@ -32,7 +32,7 @@ public:
/** /**
* Function Save * Function Save
* writes the data structures for this object out to a FILE in "*.pcb" format. * writes the data structures for this object out to a FILE in "*.brd" format.
* @param aFile The FILE to write to. * @param aFile The FILE to write to.
* @return bool - true if success writing else false. * @return bool - true if success writing else false.
*/ */
......
...@@ -36,7 +36,7 @@ public: ...@@ -36,7 +36,7 @@ public:
/** /**
* Function Save * Function Save
* writes the data structures for this object out to a FILE in "*.pcb" format. * writes the data structures for this object out to a FILE in "*.brd" format.
* @param aFile The FILE to write to. * @param aFile The FILE to write to.
* @return bool - true if success writing else false. * @return bool - true if success writing else false.
*/ */
......
...@@ -28,6 +28,8 @@ public: ...@@ -28,6 +28,8 @@ public:
EQUIPOT( BOARD_ITEM* StructFather ); EQUIPOT( BOARD_ITEM* StructFather );
~EQUIPOT(); ~EQUIPOT();
EQUIPOT* Next() { return (EQUIPOT*) Pnext; }
/* Effacement memoire de la structure */ /* Effacement memoire de la structure */
void UnLink(); void UnLink();
...@@ -36,7 +38,7 @@ public: ...@@ -36,7 +38,7 @@ public:
/** /**
* Function Save * Function Save
* writes the data structures for this object out to a FILE in "*.pcb" format. * writes the data structures for this object out to a FILE in "*.brd" format.
* @param aFile The FILE to write to. * @param aFile The FILE to write to.
* @return bool - true if success writing else false. * @return bool - true if success writing else false.
*/ */
......
...@@ -35,7 +35,7 @@ public: ...@@ -35,7 +35,7 @@ public:
/** /**
* Function Save * Function Save
* writes the data structures for this object out to a FILE in "*.pcb" format. * writes the data structures for this object out to a FILE in "*.brd" format.
* @param aFile The FILE to write to. * @param aFile The FILE to write to.
* @return bool - true if success writing else false. * @return bool - true if success writing else false.
*/ */
......
...@@ -21,7 +21,7 @@ public: ...@@ -21,7 +21,7 @@ public:
/** /**
* Function Save * Function Save
* writes the data structures for this object out to a FILE in "*.pcb" format. * writes the data structures for this object out to a FILE in "*.brd" format.
* @param aFile The FILE to write to. * @param aFile The FILE to write to.
* @return bool - true if success writing else false. * @return bool - true if success writing else false.
*/ */
......
...@@ -119,7 +119,7 @@ public: ...@@ -119,7 +119,7 @@ public:
/** /**
* Function Save * Function Save
* writes the data structures for this object out to a FILE in "*.pcb" format. * writes the data structures for this object out to a FILE in "*.brd" format.
* @param aFile The FILE to write to. * @param aFile The FILE to write to.
* @return bool - true if success writing else false. * @return bool - true if success writing else false.
*/ */
......
...@@ -80,7 +80,7 @@ public: ...@@ -80,7 +80,7 @@ public:
/** /**
* Function Save * Function Save
* writes the data structures for this object out to a FILE in "*.pcb" format. * writes the data structures for this object out to a FILE in "*.brd" format.
* @param aFile The FILE to write to. * @param aFile The FILE to write to.
* @return bool - true if success writing else false. * @return bool - true if success writing else false.
*/ */
......
...@@ -27,7 +27,7 @@ public: ...@@ -27,7 +27,7 @@ public:
/** /**
* Function Save * Function Save
* writes the data structures for this object out to a FILE in "*.pcb" format. * writes the data structures for this object out to a FILE in "*.brd" format.
* @param aFile The FILE to write to. * @param aFile The FILE to write to.
* @return bool - true if success writing else false. * @return bool - true if success writing else false.
*/ */
......
...@@ -49,7 +49,7 @@ public: ...@@ -49,7 +49,7 @@ public:
/** /**
* Function Save * Function Save
* writes the data structures for this object out to a FILE in "*.pcb" format. * writes the data structures for this object out to a FILE in "*.brd" format.
* @param aFile The FILE to write to. * @param aFile The FILE to write to.
* @return bool - true if success writing else false. * @return bool - true if success writing else false.
*/ */
......
...@@ -62,7 +62,7 @@ public: ...@@ -62,7 +62,7 @@ public:
/** /**
* Function Save * Function Save
* writes the data structures for this object out to a FILE in "*.pcb" format. * writes the data structures for this object out to a FILE in "*.brd" format.
* @param aFile The FILE to write to. * @param aFile The FILE to write to.
* @return bool - true if success writing else false. * @return bool - true if success writing else false.
*/ */
......
...@@ -165,7 +165,6 @@ bool WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu ) ...@@ -165,7 +165,6 @@ bool WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
/* Select a proper item */ /* Select a proper item */
#if 1 // try this
wxPoint cursorPos = GetScreen()->m_Curseur; wxPoint cursorPos = GetScreen()->m_Curseur;
wxPoint selectPos = m_Collector->GetRefPos(); wxPoint selectPos = m_Collector->GetRefPos();
...@@ -173,16 +172,19 @@ bool WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu ) ...@@ -173,16 +172,19 @@ bool WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
// printf( "cursor=(%d, %d) select=(%d,%d)\n", cursorPos.x, cursorPos.y, selectPos.x, selectPos.y ); // printf( "cursor=(%d, %d) select=(%d,%d)\n", cursorPos.x, cursorPos.y, selectPos.x, selectPos.y );
/* We can reselect an other item only if there are no item being edited /* We can reselect another item only if there are no item being edited
* because ALL moving functions use GetCurItem(), because ALL moving functions use GetCurItem(), therefore GetCurItem()
* therefore GetCurItem() must return the same item during moving. must return the same item during moving. We know an item is moving
* We know an item is moving if ( item && (item->m_Flags != 0)) is true if( item && (item->m_Flags != 0)) is true and after calling
* and after calling PcbGeneralLocateAndDisplay(), GetCurItem() is any arbitrary BOARD_ITEM, PcbGeneralLocateAndDisplay(), GetCurItem() is any arbitrary BOARD_ITEM,
* not the current editen item. not the current item being edited. In such case we cannot call
PcbGeneralLocateAndDisplay().
*/ */
if ( ! item || (item->m_Flags == 0) ) if( !item || (item->m_Flags == 0) )
{ {
if( !item || cursorPos != selectPos ) // Filter // show "item selector" menu only if no item now or selected item was not
// previously picked at this position
if( !item || cursorPos != selectPos )
{ {
DrawPanel->m_AbortRequest = false; DrawPanel->m_AbortRequest = false;
item = PcbGeneralLocateAndDisplay(); item = PcbGeneralLocateAndDisplay();
...@@ -194,23 +196,6 @@ bool WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu ) ...@@ -194,23 +196,6 @@ bool WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
} }
} }
#else
if( !item || !item->m_Flags )
{
DrawPanel->m_AbortRequest = false;
item = PcbGeneralLocateAndDisplay();
if( DrawPanel->m_AbortRequest )
{
DrawPanel->CursorOn( &dc );
return false;
}
SetCurItem( item );
}
#endif
item = GetCurItem(); item = GetCurItem();
if( item ) if( item )
flags = item->m_Flags; flags = item->m_Flags;
......
...@@ -32,13 +32,18 @@ static inline void ADD_MENUITEM(menu, id, text, icon) ...@@ -32,13 +32,18 @@ static inline void ADD_MENUITEM(menu, id, text, icon)
} }
*** Set up a DOXYGEN environment starting with a configuration file that: *** rework zones so they are modifiable and so that the user does not
- understands the JavaDoc style comments that we have started using need to enter tracks for thru hole pads or vias which connect to a zone.
- gives preference to comments in header files over *.cpp files I propose a two step solution:
- outputs its HTML stuff relative to the base of trunk, say for example trunk/doxygen 1) interim enhancement: make zone edges retained in BRD file and make the
- is then added to the svn repository (this configuration file only) edges editable.
Then add a shell script and batch file to generate the docs using the config file. 2) final solution: get rid of requirement for tracks buried within a zone.
Then review the generated docs and start to go through the source and make the Reivew the GEDA source code and other sources to gather ideas before doing 2).
*** Use DOXYGEN compatible comments on member functions. As configured,
Doxygen gives priority to comments in header files over *.cpp files.
Review the generated docs and start to go through the source and make the
generated doxygen docs readable and clear using the JavaDoc style comments, generated doxygen docs readable and clear using the JavaDoc style comments,
mostly in the header files. The error and warning output of the doxygen mostly in the header files. The error and warning output of the doxygen
compiler can help with this too. compiler can help with this too.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment