Coverage Report

Created: 2026-02-09 06:05

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/CMake/Source/cmGraphAdjacencyList.h
Line
Count
Source
1
/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
2
   file LICENSE.rst or https://cmake.org/licensing for details.  */
3
#pragma once
4
5
#include "cmConfigure.h" // IWYU pragma: keep
6
7
#include <cstddef>
8
#include <utility>
9
#include <vector>
10
11
#include "cmListFileCache.h"
12
13
/**
14
 * Graph edge representation.  Most use cases just need the
15
 * destination vertex, so we support conversion to/from an int.  We
16
 * also store boolean to indicate whether an edge is "strong".
17
 */
18
class cmGraphEdge
19
{
20
public:
21
  cmGraphEdge(size_t n, bool s, bool c, cmListFileBacktrace bt)
22
0
    : Dest(n)
23
0
    , Strong(s)
24
0
    , Cross(c)
25
0
    , Backtrace(std::move(bt))
26
0
  {
27
0
  }
28
0
  operator size_t() const { return this->Dest; }
29
30
0
  bool IsStrong() const { return this->Strong; }
31
32
0
  bool IsCross() const { return this->Cross; }
33
34
0
  cmListFileBacktrace const& GetBacktrace() const { return this->Backtrace; }
35
36
private:
37
  size_t Dest;
38
  bool Strong;
39
  bool Cross;
40
  cmListFileBacktrace Backtrace;
41
};
42
struct cmGraphEdgeList : public std::vector<cmGraphEdge>
43
{
44
};
45
struct cmGraphNodeList : public std::vector<size_t>
46
{
47
};
48
struct cmGraphAdjacencyList : public std::vector<cmGraphEdgeList>
49
{
50
};