7 #include <unordered_set>
28 template<
typename ITERATOR>
34 void add(boost::shared_ptr<TransferElement> element);
53 const std::map<TransferElementID, TransferElementAbstractor>&
getElements()
const {
return push_elements; }
56 bool isConsistent()
const {
return consistentElements.size() == push_elements.size(); }
60 std::unordered_set<TransferElementID> consistentElements;
62 std::unordered_set<TransferElementID> lasteSateOfConsistentElements;
68 std::map<TransferElementID, TransferElementAbstractor> push_elements;
76 template<
typename ITERATOR>
78 for(
auto it = first; it != last; ++it)
add(*it);
85 if(push_elements.find(transferElementID) == push_elements.end()) {
92 auto getVNFromElement = push_elements[transferElementID].getVersionNumber();
94 if(getVNFromElement < versionNumberToBeConsistentTo) {
97 if(versionNumberToBeConsistentTo != getVNFromElement) {
98 versionNumberToBeConsistentTo = getVNFromElement;
99 consistentElements.clear();
101 consistentElements.insert(transferElementID);
102 if(consistentElements.size() == push_elements.size()) {
103 lasteSateOfConsistentElements = consistentElements;