secureswitools/swisistools/source/rscparser/apmstd.cpp
branchRCL_3
changeset 26 8b7f4e561641
parent 25 7333d7932ef7
child 27 e8965914fac7
equal deleted inserted replaced
25:7333d7932ef7 26:8b7f4e561641
     1 // Copyright (c) 2009 - 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 /** 
       
    16 * @file APMSTD.cpp
       
    17 *
       
    18 * @internalComponent
       
    19 * @released
       
    20 */
       
    21 #include "apmstd.h"
       
    22 #include "barsc2.h"
       
    23 #include "parse.h"
       
    24 
       
    25 //
       
    26 // class TDataType
       
    27 //
       
    28 
       
    29 TDataType::TDataType()
       
    30 	:iDataType(),
       
    31 	iUid(NullUid)
       
    32 /** Default constructor.
       
    33 
       
    34 Sets an empty data type string and sets the associated UID to NullUid. */
       
    35 	{}
       
    36 
       
    37 
       
    38 TDataType::~TDataType()
       
    39 /** Default destructor.
       
    40 
       
    41 Sets an empty data type string and sets the associated UID to NullUid. */
       
    42 {
       
    43 	delete iDataType;
       
    44 }
       
    45 
       
    46 TDataType::TDataType(const PtrC8* aDataType)
       
    47 	:iUid(NullUid)
       
    48 /** Copy constructor.
       
    49 
       
    50 @param aDataType The data type to be copied. */
       
    51 {
       
    52 	iDataType = new Ptr8(aDataType->iMaxLength);
       
    53 	if(NULL==iDataType)
       
    54 	{
       
    55 		std::string errMsg= "Failed : Error in Reading File. Memory Allocation Failed";
       
    56 		throw CResourceFileException(errMsg);
       
    57 	}
       
    58 	iDataType->UpdateLength(aDataType->iMaxLength);
       
    59 	BufCpy8(iDataType->GetPtr(), aDataType->iPtr, aDataType->iMaxLength);
       
    60 }
       
    61 
       
    62 
       
    63 Ptr8* TDataType::GetDataType()
       
    64 {
       
    65 	return iDataType;
       
    66 }
       
    67 
       
    68 
       
    69 //
       
    70 // class TDataTypeWithPriority
       
    71 //
       
    72 
       
    73 /** Default constructor */
       
    74 TDataTypeWithPriority::TDataTypeWithPriority()
       
    75 {
       
    76 }
       
    77 
       
    78 /** Constructor taking a data type and a priority value.
       
    79 
       
    80 @param aDataType The data type.
       
    81 @param aPriority The priority value. */
       
    82 TDataTypeWithPriority::TDataTypeWithPriority(const TDataType& aDataType, TDataTypePriority aPriority)
       
    83 	: iDataType(aDataType),
       
    84 	iPriority(aPriority)
       
    85 	{}