carl  24.04
Computer ARithmetic Library
ReasonsAdaptor.h
Go to the documentation of this file.
1 /**
2  * @file: ReasonsAdaptor.h
3  * @author: Sebastian Junges
4  *
5  * @since September 25, 2013
6  */
7 
8 #pragma once
10 
11 namespace carl
12 {
13 struct NoReasons
14 {
15  static constexpr bool has_reasons = false;
16  void setReason(unsigned index);
17  BitVector getReasons() const { return BitVector(0); }
18  void setReasons(const BitVector&) const {}
19 };
20 
21 struct BVReasons
22 {
23  static constexpr bool has_reasons = true;
24 
25  void setReason(unsigned index);
26  void extendReasons(const BitVector& extendWith)
27  {
28  mReasonset |= extendWith;
29  }
31  {
32  return mReasonset;
33  }
34 
35  void setReasons(const BitVector& reasons)
36  {
37  mReasonset = reasons;
38  }
39 private:
41 };
42 }
carl is the main namespace for the library.
static constexpr bool has_reasons
BitVector getReasons() const
void setReasons(const BitVector &) const
void setReason(unsigned index)
BitVector mReasonset
void setReason(unsigned index)
static constexpr bool has_reasons
void setReasons(const BitVector &reasons)
BitVector getReasons() const
void extendReasons(const BitVector &extendWith)