// DataSetList::GetSetsOfType() DataSetList DataSetList::GetSetsOfType( std::string const& dsargIn, DataSet::DataType typeIn ) const { DataSetList dsetOut; dsetOut.hasCopies_ = true; DataSetList selected = SelectSets(dsargIn); for (const_iterator ds = selected.begin(); ds != selected.end(); ++ds) if ( (*ds)->Type() == typeIn ) dsetOut.Push_Back( *ds ); return dsetOut; }
/** \return a list of all DataSets matching given argument and group. */ DataSetList DataSetList::SelectGroupSets( std::string const& dsargIn, DataSet::DataGroup groupIn ) const { DataSetList dsetOut; dsetOut.hasCopies_ = true; MetaData::SearchString search(dsargIn); for (DataListType::const_iterator ds = DataList_.begin(); ds != DataList_.end(); ++ds) if ((*ds)->Group() == groupIn && (*ds)->Matches_WC( search, DataSet::UNKNOWN_DATA )) dsetOut.Push_Back( *ds ); return dsetOut; }
/** \return a list of all DataSets matching the given argument. */ DataSetList DataSetList::SelectSets( std::string const& dsargIn, DataSet::DataType typeIn ) const { DataSetList dsetOut; dsetOut.hasCopies_ = true; // Find matching sets. MetaData::SearchString search(dsargIn); for (DataListType::const_iterator ds = DataList_.begin(); ds != DataList_.end(); ++ds) if ((*ds)->Matches_WC( search, typeIn )) dsetOut.Push_Back( *ds ); return dsetOut; }