crashanalysercmd/PerfToolsSharedLibraries/Engine/SymbianUtils/SourceParser/Objects/SrcClass.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.Collections.Generic;
       
    19 using System.Text;
       
    20 
       
    21 namespace SymbianUtils.SourceParser.Objects
       
    22 {
       
    23     public class SrcClass
       
    24     {
       
    25         #region Enumerations
       
    26         public enum TType
       
    27         {
       
    28             ETypeGlobalFunctionClass = 0,
       
    29             ETypeProperClass
       
    30         }
       
    31         #endregion
       
    32 
       
    33         #region Constructors
       
    34         public SrcClass()
       
    35         {
       
    36         }
       
    37         #endregion
       
    38 
       
    39         #region Constants
       
    40         public const string KClassSeparator = "::";
       
    41         #endregion
       
    42 
       
    43         #region API
       
    44         public void AddMethod( SrcMethod aMethod )
       
    45         {
       
    46             aMethod.Class = this;
       
    47             iMethods.Add( aMethod );
       
    48         }
       
    49         #endregion
       
    50 
       
    51         #region Properties
       
    52         public TType Type
       
    53         {
       
    54             get
       
    55             {
       
    56                 TType ret = TType.ETypeGlobalFunctionClass;
       
    57                 //
       
    58                 if ( Name.Length != 0 )
       
    59                 {
       
    60                     ret = TType.ETypeProperClass;
       
    61                 }
       
    62                 //
       
    63                 return ret;
       
    64             }
       
    65         }
       
    66 
       
    67         public string Name
       
    68         {
       
    69             get { return iName; }
       
    70             set { iName = value; }
       
    71         }
       
    72 
       
    73         public List<SrcMethod> Methods
       
    74         {
       
    75             get { return iMethods; }
       
    76         }
       
    77         #endregion
       
    78 
       
    79         #region From System.Object
       
    80         public override string ToString()
       
    81         {
       
    82             StringBuilder ret = new StringBuilder();
       
    83             //
       
    84             ret.Append( Name );
       
    85             //
       
    86             return ret.ToString();
       
    87         }
       
    88         #endregion
       
    89 
       
    90         #region Data members
       
    91         private string iName = string.Empty;
       
    92         private List<SrcMethod> iMethods = new List<SrcMethod>();
       
    93         #endregion
       
    94     }
       
    95 }