From 141f3fed45226ba8e1ba68e5e180fb5c0ccab0f1 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 20 Mar 2014 09:18:32 -0500 Subject: [PATCH] some doxygen fixes, comment fixes --- include/bin_mod.h | 2 +- include/kiface_i.h | 2 +- include/kiway.h | 2 +- include/kiway_player.h | 6 ++- kicad/kicad.cpp | 91 +++--------------------------------------- 5 files changed, 13 insertions(+), 90 deletions(-) diff --git a/include/bin_mod.h b/include/bin_mod.h index c834f2cd7c..edfc9cf8e7 100644 --- a/include/bin_mod.h +++ b/include/bin_mod.h @@ -54,7 +54,7 @@ struct BIN_MOD const char* m_name; ///< name of this binary module, static C string. - wxConfigBase* m_config; ///< maybe from $HOME/. + wxConfigBase* m_config; ///< maybe from $HOME/.${m_name} wxFileHistory m_history; wxString m_help_file; diff --git a/include/kiface_i.h b/include/kiface_i.h index b0b455f971..23f89dffbf 100644 --- a/include/kiface_i.h +++ b/include/kiface_i.h @@ -71,7 +71,7 @@ public: * * @param aKifaceName should point to a C string in permanent storage, * which contains the name of the DSO. Examples: "eeschema", "pcbnew", etc. - * This controls the name of the wxConfigBase established in m_kiway_settings, + * This controls the name of the wxConfigBase established in m_bm, * so it should be lowercase. */ KIFACE_I( const char* aKifaceName, KIWAY::FACE_T aId ) : diff --git a/include/kiway.h b/include/kiway.h index dd83cc93f7..7cf4b7786b 100644 --- a/include/kiway.h +++ b/include/kiway.h @@ -194,7 +194,7 @@ struct KIFACE * * @param aKIWAY tells the window which KIWAY (and PROJECT) it is a participant in. * - * @param aCtlBits consists of bit flags from the set of KFCTL_* #defines above. + * @param aCtlBits consists of bit flags from the set of KFCTL_* \#defines above. * * @return wxWindow* - and if not NULL, should be cast into the known type using * dynamic_cast<>(). diff --git a/include/kiway_player.h b/include/kiway_player.h index 1798b1ba56..2ffab5acb6 100644 --- a/include/kiway_player.h +++ b/include/kiway_player.h @@ -65,7 +65,7 @@ public: * Function Prj * returns a reference to the PROJECT "associated with" this KIWAY. */ - PROJECT& Prj() const; // coded in kiface_i.cpp for now + PROJECT& Prj() const; /** * Function SetKiway @@ -76,7 +76,7 @@ public: * * @param aKiway is often from a parent window, or from KIFACE::CreateWindow(). */ - void SetKiway( wxWindow* aDest, KIWAY* aKiway ); // in kiface_i.cpp for now + void SetKiway( wxWindow* aDest, KIWAY* aKiway ); private: // private, all setting is done through SetKiway(). @@ -142,6 +142,8 @@ public: * according to the knowledge in the derived wxFrame. In almost every case, * the list will have only a single file in it. * + * @param aCtl is a set of bit flags ORed together from the set of KICTL_* \#defined above. + * * @return bool - true if all requested files were opened OK, else false. */ virtual bool OpenProjectFiles( const std::vector& aFileList, int aCtl = 0 ) diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index 4fc1831a5f..742121c781 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -199,8 +199,9 @@ void PGM_KICAD::destroy() /** * Class KIWAY_MGR - * is container for all (KIWAYS and PROJECTS). This class needs to work both for a C++ - * project manager and an a wxPython one (after being moved into a header later). + * is a container for all KIWAYS [and PROJECTS]. This class needs to work both + * for a C++ project manager and an a wxPython one (after being moved into a + * header later). */ class KIWAY_MGR { @@ -220,7 +221,8 @@ public: private: - // KIWAYs may not be moved once doled out. + // KIWAYs may not be moved once doled out, since window DNA depends on the + // pointer being good forever. // boost_ptr::vector however never moves the object pointed to. typedef boost::ptr_vector KIWAYS; @@ -280,6 +282,7 @@ PROJECT& Prj() bool KIWAY_MGR::OnStart( wxApp* aProcess ) { // The C++ project manager supports only one open PROJECT + // We should need no copy constructor for KIWAY to push a pointer. m_kiways.push_back( new KIWAY() ); return true; @@ -289,85 +292,3 @@ bool KIWAY_MGR::OnStart( wxApp* aProcess ) void KIWAY_MGR::OnEnd() { } - - -/* -static bool init( KICAD_PGM* aProcess, const wxString& aName ) -{ - m_Id = aId; - m_Checker = new wxSingleInstanceChecker( aName.Lower() + wxT( "-" ) + wxGetUserId() ); - - // Init KiCad environment - // the environment variable KICAD (if exists) gives the kicad path: - // something like set KICAD=d:\kicad - bool isDefined = wxGetEnv( wxT( "KICAD" ), &m_KicadEnv ); - - if( isDefined ) // ensure m_KicadEnv ends by "/" - { - m_KicadEnv.Replace( WIN_STRING_DIR_SEP, UNIX_STRING_DIR_SEP ); - - if( !m_KicadEnv.IsEmpty() && m_KicadEnv.Last() != '/' ) - m_KicadEnv += UNIX_STRING_DIR_SEP; - } - - // Prepare On Line Help. Use only lower case for help file names, in order to - // avoid problems with upper/lower case file names under windows and unix. -#if defined ONLINE_HELP_FILES_FORMAT_IS_HTML - m_HelpFileName = aName.Lower() + wxT( ".html" ); -#elif defined ONLINE_HELP_FILES_FORMAT_IS_PDF - m_HelpFileName = aName.Lower() + wxT( ".pdf" ); -#else - #error Help files format not defined -#endif - - // Init parameters for configuration - SetVendorName( wxT( "KiCad" ) ); - SetAppName( aName.Lower() ); - SetTitle( aName ); - - m_settings = new wxConfig(); - - wxASSERT( m_settings != NULL ); - - m_commonSettings = new wxConfig( CommonConfigPath ); - wxASSERT( m_commonSettings != NULL ); - - // Install some image handlers, mainly for help - wxImage::AddHandler( new wxPNGHandler ); - wxImage::AddHandler( new wxGIFHandler ); - wxImage::AddHandler( new wxJPEGHandler ); - wxFileSystem::AddHandler( new wxZipFSHandler ); - - // Analyze the command line & init binary path - SetBinDir(); - SetDefaultSearchPaths(); - SetLanguagePath(); - ReadPdfBrowserInfos(); - - // Internationalization: loading the kicad suitable Dictionary - wxString languageSel; - m_commonSettings->Read( languageCfgKey, &languageSel); - - setLanguageId( wxLANGUAGE_DEFAULT ); - - // Search for the current selection - for( unsigned ii = 0; ii < DIM( s_Languages ); ii++ ) - { - if( s_Languages[ii].m_Lang_Label == languageSel ) - { - setLanguageId( s_Languages[ii].m_WX_Lang_Identifier ); - break; - } - } - - bool succes = SetLanguage( true ); - - if( !succes ) - { - } - - // Set locale option for separator used in float numbers - SetLocaleTo_Default(); -} -*/ -