GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/datatypes/tuple_project_op.h Lines: 2 2 100.0 %
Date: 2021-09-16 Branches: 0 0 0.0 %

Line Exec Source
1
/******************************************************************************
2
 * Top contributors (to current version):
3
 *   Mudathir Mohamed, Mathias Preiner
4
 *
5
 * This file is part of the cvc5 project.
6
 *
7
 * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
8
 * in the top-level source directory and their institutional affiliations.
9
 * All rights reserved.  See the file COPYING in the top-level source
10
 * directory for licensing information.
11
 * ****************************************************************************
12
 *
13
 * A class for TupleProjectOp operator.
14
 */
15
16
#include "cvc5_public.h"
17
18
#ifndef CVC5__PROJECT_OP_H
19
#define CVC5__PROJECT_OP_H
20
21
#include <ostream>
22
#include <vector>
23
24
namespace cvc5 {
25
26
class TypeNode;
27
28
/**
29
 * The class is an operator for kind project used to project elements in a tuple
30
 * It stores the indices of projected elements
31
 */
32
76
class TupleProjectOp
33
{
34
 public:
35
  explicit TupleProjectOp(std::vector<uint32_t> indices);
36
54
  TupleProjectOp(const TupleProjectOp& op) = default;
37
38
  /** return the indices of the projection */
39
  const std::vector<uint32_t>& getIndices() const;
40
41
  bool operator==(const TupleProjectOp& op) const;
42
43
 private:
44
  std::vector<uint32_t> d_indices;
45
}; /* class TupleProjectOp */
46
47
std::ostream& operator<<(std::ostream& out, const TupleProjectOp& op);
48
49
/**
50
 * Hash function for the TupleProjectOpHashFunction objects.
51
 */
52
struct TupleProjectOpHashFunction
53
{
54
  size_t operator()(const TupleProjectOp& op) const;
55
}; /* struct TupleProjectOpHashFunction */
56
57
}  // namespace cvc5
58
59
#endif /* CVC5__PROJECT_OP_H */