Example #1
0
metawriter_ptr Map::find_metawriter(std::string const& name) const
{
    std::map<std::string, metawriter_ptr>::const_iterator itr = metawriters_.find(name);
    if (itr != metawriters_.end())
        return itr->second;
    else
        return metawriter_ptr();
}
Example #2
0
void symbolizer_base::cache_metawriters(Map const &m)
{
    if (writer_name_.empty()) {
        properties_complete_.clear();
        writer_ptr_ = metawriter_ptr();
        return; // No metawriter
    }

    writer_ptr_ = m.find_metawriter(writer_name_);
    if (writer_ptr_) {
        properties_complete_ = writer_ptr_->get_default_properties();
        properties_complete_.insert(properties_.begin(), properties_.end());
    } else {
        properties_complete_.clear();
        std::cerr << "WARNING: Metawriter '" << writer_name_ << "' used but not defined.\n";
    }
}