crashanalysercmd/Libraries/Engine/CrashItemLib/Crash/Traces/CITrace.cs
changeset 0 818e61de6cd1
equal deleted inserted replaced
-1:000000000000 0:818e61de6cd1
       
     1 /*
       
     2 * Copyright (c) 2009 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 using System;
       
    18 using System.Text;
       
    19 using System.Collections.Generic;
       
    20 using SymbianStructuresLib.Debug.Trace;
       
    21 using CrashItemLib.Crash;
       
    22 using CrashItemLib.Crash.Base;
       
    23 using CrashItemLib.Crash.Base.DataBinding;
       
    24 using CrashItemLib.Crash.Utils;
       
    25 using CrashItemLib.Crash.Container;
       
    26 
       
    27 namespace CrashItemLib.Crash.Traces
       
    28 {
       
    29 	public class CITrace : CIElement
       
    30     {
       
    31         #region Constructors
       
    32         public CITrace( CIContainer aContainer, TraceLine aLine )
       
    33             : base( aContainer )
       
    34 		{
       
    35             iLine = aLine;
       
    36 		}
       
    37         #endregion
       
    38 
       
    39         #region API
       
    40         #endregion
       
    41 
       
    42         #region Properties
       
    43         public string Payload
       
    44         {
       
    45             get { return iLine.Payload; }
       
    46         }
       
    47         
       
    48         public string Prefix
       
    49         {
       
    50             get { return iLine.Prefix; }
       
    51         }
       
    52 
       
    53         public string Suffix
       
    54         {
       
    55             get { return iLine.Suffix; }
       
    56         }
       
    57 
       
    58         public TraceTimeStamp TimeStamp
       
    59         {
       
    60             get { return iLine.TimeStamp; }
       
    61         }
       
    62         #endregion
       
    63 
       
    64         #region Operators
       
    65         public static implicit operator CIDBRow( CITrace aTrace )
       
    66         {
       
    67             CIDBRow row = new CIDBRow();
       
    68 
       
    69             // To ensure that the trace and cells are correctly associated
       
    70             row.Element = aTrace;
       
    71             row.Add( new CIDBCell( aTrace.Prefix ) );
       
    72             row.Add( new CIDBCell( aTrace.Payload ) );
       
    73             row.Add( new CIDBCell( aTrace.Suffix ) );
       
    74             //
       
    75             return row;
       
    76         }
       
    77 
       
    78         public static implicit operator TraceLine( CITrace aTrace )
       
    79         {
       
    80             return aTrace.iLine;
       
    81         }
       
    82         #endregion
       
    83 
       
    84         #region From System.Object
       
    85         public override string ToString()
       
    86         {
       
    87             return iLine.ToString();
       
    88         }
       
    89         #endregion
       
    90 
       
    91         #region Data members
       
    92         private readonly TraceLine iLine;
       
    93         #endregion
       
    94     }
       
    95 }