1 // Copyright (c) 1997-2009 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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Mda\Common\Base.inl
15 // Inline functions for package classes defined in MdaBase.h
19 inline TPtr8& TMdaRawPackage::Package()
21 ((TMdaRawPackage*)this)->iThis.Set((TUint8*)this,iThis.Length(),iThis.MaxLength());
25 inline const TPtr8& TMdaRawPackage::Package() const
27 ((TMdaRawPackage*)this)->iThis.Set((TUint8*)this,iThis.Length(),iThis.MaxLength());
31 inline void TMdaRawPackage::SetSize(TInt aDerivedSize)
33 iThis.Set((TUint8*)this,aDerivedSize,aDerivedSize);
37 Gets the package type. This is set during construction of the derived class.
39 @return A UID that identifies the package type.
41 inline TUid TMdaPackage::Type() const
47 Gets the derived class's type. This is set during construction of the derived class.
49 @return A UID that identifies the type of the derived class.
51 inline TUid TMdaPackage::Uid() const
57 Equality operator. Tests whether the package specified has the same UID and type as this package.
60 The package to compare with this one.
62 @return True if the two packages are the same, false if not.
64 inline TBool TMdaPackage::operator==(const TMdaPackage& aPackage)
66 return ((aPackage.Type()==Type())&&(aPackage.Uid()==Uid()));
69 inline void TMdaPackage::SetUid(TUid aUid)
74 inline TMdaRawPackage::TMdaRawPackage(TInt aDerivedSize)
75 #pragma warning( disable : 4355 ) // 'this' : used in base member initializer list
76 : iThis((TUint8*)this,aDerivedSize,aDerivedSize)
77 #pragma warning( default : 4355 )
82 Protected constructor with two UIDs and the size of the derived class.
85 A UID that identifies the package's concrete class.
87 A UID that identifies the package type. This may be KNullUid if not required.
89 The size of the derived class.
91 inline TMdaPackage::TMdaPackage(TUid aType, TUid aUid, TInt aDerivedSize)
92 : TMdaRawPackage(aDerivedSize),iType(aType),iUid(aUid)