PolyBoRi
TermsFacade.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 //*****************************************************************************
14 //*****************************************************************************
15 
16 #ifndef polybori_groebner_TermsFacade_h_
17 #define polybori_groebner_TermsFacade_h_
18 
19 // include basic definitions
20 #include "groebner_defs.h"
21 
23 
29 template <class NewType>
31  public MonomialSet {
32 
33  typedef MonomialSet base;
34 
35 public:
37  template <class Type>
38  TermsFacade(const Type& value): base(value) { }
39 
41  void update(const PolyEntry& entry) {
42  if (get().isCompatible(entry))
43  operator=(unite(entry.lead.set()));
44  }
45 
46 private:
47  TermsFacade& operator=(const TermsFacade& rhs) {
48  return static_cast<TermsFacade&>(static_cast<base&>(*this) = rhs);
49  }
50 
52  const NewType& get() const { return static_cast<const NewType&>(*this); }
53 };
54 
56 
57 #endif /* polybori_groebner_TermsFacade_h_ */