omads/omadsextensions/datamod/src/NSmlProperty.cpp
changeset 0 dab8a81a92de
child 14 b922b9936679
equal deleted inserted replaced
-1:000000000000 0:dab8a81a92de
       
     1 /*
       
     2 * Copyright (c) 2005 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:  Property class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDES
       
    21 #include "NSmlDataModBase.h"
       
    22 
       
    23 // ============================ MEMBER FUNCTIONS ===============================
       
    24 
       
    25 // -----------------------------------------------------------------------------
       
    26 // CNSmlProperty::NewL
       
    27 // Two-phased constructor.
       
    28 // -----------------------------------------------------------------------------
       
    29 //
       
    30 CNSmlProperty* CNSmlProperty::NewL( CParserPropertyValue& aPropertyValue, const TDesC8& aName, CArrayPtr<CParserParam>* aArrayOfParams )
       
    31 	{
       
    32 	CNSmlProperty* self = new ( ELeave ) CNSmlProperty( aPropertyValue, aArrayOfParams );
       
    33 	CleanupStack::PushL( self );
       
    34 	ConstructSelfL( *self, aName );
       
    35 	CleanupStack::Pop(); // self
       
    36 	return self;
       
    37 	}
       
    38 
       
    39 // -----------------------------------------------------------------------------
       
    40 // CNSmlProperty::Parameters
       
    41 // -----------------------------------------------------------------------------
       
    42 //
       
    43 CArrayPtr<CParserParam>* CNSmlProperty::Parameters() const
       
    44 	{
       
    45 	return iArrayOfParams;
       
    46 	}
       
    47 
       
    48 // -----------------------------------------------------------------------------
       
    49 // CNSmlProperty::ParamCount
       
    50 // -----------------------------------------------------------------------------
       
    51 //
       
    52 TInt CNSmlProperty::ParamCount() const
       
    53 	{
       
    54 	if ( iArrayOfParams )
       
    55 		{
       
    56 		return iArrayOfParams->Count();
       
    57 		}
       
    58 	return 0;
       
    59 	}
       
    60 	
       
    61 // -----------------------------------------------------------------------------
       
    62 // CNSmlProperty::Compare
       
    63 // -----------------------------------------------------------------------------
       
    64 //
       
    65 TInt CNSmlProperty::Compare( const CNSmlProperty& aFirst, const CNSmlProperty& aSecond )
       
    66 	{
       
    67 	return aFirst.Name().Compare( aSecond.Name() );
       
    68 	}
       
    69 	
       
    70 // -----------------------------------------------------------------------------
       
    71 // CNSmlProperty::CNSmlProperty
       
    72 // -----------------------------------------------------------------------------
       
    73 //
       
    74 CNSmlProperty::CNSmlProperty( CParserPropertyValue& aPropertyValue, CArrayPtr<CParserParam>* aArrayOfParams ) : CParserProperty(aPropertyValue, aArrayOfParams)
       
    75 	{
       
    76 	}
       
    77 	
       
    78 // End of file