19template<
typename Entry>
40template<
typename Actual,
bool C,
typename Entry>
48 using reference = std::conditional_t<IsConst, const value_type&, value_type&>;
49 using pointer = std::conditional_t<IsConst, const value_type*, value_type*>;
52 return actual().operator==(other);
55 return actual().operator!=(other);
66template<
template<
bool>
typename Actual,
bool C,
typename Entry>
75template<
typename Actual,
template<
bool>
typename ChildIt>
97 this->
actual() = as<Actual>(std::move(other));
120template<
typename Actual,
template<
bool>
typename It,
typename Entry>
122 typename PhysicalPlanTableEntry<Entry, Entry::template child_iterator_type>;
123 typename detail::the_condition_entry_templated_iterator<It, false, Entry>;
124 typename detail::the_condition_entry_templated_iterator<It, true, Entry>;
138 : Actual::Actual(as<Actual>(
std::move(other)))
142 this->
actual() = as<Actual>(std::move(other));
149 return actual().insert(std::move(condition), std::move(entry));
162template<
typename Actual,
typename Condition2EntryMap>
164 typename Condition2PPTEntryMap<
165 Condition2EntryMap, Condition2EntryMap::template iterator_type,
typename Condition2EntryMap::entry_type
179 this->
actual() = as<Actual>(std::move(other));
189 return actual().operator[](idx);
Interface for a mapping between ConditionSets and physical plan table entries of type.
Condition2PPTEntryMap(Condition2PPTEntryMap &&other)
iterator_type< false > iterator
const_iterator cend() const
Condition2PPTEntryMap & operator=(Condition2PPTEntryMap other)
iterator_type< true > const_iterator
const_iterator end() const
void insert(ConditionSet &&condition, entry_type &&entry)
const_iterator cbegin() const
const_iterator begin() const
Condition2PPTEntryMap()=default
Condition2PPTEntryMap(const Condition2PPTEntryMap &)=delete
Interface for a single physical plan table entry.
range< const_child_iterator > children() const
const_child_iterator cbegin_children() const
unsharable_shared_ptr< MatchBase > extract_match()
Extracts the found match by moving it out of this.
PhysicalPlanTableEntry()=default
unsharable_shared_ptr< MatchBase > share_match() const
Shares the found match.
const MatchBase & match() const
PhysicalPlanTableEntry(PhysicalPlanTableEntry &&other)
child_iterator_type< true > const_child_iterator
PhysicalPlanTableEntry(const PhysicalPlanTableEntry &)=delete
PhysicalPlanTableEntry & operator=(PhysicalPlanTableEntry other)
const_child_iterator end_children() const
const_child_iterator begin_children() const
PhysicalPlanTableEntry(std::unique_ptr< MatchBase > &&match, const std::vector< It > &children, cost_type cost)
const_child_iterator cend_children() const
ChildIt< C > child_iterator_type
Interface for an entire physical plan table containing a ConditionSet-entry-mapping.
condition2entry_map_type & operator[](size_type idx)
void resize(size_type size)
condition2entry_map_type & back()
PhysicalPlanTable()=default
Condition2EntryMap condition2entry_map_type
const condition2entry_map_type & back() const
PhysicalPlanTable(PhysicalPlanTable &&other)
PhysicalPlanTable(const PhysicalPlanTable &)=delete
PhysicalPlanTable & operator=(PhysicalPlanTable other)
const condition2entry_map_type & operator[](size_type idx) const
A helper class to define CRTP class hierarchies with an additional boolean template template paramete...
A helper class to define CRTP class hierarchies with an additional boolean template parameter (this i...
A helper class to define CRTP class hierarchies.
Helper struct to unite ConditionSets and entries of type.
condition_entry_t(condition_entry_t &&)=default
condition_entry_t()=delete
condition_entry_t(ConditionSet &&condition, Entry &&entry)
condition_entry_t & operator=(condition_entry_t &&)=delete
Iterator interface to iterate over pairs of ConditionSet and.
bool operator!=(const the_condition_entry_iterator &other) const
static constexpr bool IsConst
std::conditional_t< IsConst, const value_type &, value_type & > reference
the_condition_entry_iterator operator++(int)
reference operator*() const
pointer operator->() const
the_condition_entry_iterator & operator++()
bool operator==(const the_condition_entry_iterator &other) const
Helper struct for templated iterators.
This class extends std::shared_ptr to allow for unsharing an exclusively held object and thereby conv...