svgtopt/SVG/SVGImpl/src/SVGIntCssValueImpl.cpp
changeset 0 d46562c3d99d
equal deleted inserted replaced
-1:000000000000 0:d46562c3d99d
       
     1 /*
       
     2 * Copyright (c) 2003 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:  SVG Implementation source file
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #if !defined(__E32DEBUG_H__)
       
    20 #include <e32debug.h>
       
    21 #endif
       
    22 
       
    23 #include "SVGIntCssValueImpl.h"
       
    24 
       
    25 
       
    26 // ---------------------------------------------------------------------------
       
    27 //
       
    28 // ---------------------------------------------------------------------------
       
    29 CIntCssValueImpl::~CIntCssValueImpl()
       
    30     {
       
    31     }
       
    32 
       
    33 // ---------------------------------------------------------------------------
       
    34 //
       
    35 // ---------------------------------------------------------------------------
       
    36 TInt CIntCssValueImpl::SetValueL( const TDesC& aValue )
       
    37     {
       
    38 
       
    39     TInt32 tInt;
       
    40     TLex tLex( aValue );
       
    41     if ( tLex.Val( tInt ) == KErrNone )
       
    42         {
       
    43         iValue = tInt;
       
    44         }
       
    45     return KErrNone;
       
    46     }
       
    47 
       
    48 // ---------------------------------------------------------------------------
       
    49 //
       
    50 // ---------------------------------------------------------------------------
       
    51 TInt CIntCssValueImpl::SetValueL( const TInt& aValue )
       
    52     {
       
    53     iValue = aValue;
       
    54     return KErrNone;
       
    55     }
       
    56 
       
    57 // ---------------------------------------------------------------------------
       
    58 //
       
    59 // ---------------------------------------------------------------------------
       
    60 TInt CIntCssValueImpl::Value()
       
    61     {
       
    62     return iValue;
       
    63     }
       
    64 
       
    65 // *******************************************************
       
    66 // Private
       
    67 
       
    68 // ---------------------------------------------------------------------------
       
    69 //
       
    70 // ---------------------------------------------------------------------------
       
    71 CIntCssValueImpl::CIntCssValueImpl(  )
       
    72     {
       
    73     }
       
    74 
       
    75 // ---------------------------------------------------------------------------
       
    76 //
       
    77 // ---------------------------------------------------------------------------
       
    78 TBool CIntCssValueImpl::IsEqual( CCssValue* aValue )
       
    79 {
       
    80 	if (((CIntCssValueImpl*)aValue)->iValue == iValue)
       
    81 	{
       
    82 		return ETrue;
       
    83 	}
       
    84 
       
    85 	return EFalse;
       
    86 }
       
    87 
       
    88 // ---------------------------------------------------------------------------
       
    89 //
       
    90 // ---------------------------------------------------------------------------
       
    91 void CIntCssValueImpl::Print( )
       
    92 {
       
    93 #ifdef _DEBUG
       
    94 	RDebug::Printf("%d", iValue);
       
    95 #endif
       
    96 }