21 #ifndef POSET_CRG_STATE_IMPL_H 22 #define POSET_CRG_STATE_IMPL_H 24 #ifndef SHEAF_DLL_SPEC_H 25 #include "SheafSystem/sheaf_dll_spec.h" 28 #ifndef POSET_CRG_STATE_H 29 #include "SheafSystem/poset_crg_state.h" 32 #ifndef ASSERT_CONTRACT_H 33 #include "SheafSystem/assert_contract.h" 36 #ifndef CRG_INTERVAL_H 37 #include "SheafSystem/crg_interval.h" 40 #ifndef INDEX_SPACE_ITERATOR_H 41 #include "SheafSystem/index_space_iterator.h" 51 template<
typename handle_type>
58 require(contains_member(xmbr_index));
59 require(cover_id_space_handle_conforms_to<handle_type>(xlower, xmbr_index));
63 pod_index_type lid_space_id = cover_id_space_id(xlower, xmbr_index);
64 handle_type& result = _id_spaces.get_id_space<handle_type>(lid_space_id);
68 ensure(result.is_attached());
75 template<
typename handle_type>
84 require(contains_member(xmbr_index));
88 pod_index_type lid_space_id = cover_id_space_id(xlower, xmbr_index);
89 bool result = _id_spaces.handle_conforms_to_state<handle_type>(lid_space_id);
102 template<
typename filter_type>
109 require(contains_member(xmbr_index));
119 set<pod_index_type> lmbrs_to_remove;
127 lmbrs_to_remove.insert(litr.
hub_pod());
132 release_cover_id_space_iterator(litr);
134 if(!lmbrs_to_remove.empty())
139 pod_index_type lspace_id = force_explicit_cover(xlower, xmbr_index,
true);
144 set<pod_index_type>::iterator lmbr_itr;
145 for(lmbr_itr = lmbrs_to_remove.begin();
146 lmbr_itr != lmbrs_to_remove.end();
161 !xfilter(i.hub_pod()),
162 release_cover_id_space_iterator(i));
169 #endif // ifndef POSET_CRG_STATE_IMPL_H index_space_handle & get_cover_id_space(bool xlower, pod_index_type xmbr_index) const
Allocates an handle for the lower (xlower true) or upper (xlower false) cover of member with index xm...
An abstract iterator over the ids of an id space.
void remove_cover_members(const filter_type &xfilter, bool xlower, pod_index_type xmbr_index)
Removes all members for which functor xfilter(xmbr.index().top_pod()) is true from the lower (xlower ...
virtual void release_id_space() const
Returns this id space handle to the handle pool.
virtual void next()=0
Makes id() the next id in the iteration.
bool is_done() const
True if iteration is finished.
virtual index_space_handle & get_id_space() const
Allocates an id space handle from the handle pool.
size_type remove_hub(pod_type xhub_id, bool update_extrema)
Removes the equivalence associated with hub id xhub_id. Returns the number of entries actually remove...
int_type pod_index_type
The plain old data index type.
void update_extrema()
Update the id extrema.
A handle for a scattered_insertion_index_space_state.
bool cover_id_space_handle_conforms_to(bool xlower, pod_index_type xmbr_index) const
True if a handle for the lower (xlower true) or upper (xlower false) cover id space of the member wit...
pod_type hub_pod() const
The current unglued hub id in the iteration. synonym for unglued_hub_pod().