https://github.com/Kitware/CMake
Revision 4c54b2662387a34e1dbe7f238f805ed22f0297f2 authored by Kitware Robot on 18 September 2021, 04:01:14 UTC, committed by Kitware Robot on 18 September 2021, 04:01:14 UTC
1 parent 7b09ff1
Raw File
Tip revision: 4c54b2662387a34e1dbe7f238f805ed22f0297f2 authored by Kitware Robot on 18 September 2021, 04:01:14 UTC
CMake Nightly Date Stamp
Tip revision: 4c54b26
cmParsePHPCoverage.h
/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
   file Copyright.txt or https://cmake.org/licensing for details.  */
#pragma once

#include "cmConfigure.h" // IWYU pragma: keep

#include <iosfwd>
#include <string>

class cmCTest;
class cmCTestCoverageHandlerContainer;

/** \class cmParsePHPCoverage
 * \brief Parse xdebug PHP coverage information
 *
 * This class is used to parse php coverage information produced
 * by xdebug.  The data is stored as a php dump of the array
 * return by xdebug coverage.  It is an array of arrays.
 */
class cmParsePHPCoverage
{
public:
  cmParsePHPCoverage(cmCTestCoverageHandlerContainer& cont, cmCTest* ctest);
  bool ReadPHPCoverageDirectory(const char* dir);
  void PrintCoverage();

private:
  bool ReadPHPData(const char* file);
  bool ReadArraySize(std::istream& in, int& size);
  bool ReadFileInformation(std::istream& in);
  bool ReadInt(std::istream& in, int& v);
  bool ReadCoverageArray(std::istream& in, std::string const&);
  bool ReadUntil(std::istream& in, char until);
  cmCTestCoverageHandlerContainer& Coverage;
  cmCTest* CTest;
};
back to top