Exemplo n.º 1
0
sp<AaptFile> StringPool::createStringBlock()
{
    sp<AaptFile> pool = new AaptFile(String8(), AaptGroupEntry(),
                                     String8());
    status_t err = writeStringBlock(pool);
    return err == NO_ERROR ? pool : NULL;
}
Exemplo n.º 2
0
  void MatrixArchive::saveStrings(std::ostream & fout, std::set<std::string> const & validNames) const
  {
    string_map_t::const_iterator it = m_strings.begin();
    for( ; it != m_strings.end(); it++)
    {
      if(validNames.empty() || validNames.count(it->first) > 0)
      {
        writeStringBlock(fout, it->first, it->second);

        SM_ASSERT_TRUE(MatrixArchiveException, fout.good(), "Error while writing string " << it->first << " to file.");
      }
    }
  }