1
0

cmParsePHPCoverage.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc.
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmParsePHPCoverage_h
  11. #define cmParsePHPCoverage_h
  12. #include "cmStandardIncludes.h"
  13. #include "cmCTestCoverageHandler.h"
  14. /** \class cmParsePHPCoverage
  15. * \brief Parse xdebug PHP coverage information
  16. *
  17. * This class is used to parse php coverage information produced
  18. * by xdebug. The data is stored as a php dump of the array
  19. * return by xdebug coverage. It is an array of arrays.
  20. */
  21. class cmParsePHPCoverage
  22. {
  23. public:
  24. cmParsePHPCoverage(cmCTestCoverageHandlerContainer& cont,
  25. cmCTest* ctest);
  26. bool ReadPHPCoverageDirectory(const char* dir);
  27. void PrintCoverage();
  28. private:
  29. bool ReadPHPData(const char* file);
  30. bool ReadArraySize(std::istream& in, int& size);
  31. bool ReadFileInformation(std::istream& in);
  32. bool ReadInt(std::istream& in, int& v);
  33. bool ReadCoverageArray(std::istream& in, std::string const&);
  34. bool ReadUntil(std::istream& in, char until);
  35. cmCTestCoverageHandlerContainer& Coverage;
  36. cmCTest* CTest;
  37. };
  38. #endif