AlignmentElement& AlignmentElement::operator=(const AlignmentElement& alignInfo) { insert_iterator<ContainerType> insertIter( m_collection, m_collection.end() ); copy(alignInfo.begin(), alignInfo.end(), insertIter); return *this; }
nsresult sbMockDevice::ProcessBatch(Batch & aBatch) { std::insert_iterator<std::vector<nsRefPtr<sbRequestItem> > > insertIter(mBatch, mBatch.end()); std::copy(aBatch.begin(), aBatch.end(), insertIter); /* don't process, let the js deal with it */ return NS_OK; }
nsresult sbRequestThreadQueue::ClearRequestsNoLock(Batch & aBatch) { NS_ENSURE_STATE(mLock); // Copy all the requests on the queue to aBatch std::insert_iterator<Batch> insertIter(aBatch, aBatch.end()); std::copy(mRequestQueue.begin(), mRequestQueue.end(), insertIter); // Release all of our objects std::for_each(mRequestQueue.begin(), mRequestQueue.end(), ReleaseRequestItem); // Now that we have copied the requests clear our request queue mRequestQueue.clear(); return NS_OK; }
AlignmentElement::AlignmentElement(const vector<AlignmentElementType> &alignInfo) { insert_iterator<ContainerType> insertIter( m_collection, m_collection.end() ); copy(alignInfo.begin(), alignInfo.end(), insertIter); };