Logo Search packages:      
Sourcecode: tagcoll version File versions  Download package

template<class ITEM, class TAG>
CardinalityStore< ITEM, TAG > CardinalityStore::getChildCollection ( const TAG &  tag  )  const [inline]

Return a tagged collection with all tagsets of this one that contain the tag `tag', but with the tag removed

Definition at line 387 of file CardinalityStore.cc.

References Tagcoll::Consumer< ITEM, TAG >::consume().

      CardinalityStore<ITEM, TAG> res;
      for (typename tagsets_t::const_iterator ts = tagsets.begin();
                  ts != tagsets.end(); ts++)
            if (ts->first.find(tag) == ts->first.end())
            // for all tagsets ts having tag

            // Insert the tagset, without tag
            OpSet<TAG> newts = ts->first;

            // Check if we make orphans, and preserve them
            if (newts.size() == 0 && ts->second.size() > 0)
                  res.consume(ts->second, newts);
      return res;

Generated by  Doxygen 1.6.0   Back to index