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

Line Exec Source
1
/*********************                                                        */
2
/*! \file tuple_project_op.h
3
 ** \verbatim
4
 ** Top contributors (to current version):
5
 **   Mudathir Mohamed
6
 ** This file is part of the CVC4 project.
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.\endverbatim
11
 **
12
 ** \brief a class for TupleProjectOp operator
13
 **/
14
15
#include "cvc4_public.h"
16
17
#ifndef CVC4__PROJECT_OP_H
18
#define CVC4__PROJECT_OP_H
19
20
#include <ostream>
21
#include <vector>
22
23
namespace CVC4 {
24
25
class TypeNode;
26
27
/**
28
 * The class is an operator for kind project used to project elements in a tuple
29
 * It stores the indices of projected elements
30
 */
31
68
class TupleProjectOp
32
{
33
 public:
34
  explicit TupleProjectOp(std::vector<uint32_t> indices);
35
48
  TupleProjectOp(const TupleProjectOp& op) = default;
36
37
  /** return the indices of the projection */
38
  const std::vector<uint32_t>& getIndices() const;
39
40
  bool operator==(const TupleProjectOp& op) const;
41
42
 private:
43
  std::vector<uint32_t> d_indices;
44
}; /* class TupleProjectOp */
45
46
std::ostream& operator<<(std::ostream& out, const TupleProjectOp& op);
47
48
/**
49
 * Hash function for the TupleProjectOpHashFunction objects.
50
 */
51
struct TupleProjectOpHashFunction
52
{
53
  size_t operator()(const TupleProjectOp& op) const;
54
}; /* struct TupleProjectOpHashFunction */
55
56
}  // namespace CVC4
57
58
#endif /* CVC4__PROJECT_OP_H */