crashanalysercmd/PerfToolsSharedLibraries/Engine/SymbianSymbolLib/SourceManagement/Source/SymSourceManager.cs
changeset 0 818e61de6cd1
equal deleted inserted replaced
-1:000000000000 0:818e61de6cd1
       
     1 /*
       
     2 * Copyright (c) 2004-2008 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 using System;
       
    19 using System.Collections.Generic;
       
    20 using System.Text;
       
    21 using SymbianUtils;
       
    22 using SymbianStructuresLib.Debug.Symbols;
       
    23 using SymbianStructuresLib.CodeSegments;
       
    24 using SymbianSymbolLib.DbgEnginePlugin;
       
    25 
       
    26 namespace SymbianSymbolLib.SourceManagement.Source
       
    27 {
       
    28     internal class SymSourceManager : SymSourceCollection
       
    29     {
       
    30         #region Constructors
       
    31         public SymSourceManager( SymbolPlugin aPlugin )
       
    32         {
       
    33             iPlugin = aPlugin;
       
    34         }
       
    35         #endregion
       
    36 
       
    37         #region API
       
    38         public IEnumerable<SymbolCollection> GetFixedCollectionEnumerator()
       
    39         {
       
    40             foreach ( SymSource source in this )
       
    41             {
       
    42                 foreach ( SymbolCollection col in source )
       
    43                 {
       
    44                     if ( col.IsFixed )
       
    45                     {
       
    46                         yield return col;
       
    47                     }
       
    48                 }
       
    49             }
       
    50         }
       
    51         #endregion
       
    52 
       
    53         #region Properties
       
    54         public SymSourceAndCollection this[ CodeSegDefinition aCodeSeg ]
       
    55         {
       
    56             get
       
    57             {
       
    58                 SymSourceAndCollection ret = null;
       
    59                 //
       
    60                 foreach ( SymSource source in this )
       
    61                 {
       
    62                     SymbolCollection col = source[ aCodeSeg ];
       
    63                     if ( col != null )
       
    64                     {
       
    65                         ret = new SymSourceAndCollection( source, col );
       
    66                         break;
       
    67                     }
       
    68                 }
       
    69                 //
       
    70                 return ret;
       
    71             }
       
    72         }
       
    73         #endregion
       
    74 
       
    75         #region Data members
       
    76         private readonly SymbolPlugin iPlugin;
       
    77         #endregion
       
    78     }
       
    79 }