cmCTestCoverageHandler.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef cmCTestCoverageHandler_h
  14. #define cmCTestCoverageHandler_h
  15. #include "cmStandardIncludes.h"
  16. #include "cmListFileCache.h"
  17. class cmCTest;
  18. /** \class cmCTestCoverageHandler
  19. * \brief A class that handles coverage computaiton for ctest
  20. *
  21. */
  22. class cmCTestCoverageHandler
  23. {
  24. public:
  25. /*
  26. * The main entry point for this class
  27. */
  28. int CoverageDirectory(cmCTest *);
  29. /*
  30. * If verbose then more informaiton is printed out
  31. */
  32. void SetVerbose(bool val) { m_Verbose = val; }
  33. cmCTestCoverageHandler();
  34. private:
  35. bool m_Verbose;
  36. cmCTest *m_CTest;
  37. struct cmCTestCoverage
  38. {
  39. cmCTestCoverage()
  40. {
  41. m_AbsolutePath = "";
  42. m_FullPath = "";
  43. m_Covered = false;
  44. m_Tested = 0;
  45. m_UnTested = 0;
  46. m_Lines.clear();
  47. m_Show = false;
  48. }
  49. std::string m_AbsolutePath;
  50. std::string m_FullPath;
  51. bool m_Covered;
  52. int m_Tested;
  53. int m_UnTested;
  54. std::vector<int> m_Lines;
  55. bool m_Show;
  56. };
  57. typedef std::map<std::string, cmCTestCoverage> tm_CoverageMap;
  58. };
  59. #endif