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

keyfile & keyfile::operator+= ( keyfile const &  rhs  ) 

Add a keyfile to the keyfile.

Parameters:
rhs the keyfile to add.
Returns:
the modified keyfile.

Definition at line 228 of file sbuild-keyfile.cc.

References groups, set_group(), and set_value().

{
  for (group_map_type::const_iterator gp = rhs.groups.begin();
       gp != rhs.groups.end();
       ++gp)
    {
      group_type const& group = gp->second;
      std::string const& groupname = std::tr1::get<0>(group);
      std::string const& comment = std::tr1::get<2>(group);
      set_group(groupname, comment);

      item_map_type const& items(std::tr1::get<1>(group));
      for (item_map_type::const_iterator it = items.begin();
         it != items.end();
         ++it)
      {
        item_type const& item = it->second;
        std::string const& key(std::tr1::get<0>(item));
        std::string const& value(std::tr1::get<1>(item));
        std::string const& comment(std::tr1::get<2>(item));
        set_value(groupname, key, value, comment);
      }
    }
  return *this;
}


Generated by  Doxygen 1.6.0   Back to index