omads/omadsextensions/datamod/src/NSmlProperty.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 12 Mar 2010 15:41:30 +0200
branchRCL_3
changeset 14 b922b9936679
parent 0 dab8a81a92de
permissions -rw-r--r--
Revision: 201007 Kit: 201008

/*
* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  Property class
*
*/



// INCLUDES
#include <NSmlDataModBase.h>

// ============================ MEMBER FUNCTIONS ===============================

// -----------------------------------------------------------------------------
// CNSmlProperty::NewL
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
CNSmlProperty* CNSmlProperty::NewL( CParserPropertyValue& aPropertyValue, const TDesC8& aName, CArrayPtr<CParserParam>* aArrayOfParams )
	{
	CNSmlProperty* self = new ( ELeave ) CNSmlProperty( aPropertyValue, aArrayOfParams );
	CleanupStack::PushL( self );
	ConstructSelfL( *self, aName );
	CleanupStack::Pop(); // self
	return self;
	}

// -----------------------------------------------------------------------------
// CNSmlProperty::Parameters
// -----------------------------------------------------------------------------
//
CArrayPtr<CParserParam>* CNSmlProperty::Parameters() const
	{
	return iArrayOfParams;
	}

// -----------------------------------------------------------------------------
// CNSmlProperty::ParamCount
// -----------------------------------------------------------------------------
//
TInt CNSmlProperty::ParamCount() const
	{
	if ( iArrayOfParams )
		{
		return iArrayOfParams->Count();
		}
	return 0;
	}
	
// -----------------------------------------------------------------------------
// CNSmlProperty::Compare
// -----------------------------------------------------------------------------
//
TInt CNSmlProperty::Compare( const CNSmlProperty& aFirst, const CNSmlProperty& aSecond )
	{
	return aFirst.Name().Compare( aSecond.Name() );
	}
	
// -----------------------------------------------------------------------------
// CNSmlProperty::CNSmlProperty
// -----------------------------------------------------------------------------
//
CNSmlProperty::CNSmlProperty( CParserPropertyValue& aPropertyValue, CArrayPtr<CParserParam>* aArrayOfParams ) : CParserProperty(aPropertyValue, aArrayOfParams)
	{
	}
	
// End of file