bool SplatCoverageLegend::getPredicatesForClass(const std::string& className, std::vector<const CoverageValuePredicate*>& output) const { output.clear(); for(Predicates::const_iterator i = _predicates.begin(); i != _predicates.end(); ++i) { if ( i->get()->_mappedClassName == className ) { output.push_back( i->get() ); } } return output.size() > 0; }
Config SplatCoverageLegend::getConfig() const { Config conf; conf.addIfSet("name", _name); conf.addIfSet("source", _source); Config preds; for(Predicates::const_iterator i = _predicates.begin(); i != _predicates.end(); ++i) { CoverageValuePredicate* p = i->get(); Config pred; pred.addIfSet( "name", p->_description ); pred.addIfSet( "value", p->_exactValue ); pred.addIfSet( "class", p->_mappedClassName ); preds.add(pred); } conf.add( "mappings", preds ); return conf; }