Formatting and improving comments.

This commit is contained in:
Kimmo Varis 2010-07-19 16:33:10 +03:00
parent 3c376047ba
commit c25930581c
1 changed files with 17 additions and 7 deletions

View File

@ -25,7 +25,11 @@
/// @addtogroup Core /// @addtogroup Core
/// @{ /// @{
/** @brief Base class for Cppcheck filelisters. Used to recursively search for source files. This class defines a platform independant interface and subclasses will provide platform dependant implementation. */ /**
* @brief Base class for Cppcheck filelisters.
* Used to recursively search for source files. This class defines a platform
* independant interface and subclasses will provide platform dependant
* implementation. */
class FileLister class FileLister
{ {
public: public:
@ -35,22 +39,27 @@ public:
virtual ~FileLister() {} virtual ~FileLister() {}
/** /**
* @brief Add source files to a vector (*.c;*.cpp;*.cxx;*.c++;*.cc;*.txx) * @brief Recursively add source files to a vector.
* Add source files from given directory and all subdirectries to the
* given vector. Only files with accepted extensions
* (*.c;*.cpp;*.cxx;*.c++;*.cc;*.txx) are added.
* @param filenames output vector that filenames are written to * @param filenames output vector that filenames are written to
* @param path root path * @param path root path
* @param recursive Should files be added recursively or not? * @param recursive Should files be added recursively or not?
*/ */
virtual void recursiveAddFiles(std::vector<std::string> &filenames, const std::string &path, bool recursive) = 0; virtual void recursiveAddFiles(std::vector<std::string> &filenames,
const std::string &path, bool recursive) = 0;
/** /**
* @brief simplify path "foo/bar/.." => "foo" * @brief Simplify path "foo/bar/.." => "foo"
* @param originalPath path to be simplified * @param originalPath path to be simplified
* @return simplified path * @return simplified path
*/ */
virtual std::string simplifyPath(const char *originalPath); virtual std::string simplifyPath(const char *originalPath);
/** /**
* @brief compare filenames to see if they are the same. On Linux the comparison is case-sensitive. On Windows it is case-insensitive. * @brief Compare filenames to see if they are the same.
* On Linux the comparison is case-sensitive. On Windows it is case-insensitive.
* @param fname1 one filename * @param fname1 one filename
* @param fname2 other filename * @param fname2 other filename
* @return true if the filenames match on the current platform * @return true if the filenames match on the current platform
@ -58,8 +67,9 @@ public:
virtual bool sameFileName(const std::string &fname1, const std::string &fname2) = 0; virtual bool sameFileName(const std::string &fname1, const std::string &fname2) = 0;
/** /**
* @brief check if the file extension indicates that it's a source file - *.c;*.cpp;*.cxx;*.c++;*.cc;*.txx * @brief Check if the file extension indicates that it's a source file.
* @param filename filename * Check if the file has source file extension: *.c;*.cpp;*.cxx;*.c++;*.cc;*.txx
* @param filename filename to check
* @return returns true if the file extension indicates it should be checked * @return returns true if the file extension indicates it should be checked
*/ */
virtual bool acceptFile(const std::string &filename); virtual bool acceptFile(const std::string &filename);