Ejemplo n.º 1
0
    ~FileManager()
    {
        M_Files::const_iterator itr = m_Files.begin();
        M_Files::const_iterator end = m_Files.end();
        for ( ; itr != end; ++itr )
        {
            fclose( itr->second );
        }

        m_Files.clear();
    }
Ejemplo n.º 2
0
 FILE* Find(const tstring& fileName)
 {
     M_Files::const_iterator found = m_Files.find(fileName.c_str());
     if (found != m_Files.end())
     {
         return found->second;
     }
     else
     {
         return NULL;
     }
 }
Ejemplo n.º 3
0
	~FileManager()
	{
		M_Files::const_iterator itr = m_Files.begin();
		M_Files::const_iterator end = m_Files.end();
		for ( ; itr != end; ++itr )
		{
			itr->second->Close();
			delete itr->second;
		}

		m_Files.clear();
	}
Ejemplo n.º 4
0
 void Close(const tstring& fileName)
 {
     M_Files::iterator found = m_Files.find( fileName );
     if (found != m_Files.end())
     {
         fclose( found->second );
         m_Files.erase( found );
     }
     else
     {
         HELIUM_BREAK();
     }
 }
Ejemplo n.º 5
0
 bool Opened(const tstring& fileName, FILE* handle)
 {
     return m_Files.insert( M_Files::value_type (fileName, handle) ).second;
 }
Ejemplo n.º 6
0
	bool Opened(const std::string& fileName, File* f)
	{
		return m_Files.insert( M_Files::value_type (fileName, f) ).second;
	}