示例#1
0
    virtual ~CellList()
    {
      for (IntCells::iterator it = intCells.begin(); it!=intCells.end(); ++it)
        delete it->second;

      for (ExtCells::iterator it = extCells.begin(); it!=extCells.end(); ++it)
          delete it->second;
    }
示例#2
0
    const ESM::Cell *searchExt (int x, int y) const
    {
        ExtCells::const_iterator it = extCells.find (std::make_pair (x, y));

        if (it==extCells.end())
            return 0;

        return it->second;
    }
示例#3
0
    const ESM::Cell *searchExtByRegion (const std::string& id) const
    {
        std::string id2 = toLower (id);

        for (ExtCells::const_iterator iter = extCells.begin(); iter!=extCells.end(); ++iter)
            if (toLower (iter->second->region)==id)
                return iter->second;

        return 0;
    }
示例#4
0
    const ESM::Cell *searchExtByName (const std::string& id) const
    {
        for (ExtCells::const_iterator iter = extCells.begin(); iter!=extCells.end(); ++iter)
        {
            if (toLower (iter->second->name) == toLower (id))
                return iter->second;
        }

        return 0;
    }
示例#5
0
文件: reclists.hpp 项目: am0s/openmw
    const Cell *searchExtByName (const std::string& id) const
    {
        for (ExtCells::const_iterator iter = extCells.begin(); iter!=extCells.end(); ++iter)
        {
            const ExtCellsCol& column = iter->second;
            for (ExtCellsCol::const_iterator iter = column.begin(); iter!=column.end(); ++iter)
            {
                if (iter->second->name==id)
                    return iter->second;
            }
        }

        return 0;
    }
示例#6
0
文件: reclists.hpp 项目: am0s/openmw
    const Cell *searchExt (int x, int y) const
    {
        ExtCells::const_iterator it = extCells.find (x);

        if (it==extCells.end())
            return 0;

        ExtCellsCol::const_iterator it2 = it->second.find (y);

        if (it2 == it->second.end())
            return 0;

        return it2->second;
    }
示例#7
0
文件: reclists.hpp 项目: am0s/openmw
    ~CellList()
    {
      for (IntCells::iterator it = intCells.begin(); it!=intCells.end(); ++it)
        delete it->second;

      for (ExtCells::iterator it = extCells.begin(); it!=extCells.end(); ++it)
      {
        ExtCellsCol& col = it->second;
        for (ExtCellsCol::iterator it = col.begin(); it!=col.end(); ++it)
        {
          delete it->second;
        }
      }
    }
示例#8
0
文件: reclists.hpp 项目: am0s/openmw
    const Cell *searchExtByRegion (const std::string& id) const
    {
        std::string id2 = toLower (id);

        for (ExtCells::const_iterator iter = extCells.begin(); iter!=extCells.end(); ++iter)
        {
            const ExtCellsCol& column = iter->second;
            for (ExtCellsCol::const_iterator iter = column.begin(); iter!=column.end(); ++iter)
            {
                if (toLower (iter->second->region)==id)
                    return iter->second;
            }
        }

        return 0;
    }