Skip to content

Commit

Permalink
Formatting and improving comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
kimmov committed Jul 19, 2010
1 parent 3c37604 commit c259305
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions lib/filelister.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
/// @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
{
public:
Expand All @@ -35,31 +39,37 @@ class 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 path root path
* @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
* @return simplified path
*/
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 fname2 other filename
* @return true if the filenames match on the current platform
*/
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
* @param filename filename
* @brief Check if the file extension indicates that it's a source file.
* 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
*/
virtual bool acceptFile(const std::string &filename);
Expand Down

0 comments on commit c259305

Please sign in to comment.