public void Register_Header_File( EProjectID project_id, CHeaderFileRecord header_record ) { EHeaderFileID header_id = EHeaderFileID.Invalid; if ( m_HeaderFileIDMap.TryGetValue( header_record.FileNameWithPath, out header_id ) ) { CHeaderFile header_file = null; if ( !m_HeaderFiles.TryGetValue( header_id, out header_file ) ) { throw new Exception( "Internal header file mapping error" ); } header_file.Initialize_Existing( project_id, header_record ); } else { header_id = Allocate_Header_File_ID(); CHeaderFile header_file = new CHeaderFile( header_id, project_id, header_record ); m_HeaderFileIDMap.Add( header_file.FileNameWithPath, header_id ); m_HeaderFiles.Add( header_id, header_file ); } }
// Methods // Public Interface public void Initialize_DB_Header_Files() { foreach ( var header_file_record in CEnumXMLDatabase.Instance.HeaderFiles ) { EHeaderFileID id = Allocate_Header_File_ID(); CHeaderFile header_file = new CHeaderFile( id, header_file_record ); m_HeaderFileIDMap.Add( header_file.FileNameWithPath, id ); m_HeaderFiles.Add( id, header_file ); } }