crashanalysercmd/PerfToolsSharedLibraries/Engine/SymBuildParsingLib/Common/Objects/SymIncludeDefinition.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.IO;
       
    20 
       
    21 namespace SymBuildParsingLib.Common.Objects
       
    22 {
       
    23 	public class SymIncludeDefinition
       
    24 	{
       
    25 		#region Enumerations
       
    26 		public enum TType
       
    27 		{
       
    28 			ETypeUndefined = 0,
       
    29 			ETypeUser,
       
    30 			ETypeSystem
       
    31 		};
       
    32 		#endregion
       
    33 
       
    34 		#region Constructors & destructor
       
    35 		public SymIncludeDefinition()
       
    36 		{
       
    37 		}
       
    38 
       
    39 		public SymIncludeDefinition( string aLocation )
       
    40 		{
       
    41 			iLocation = aLocation;
       
    42 		}
       
    43 
       
    44 		public SymIncludeDefinition( TType aType )
       
    45 		{
       
    46 			iType = aType;
       
    47 		}
       
    48 
       
    49 		public SymIncludeDefinition( TType aType, string aLocation )
       
    50 		{
       
    51 			iType = aType;
       
    52 			iLocation = aLocation;
       
    53 		}
       
    54 		#endregion
       
    55 
       
    56 		#region API
       
    57 		public void AdjustRelativeInclude( string aBasePath )
       
    58 		{
       
    59 			bool isRooted = Path.IsPathRooted( Location );
       
    60 			//
       
    61 			if	( isRooted == false )
       
    62 			{
       
    63 				Location = Utils.SymFileSystemUtils.MergePaths( aBasePath, Location );
       
    64 			}
       
    65 		}
       
    66 		#endregion
       
    67 
       
    68 		#region Properties
       
    69 		public TType Type
       
    70 		{
       
    71 			get { return iType; }
       
    72 			set { iType = value; }
       
    73 		}
       
    74 
       
    75 		public string Location
       
    76 		{
       
    77 			get { return iLocation; }
       
    78 			set { iLocation = value; }
       
    79 		}
       
    80 		#endregion
       
    81 
       
    82 		#region Data members
       
    83 		private TType iType = TType.ETypeUndefined;
       
    84 		private string iLocation = String.Empty;
       
    85 		#endregion
       
    86 	}
       
    87 }