diff --git a/Documentation/development/coding-style-policy.md b/Documentation/development/coding-style-policy.md index 82543f6188..3267defa47 100644 --- a/Documentation/development/coding-style-policy.md +++ b/Documentation/development/coding-style-policy.md @@ -1,12 +1,12 @@ # KiCad C++ Source Code Style Guide # -Latest Publishing: February 2013 +Latest Publishing: February 2017 First Published: September 2010 written by -Wayne Stambaugh \<\> +Wayne Stambaugh \<\> and Dick Hollenbeck \<\> @@ -129,8 +129,7 @@ enables clever and concise Doxygen comments. **Example** ~~~~~~~~~~~~~{.cpp} /*/** */* - * Function SetFoo - * takes aFoo and copies it into this instance. + * Copy aFoo into this instance. */ void SetFoo( int aFoo ); ~~~~~~~~~~~~~ @@ -174,18 +173,21 @@ one or more blank lines above them. One blank line is preferred. ## 3.2 Doxygen ## {#doxygen} Doxygen is a C++ source code documenting tool used by the project. Descriptive *.html files can be generated from the source code by installing Doxygen and -building the target named **doxygen-docs**. +building the target named **doxygen-docs** and **dev-docs** that include this +document. $ cd $ make doxygen-docs -The \*.html files will be placed into -\/Documentation/doxygen/html/ +The generated source \*.html files will be placed into +\/Documentation/doxygen/html/ and the developer's +\*.html files will be placed into +\/Documentation/development/doxygen/html/ Doxygen comments are used to build developer documentation from the source code. They should normally be only placed in header files and not in \*.cpp files. This eliminates the obligation to keep two comments in -agreement with each other. is if the class, function, or enum, etc. is +agreement with each other. If the class, function, or enum, etc. is only defined in a \*.cpp source file and not present in any header file, in which case the Doxygen comments should go into the \*.cpp source file. Again, avoid duplicating the Doxygen comments in both the header and @@ -208,28 +210,31 @@ static) function known only to a \*.cpp file. The format of a function comment is chosen to serve a dual purpose role: delineation of the function declaration within the source code and to create a consistent leading sentence in the doxygen html output. The chosen format is -“Function \” as shown in the example below. +to use a descriptive single line sentence, followed by a blank line, +followed by an optional detailed description as the shown in the example +below. **Example** ~~~~~~~~~~~~~{.cpp} /*/** */* - * Function Print - * formats and writes text to the output stream. - * @param nestLevel is the multiple of spaces to precede the output with. - * @param fmt is a printf() style format string. + * Format and write text to an output stream. + * + * A really detailed description goes here if it's needed. + * + * @param aMestLevel is the multiple of spaces to precede the output with. + * @param aFmt is a printf() style format string. * @param ... is a variable list of parameters that will get blended into * the output under control of the format string. - * @return int - the number of characters output. - * @throw IO_ERROR, if there is a problem outputting, such asisk. + * @return the number of characters output. + * @throw IO_ERROR, if there is a problem outputting. */ - int PRINTF_FUNC Print( int nestLevel, - const char* fmt, ... ); + int PRINTF_FUNC Print( int aNestLevel, const char* aFmt, ... ); ~~~~~~~~~~~~~ -The “Function \” text goes on the 2nd line of the comment. The -\@return keyword if present, should show the type of the return value -followed by a hiphen. The \@param keyword names a function parameter -and the text following should flow like a normal English sentence. +The single line description goes on the 2nd line of the comment. The +\@return keyword if present, should describe the return value followed +by a hyphen. The \@param keyword names a function parameter and the text +following should flow like a normal English sentence. ### 3.2.2 Class Comments ### {#class_comments} A class comment describes a class declaration by giving the purpose and @@ -241,14 +246,15 @@ multiple paragraphs. **Example** ~~~~~~~~~~~~~{.cpp} /*/** */* - * Class OUTPUTFORMATTER - * is an important interface (abstract) class used to output UTF8 text in - * a convenient way. The primary interface is "printf() - like" but - * with support for indentation control. The destination of the 8 bit - * wide text is up to the implementer. + * An interface (abstract) class used to output UTF8 text in a + * convenient way. + * + * The primary interface is "printf() like" but with support for + * indentation control. The destination of the 8 bit wide text is + * up to the implementer. *

- * The implementer only has to implement the write() function, but can - * also optionally re-implement GetQuoteChar(). + * The implementer only has to implement the write() function, but + * can also optionally re-implement GetQuoteChar(). *

* If you want to output a wxString, then use CONV_TO_UTF8() on it * before passing it as an argument to Print(). @@ -440,7 +446,7 @@ Each header file should include an \#ifndef which is commonly used to prevent compiler errors in the case where the header file is seen multiple times in the code stream presented to the compiler. Just after the license statement, at the top of the file there should be -lines similar to these (but with a filename specific token other than +lines similar to these (but with a file name specific token other than `RICHIO_H_`): ~~~~~~~~~~~~~{.cpp} @@ -558,8 +564,7 @@ below was taken directly from the KiCad source. /*/** */* - * Struct IOError - * is a class used to hold an error message and may be used to throw exceptions + * A class used to hold an error message and may be used to throw exceptions * containing meaningful error messages. */ struct IOError @@ -579,9 +584,7 @@ below was taken directly from the KiCad source. /*/** */* - * Class LINE_READER - * reads single lines of text into its buffer and increments a line number counter. - * It throws an exception if a line is too long. + * Read single lines of text into a buffer and increments a line number counter. */ class LINE_READER { @@ -597,12 +600,10 @@ below was taken directly from the KiCad source. public: /*/** */* - * Constructor LINE_READER - * takes an open FILE and the size of the desired line buffer. - * @param aFile An open file in "ascii" mode, not binary mode. - * @param aMaxLineLength The number of bytes to use in the line buffer. + * @param aFile is an open file in "ascii" mode, not binary mode. + * @param aMaxLineLength is the number of bytes to use in the line buffer. */ - LINE_READER( FILE* aFile, unsigned aMaxLineLength ); + LINE_READER( FILE* aFile, unsigned aMaxLineLength ); ~LINE_READER() { @@ -619,12 +620,11 @@ below was taken directly from the KiCad source. */ /*/** */* - * Function ReadLine - * reads a line of text into the buffer and increments the line number - * counter. If the line is larger than the buffer size, then an exception - * is thrown. - * @return int - The number of bytes read, 0 at end of file. - * @throw IOError only when a line is too long. + * Read a line of text into the buffer and increments the line number + * counter. + * + * @return is the number of bytes read, 0 at end of file. + * @throw IO_ERROR when a line is too long. */ int ReadLine(); @@ -647,15 +647,16 @@ below was taken directly from the KiCad source. /*/** */* - * Class OUTPUTFORMATTER - * is an interface (abstract class) used to output ASCII text in a convenient - * way. The primary interface is printf() like but with support for indentation - * control. The destination of the 8 bit wide text is up to the implementer. - * If you want to output a wxString, then use CONV_TO_UTF8() on it before passing - * it as an argument to Print(). + * An interface (abstract class) used to output ASCII text in a convenient way. + * + * The primary interface is printf() like with support for indentation control. + * The destination of the 8 bit wide text is up to the implementer. If you want + * to output a wxString, then use CONV_TO_UTF8() on it before passing it as an + * argument to Print(). *

* Since this is an abstract interface, only classes derived from this one * will be the implementations. + *

*/ class OUTPUTFORMATTER { @@ -675,58 +676,54 @@ below was taken directly from the KiCad source. public: /*/** */* - * Function Print - * formats and writes text to the output stream. + * Format and write text to the output stream. * - * @param nestLevel The multiple of spaces to preceed the output with. - * @param fmt A printf() style format string. - * @param ... a variable list of parameters that will get blended into + * @param nestLevel is the multiple of spaces to preceed the output with. + * @param fmt is a printf() style format string. + * @param ... is a variable list of parameters that will get blended into * the output under control of the format string. - * @return int - the number of characters output. - * @throw IOError, if there is a problem outputting, such as a full disk. + * @return the number of characters output. + * @throw IO_ERROR if there is a problem outputting, such as a full disk. */ virtual int PRINTF_FUNC Print( int nestLevel, const char* fmt, ... ) = 0; /*/** */* - * Function GetQuoteChar - * performs quote character need determination. - * It returns the quote character as a single character string for a given + * Return the quoting character required for aWrapee. + * + * Return the quote character as a single character string for a given * input wrapee string. If the wrappee does not need to be quoted, * the return value is "" (the null string), such as when there are no - * delimiters in the input wrapee string. If you want the quote_char + * delimiters in the input wrapee string. If you want the quote character * to be assuredly not "", then pass in "(" as the wrappee. *

* Implementations are free to override the default behavior, which is to * call the static function of the same name. - - * @param wrapee A string that might need wrapping on each end. - * @return const char* - the quote_char as a single character string, or "" + *

+ * + * @param aWrapee is a string that might need wrapping on each end. + * @return the quote character as a single character string, or "" * if the wrapee does not need to be wrapped. */ - virtual const char* GetQuoteChar( const char* wrapee ) = 0; + virtual const char* GetQuoteChar( const char* aWrapee ) = 0; virtual ~OUTPUTFORMATTER() {} /*/** */* - * Function GetQuoteChar - * performs quote character need determination according to the Specctra DSN - * specification. - - * @param wrapee A string that might need wrapping on each end. - * @param quote_char A single character C string which provides the current + * Get the quote character according to the Specctra DSN specification. + * + * @param aWrapee is a string that might need wrapping on each end. + * @param aQuoteChar is a single character C string which provides the current * quote character, should it be needed by the wrapee. * - * @return const char* - the quote_char as a single character string, or "" + * @return the quote_character as a single character string, or "" * if the wrapee does not need to be wrapped. */ - static const char* GetQuoteChar( const char* wrapee, const char* quote_char ); + static const char* GetQuoteChar( const char* aWrapee, const char* aQuoteChar ); }; /*/** */* - * Class STRINGFORMATTER - * implements OUTPUTFORMATTER to a memory buffer. After Print()ing the - * string is available through GetString() + * Implement an OUTPUTFORMATTER to a memory buffer. */ class STRINGFORMATTER : public OUTPUTFORMATTER { @@ -739,8 +736,7 @@ below was taken directly from the KiCad source. public: /*/** */* - * Constructor STRINGFORMATTER - * reserves space in the buffer + * Reserve space in the buffer */ STRINGFORMATTER( int aReserve = 300 ) : buffer( aReserve, '\0' ) @@ -749,8 +745,7 @@ below was taken directly from the KiCad source. /*/** */* - * Function Clear - * clears the buffer and empties the internal string. + * Clears the buffer and empties the internal string. */ void Clear() { @@ -758,8 +753,7 @@ below was taken directly from the KiCad source. } /*/** */* - * Function StripUseless - * removes whitespace, '(', and ')' from the mystring. + * Remove whitespace, '(', and ')' from the internal string. */ void StripUseless(); diff --git a/eeschema/sch_io_mgr.h b/eeschema/sch_io_mgr.h index 8102b992b0..2fb399ef42 100644 --- a/eeschema/sch_io_mgr.h +++ b/eeschema/sch_io_mgr.h @@ -46,8 +46,7 @@ class SCH_IO_MGR public: /** - * Enum SCH_FILE_T - * is a set of file types that the SCH_IO_MGR knows about, and for which there + * A set of file types that the #SCH_IO_MGR knows about, and for which there * has been a plugin written. */ enum SCH_FILE_T @@ -61,22 +60,22 @@ public: }; /** - * Function FindPlugin - * returns a SCH_PLUGIN which the caller can use to import, export, save, or load - * design documents. The returned SCH_PLUGIN, may be reference counted, so please - * call PluginRelease() when you are done using the returned SCH_PLUGIN. It may or - * may not be code running from a DLL/DSO. + * Return a #SCH_PLUGIN which the caller can use to import, export, save, or load + * design documents. * - * @param aFileType is from SCH_FILE_T and tells which plugin to find. + * The returned #SCH_PLUGIN, may be reference counted, so please call PluginRelease() + * when you are done using the returned #SCH_PLUGIN. It may or may not be code running + * from a DLL/DSO. * - * @return SCH_PLUGIN* - the plugin corresponding to aFileType or NULL if not found. + * @param aFileType is from #SCH_FILE_T and tells which plugin to find. + * + * @return the plugin corresponding to aFileType or NULL if not found. * Caller owns the returned object, and must call PluginRelease when done using it. */ static SCH_PLUGIN* FindPlugin( SCH_FILE_T aFileType ); /** - * Function PluginRelease - * releases a SCH_PLUGIN back to the system, and may cause it to be unloaded from memory. + * Release a #SCH_PLUGIN back to the system, and may cause it to be unloaded from memory. * * @param aPlugin is the one to be released, and which is no longer usable * after calling this. @@ -84,76 +83,75 @@ public: static void ReleasePlugin( SCH_PLUGIN* aPlugin ); /** - * Function ShowType - * returns a brief name for a plugin, given aFileType enum. + * Return a brief name for a plugin, given aFileType enum. */ static const wxString ShowType( SCH_FILE_T aFileType ); /** - * Function EnumFromStr - * returns the SCH_FILE_T from the corresponding plugin type name: "kicad", "legacy", etc. + * Return the #SCH_FILE_T from the corresponding plugin type name: "kicad", "legacy", etc. */ static SCH_FILE_T EnumFromStr( const wxString& aFileType ); /** - * Function GetFileExtension - * returns the file extension for \a aFileType. + * Return the file extension for \a aFileType. * - * @param aFileType The #SCH_FILE_T type. - * @return A wxString object containing the file extension for \a aFileType or an empty - * string if \a aFileType is invalid. + * @param aFileType is the #SCH_FILE_T type. + * + * @return the file extension for \a aFileType or an empty string if \a aFileType is invalid. */ static const wxString GetFileExtension( SCH_FILE_T aFileType ); /** - * Function GuessPluginTypeFromLibPath - * returns a plugin type given a footprint library's libPath. + * Return a plugin type given a footprint library's libPath. */ static SCH_FILE_T GuessPluginTypeFromLibPath( const wxString& aLibPath ); /** - * Function Load - * finds the requested SCH_PLUGIN and if found, calls the SCH_PLUGIN->Load(..) function + * Load the requested #SCH_PLUGIN and if found, calls the SCH_PLUGIN->Load(..) function * on it using the arguments passed to this function. After the SCH_PLUGIN->Load() - * function returns, the SCH_PLUGIN is Released() as part of this call. + * function returns, the #SCH_PLUGIN is Released() as part of this call. + * + * @param aFileType is the #SCH_FILE_T of file to load. * - * @param aFileType is the SCH_FILE_T of file to load. * @param aFileName is the name of the file to load. + * * @param aKiway is the #KIWAY object used to access the component libraries loaded * by the project. - * @param aAppendToMe is an existing #SCHEMATIC to append to, use NULL if a new - * #SCHEMATIC load is wanted. + * + * @param aAppendToMe is an existing #SCH_SHEET to append to, use NULL if a new + * #SCH_SHEET load is wanted. + * * @param aProperties is an associative array that allows the caller to pass additional - * tuning parameters to the SCH_PLUGIN. + * tuning parameters to the #SCH_PLUGIN. * - * @return SCHEMATIC* - caller owns it, never NULL because exception thrown if error. + * @return the loaded schematic which the caller owns. This is never NULL because + * exception thrown if an error occurs. * - * @throw IO_ERROR if the SCH_PLUGIN cannot be found, file cannot be found, + * @throw IO_ERROR if the #SCH_PLUGIN cannot be found, file cannot be found * or file cannot be loaded. */ static SCH_SHEET* Load( SCH_FILE_T aFileType, const wxString& aFileName, KIWAY* aKiway, SCH_SHEET* aAppendToMe = NULL, const PROPERTIES* aProperties = NULL ); /** - * Function Save - * will write either a full aSchematic to a storage file in a format that this + * Write either a full aSchematic to a storage file in a format that this * implementation knows about, or it can be used to write a portion of * aSchematic to a special kind of export file. * - * @param aFileType is the SCH_FILE_T of file to save. + * @param aFileType is the #SCH_FILE_T of file to save. * * @param aFileName is the name of a file to save to on disk. - * @param aSchematic is the SCHEMATIC document (data tree) to save or export to disk. * - * @param aSchematic is the in memory document tree from which to extract information - * when writing to \a aFileName. The caller continues to own the SCHEMATIC, and - * the plugin should refrain from modifying the SCHEMATIC if possible. + * @param aSchematic is the #SCH_SCREN document (data tree) to save or export to disk. + * + * @param aKiway is the #KIWAY object used to access the component libraries loaded + * by the project. * * @param aProperties is an associative array that can be used to tell the - * saver how to save the file, because it can take any number of - * additional named tuning arguments that the plugin is known to support. - * The caller continues to own this object (plugin may not delete it), and - * plugins should expect it to be optionally NULL. + * saver how to save the file, because it can take any number of + * additional named tuning arguments that the plugin is known to support. + * The caller continues to own this object (plugin may not delete it), and + * plugins should expect it to be optionally NULL. * * @throw IO_ERROR if there is a problem saving or exporting. */ @@ -163,8 +161,7 @@ public: /** - * Class SCH_PLUGIN - * is a base class that SCHEMATIC loading and saving plugins should derive from. + * Base class that schematic file and library loading and saving plugins should derive from. * Implementations can provide either Load() or Save() functions, or both. * SCH_PLUGINs throw exceptions, so it is best that you wrap your calls to these * functions in a try catch block. Plugins throw exceptions because it is illegal @@ -191,22 +188,17 @@ public: //------------------------------------------------------ /** - * - * Function GetName - * returns a brief hard coded name for this SCH_PLUGIN. + * Returns a brief hard coded name for this SCH_PLUGIN. */ virtual const wxString GetName() const = 0; /** - * Function GetFileExtension - * returns the file extension for the SCH_PLUGIN. + * Returns the file extension for the #SCH_PLUGIN. */ virtual const wxString GetFileExtension() const = 0; /** - * Function GetModifyHash - * - * returns the modification hash from the library cache. + * Return the modification hash from the library cache. * * @note This is temporary until the new s-expr file format is implement. The new file * format will embed symbols instead of referencing them from the library. This @@ -219,16 +211,17 @@ public: virtual void SaveLibrary( const wxString& aFileName, const PROPERTIES* aProperties = NULL ); /** - * Function Load - * - * loads information from some input file format that this SCH_PLUGIN implementation - * knows about, into either a new SCHEMATIC or an existing one. This may be used to load an - * entire new SCHEMATIC, or to augment an existing one if @a aAppendToMe is not NULL. + * Load information from some input file format that this #SCH_PLUGIN implementation + * knows about, into either a new #SCH_SHEET or an existing one. This may be used to load an + * entire new #SCH_SHEET, or to augment an existing one if \a aAppendToMe is not NULL. * * @param aFileName is the name of the file to use as input and may be foreign in * nature or native in nature. * - * @param aAppendToMe is an existing SCHEMATIC to append to, but if NULL then this means + * @param aKiway is the #KIWAY object used to access the component libraries loaded + * by the project. + * + * @param aAppendToMe is an existing #SCH_SHEET to append to, but if NULL then this means * "do not append, rather load anew". * * @param aProperties is an associative array that can be used to tell the loader how to @@ -238,8 +231,8 @@ public: * this object (plugin may not delete it), and plugins should expect * it to be optionally NULL. * - * @return SCHEMATIC* - the successfully loaded schematic, or the same one as \a aAppendToMe - * if \a aAppendToMe was not NULL, and the caller owns it. + * @return the successfully loaded schematic, or the same one as \a aAppendToMe + * if \a aAppendToMe was not NULL, and the caller owns it. * * @throw IO_ERROR if there is a problem loading, and its contents should say what went * wrong, using line number and character offsets of the input file if @@ -249,19 +242,20 @@ public: SCH_SHEET* aAppendToMe = NULL, const PROPERTIES* aProperties = NULL ); /** - * Function Save - * - * will write @a aSchematic to a storage file in a format that this - * SCH_PLUGIN implementation knows about, or it can be used to write a portion of - * aSchematic to a special kind of export file. + * Write \a aSchematic to a storage file in a format that this #SCH_PLUGIN implementation + * knows about, or it can be used to write a portion of \a aSchematic to a special kind + * of export file. * * @param aFileName is the name of a file to save to on disk. * - * @param aSchematic is the class SCHEMATIC in memory document tree from which to extract + * @param aSchematic is the class #SCH_SCREEN in memory document tree from which to extract * information when writing to \a aFileName. The caller continues to * own the SCHEMATIC, and the plugin should refrain from modifying the * SCHEMATIC if possible. * + * @param aKiway is the #KIWAY object used to access the component libraries loaded + * by the project. + * * @param aProperties is an associative array that can be used to tell the saver how to * save the file, because it can take any number of additional named * tuning arguments that the plugin is known to support. The caller @@ -277,16 +271,16 @@ public: const PROPERTIES* aProperties = NULL ); /** - * Function EnumerateSymbolLib - * - * returns a list of #LIB_PART alias names contained within the library @a aLibraryPath. + * Populate a list of #LIB_PART alias names contained within the library \a aLibraryPath. * * @param aAliasNameList is an array to populate with the #LIB_ALIAS names associated with * the library. + * * @param aLibraryPath is a locator for the "library", usually a directory, file, * or URL containing one or more #LIB_PART objects. + * * @param aProperties is an associative array that can be used to tell the plugin anything - * needed about how to perform with respect to @a aLibraryPath. The + * needed about how to perform with respect to \a aLibraryPath. The * caller continues to own this object (plugin may not delete it), and * plugins should expect it to be optionally NULL. * @@ -297,16 +291,16 @@ public: const PROPERTIES* aProperties = NULL ); /** - * Function EnumerateSymbolLib - * - * returns a list of #LIB_PART aliases contained within the library @a aLibraryPath. + * Populate a list of #LIB_PART aliases contained within the library \a aLibraryPath. * * @param aAliasList is an array to populate with the #LIB_ALIAS pointers associated with * the library. + * * @param aLibraryPath is a locator for the "library", usually a directory, file, * or URL containing one or more #LIB_PART objects. + * * @param aProperties is an associative array that can be used to tell the plugin anything - * needed about how to perform with respect to @a aLibraryPath. The + * needed about how to perform with respect to \a aLibraryPath. The * caller continues to own this object (plugin may not delete it), and * plugins should expect it to be optionally NULL. * @@ -317,10 +311,8 @@ public: const PROPERTIES* aProperties = NULL ); /** - * Function LoadSymbol - * - * loads a #LIB_ALIAS object having @a aAliasName from the @a aLibraryPath containing - * a library format that this SCH_PLUGIN knows about. The #LIB_PART should be accessed + * Load a #LIB_ALIAS object having \a aAliasName from the \a aLibraryPath containing + * a library format that this #SCH_PLUGIN knows about. The #LIB_PART should be accessed * indirectly using the #LIB_ALIAS it is associated with. * * @param aLibraryPath is a locator for the "library", usually a directory, file, @@ -335,18 +327,16 @@ public: * (plugin may not delete it), and plugins should expect it to be * optionally NULL. * - * @return LIB_ALIAS* - if found caller shares it, else NULL if not found. + * @return the alias if found caller shares it or NULL if not found. * - * @throw IO_ERROR if the library cannot be found or read. No exception - * is thrown in the case where aAliasName cannot be found. + * @throw IO_ERROR if the library cannot be found or read. No exception + * is thrown in the case where aAliasName cannot be found. */ virtual LIB_ALIAS* LoadSymbol( const wxString& aLibraryPath, const wxString& aAliasName, const PROPERTIES* aProperties = NULL ); /** - * Function SaveSymbol - * - * will write @a aSymbol to an existing library located at @a aLibraryPath. If a #LIB_PART + * Write \a aSymbol to an existing library located at \a aLibraryPath. If a #LIB_PART * by the same name already exists or there are any conflicting alias names, the new * #LIB_PART will silently overwrite any existing aliases and/or part becaue libraries * cannot have duplicate alias names. It is the responsibility of the caller to check @@ -370,11 +360,9 @@ public: const PROPERTIES* aProperties = NULL ); /** - * Function DeleteAlias + * Delete \a aAliasName from the library at \a aLibraryPath. * - * deletes @a aAliasName from the library at @a aLibraryPath. - * - * If @a aAliasName refers the the root #LIB_PART object, the part is renamed to + * If \a aAliasName refers the the root #LIB_PART object, the part is renamed to * the next or previous #LIB_ALIAS in the #LIB_PART if one exists. If the #LIB_ALIAS * is the last alias referring to the root #LIB_PART, the #LIB_PART is also removed * from the library. @@ -396,10 +384,8 @@ public: const PROPERTIES* aProperties = NULL ); /** - * Function DeleteSymbol - * - * deletes the entire #LIB_PART associated with @a aAliasName from the library - * @a aLibraryPath. + * Delete the entire #LIB_PART associated with \a aAliasName from the library + * \a aLibraryPath. * * @param aLibraryPath is a locator for the "library", usually a directory, file, * or URL containing several symbols. @@ -419,9 +405,7 @@ public: const PROPERTIES* aProperties = NULL ); /** - * Function CreateSymbolLib - * - * creates a new empty symbol library at @a aLibraryPath. It is an error to attempt + * Create a new empty symbol library at \a aLibraryPath. It is an error to attempt * to create an existing library or to attempt to create on a "read only" location. * * @param aLibraryPath is a locator for the "library", usually a directory, file, @@ -439,9 +423,7 @@ public: const PROPERTIES* aProperties = NULL ); /** - * Function DeleteSymbolLib - * - * deletes an existing symbol library and returns true if successful, or if library + * Delete an existing symbol library and returns true if successful, or if library * does not exist returns false, or throws an exception if library exists but is read * only or cannot be deleted for some other reason. * @@ -455,7 +437,7 @@ public: * object (plugin may not delete it), and plugins should expect * it to be optionally NULL. * - * @return bool - true if library deleted, false if library did not exist. + * @return true if library deleted or false if library did not exist. * * @throw IO_ERROR if there is a problem deleting an existing library. */ @@ -463,8 +445,7 @@ public: const PROPERTIES* aProperties = NULL ); /** - * Function IsSymbolLibWritable - * returns true if the library at @a aLibraryPath is writable. (Often + * Return true if the library at \a aLibraryPath is writable. (Often * system libraries are read only because of where they are installed.) * * @param aLibraryPath is a locator for the "library", usually a directory, file, @@ -475,9 +456,7 @@ public: virtual bool IsSymbolLibWritable( const wxString& aLibraryPath ); /** - * Function SymbolLibOptions - * - * appends supported SCH_PLUGIN options to @a aListToAppenTo along with internationalized + * Append supported #SCH_PLUGIN options to \a aListToAppenTo along with internationalized * descriptions. Options are typically appended so that a derived SCH_PLUGIN can call * its base class function by the same name first, thus inheriting options declared there. * (Some base class options could pertain to all Symbol*() functions in all derived @@ -494,11 +473,11 @@ public: * It may be multi-line and be quite explanatory of the option. * *
- * In the future perhaps @a aListToAppendTo evolves to something capable of also + * In the future perhaps \a aListToAppendTo evolves to something capable of also * holding a wxValidator for the cells in said dialog: * http://forums.wxwidgets.org/viewtopic.php?t=23277&p=104180. * This would require a 3 column list, and introducing wx GUI knowledge to - * SCH_PLUGIN, which has been avoided to date. + * #SCH_PLUGIN, which has been avoided to date. */ virtual void SymbolLibOptions( PROPERTIES* aListToAppendTo ) const; @@ -516,10 +495,8 @@ public: /** - * Class SCH_PLUGIN_RELEASER - * - * releases a SCH_PLUGIN in the context of a potential thrown exception, through - * its destructor. + * Helper object to release a #SCH_PLUGIN in the context of a potential thrown exception + * through its destructor. */ class SCH_PLUGIN_RELEASER { diff --git a/eeschema/schframe.h b/eeschema/schframe.h index c67a898dd0..c0bda34756 100644 --- a/eeschema/schframe.h +++ b/eeschema/schframe.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2015 Jean-Pierre Charras, jp.charras wanadoo.fr - * Copyright (C) 2008-2015 Wayne Stambaugh + * Copyright (C) 2008-2017 Wayne Stambaugh * Copyright (C) 2004-2017 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or @@ -1089,7 +1089,7 @@ private: * else search in all loaded libs * * @param aDC is the device context to draw upon. - * @param aFilters is a filter to pass the allowed lib names list, or library name + * @param aFilter is a filter to pass the allowed lib names list, or library name * to load the component from and/or some other filters * if NULL, no filtering. * @param aHistoryList list remembering recently used component names. diff --git a/include/plot_common.h b/include/plot_common.h index ecf1629ee5..3cf0e4bc6f 100644 --- a/include/plot_common.h +++ b/include/plot_common.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2016-2017 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -322,8 +322,8 @@ public: * virtual function FlashPadRoundRect * @param aPadPos Position of the shape (center of the rectangle * @param aSize = size of rounded rect - * @param aCornerRadius = radius of the rounded corners - * @param aOrient is the rotation of the shape + * @param aCornerRadius Radius of the rounded corners + * @param aOrient The rotation of the shape * @param aTraceMode FILLED or SKETCH * @param aData an auxiliary info (mainly for gerber format attributes) */ @@ -607,13 +607,12 @@ public: virtual void Arc( const wxPoint& centre, double StAngle, double EndAngle, int rayon, FILL_T fill, int width = USE_DEFAULT_LINE_WIDTH ) override; virtual void PenTo( const wxPoint& pos, char plume ) override; - virtual void FlashPadCircle( const wxPoint& pos, int diametre, - EDA_DRAW_MODE_T trace_mode, void* aData ) override; - virtual void FlashPadOval( const wxPoint& pos, const wxSize& size, double orient, - EDA_DRAW_MODE_T trace_mode, void* aData ) override; + virtual void FlashPadCircle( const wxPoint& aPadPos, int aDiameter, + EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + virtual void FlashPadOval( const wxPoint& aPadPos, const wxSize& aSize, double aPadOrient, + EDA_DRAW_MODE_T aTraceMode, void* aData ) override; virtual void FlashPadRect( const wxPoint& aPadPos, const wxSize& aSize, - double aPadOrient, EDA_DRAW_MODE_T aTraceMode, - void* aData ) override; + double aOrient, EDA_DRAW_MODE_T aTraceMode, void* aData ) override; virtual void FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize, int aCornerRadius, double aOrient, EDA_DRAW_MODE_T aTraceMode, void* aData ) override; @@ -666,12 +665,13 @@ public: } // Pad routines are handled with lower level primitives - virtual void FlashPadCircle( const wxPoint& pos, int diametre, - EDA_DRAW_MODE_T trace_mode, void* aData ) override; - virtual void FlashPadOval( const wxPoint& pos, const wxSize& size, double orient, - EDA_DRAW_MODE_T trace_mode, void* aData ) override; - virtual void FlashPadRect( const wxPoint& pos, const wxSize& size, - double orient, EDA_DRAW_MODE_T trace_mode, void* aData ) override; + virtual void FlashPadCircle( const wxPoint& aPadPos, int aDiameter, + EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + virtual void FlashPadOval( const wxPoint& aPadPos, const wxSize& aSize, double aPadOrient, + EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + virtual void FlashPadRect( const wxPoint& aPadPos, const wxSize& aSize, + double aPadOrient, EDA_DRAW_MODE_T aTraceMode, + void* aData ) override; virtual void FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize, int aCornerRadius, double aOrient, EDA_DRAW_MODE_T aTraceMode, void* aData ) override; diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index a932064ffa..e1de925db6 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -618,8 +618,8 @@ public: * Function SetElementVisibility * changes the visibility of an element category * @param aElement is from the enum by the same name - * @see enum GAL_LAYER_ID - * @param aNewState = The new visibility state of the element category + * @param aNewState The new visibility state of the element category + * @see enum PCB_LAYER_ID */ void SetElementVisibility( GAL_LAYER_ID aElement, bool aNewState );