diff -r 000000000000 -r 40261b775718 omxil/mmilapi/ilif/inc/tilstruct.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/omxil/mmilapi/ilif/inc/tilstruct.inl Tue Feb 02 01:56:55 2010 +0200 @@ -0,0 +1,99 @@ +// Copyright (c) 2008-2009 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: +// + +/** + @file + @internalTechnology + @prototype +*/ + +#ifndef TILSTRUCT_INL +#define TILSTRUCT_INL + +/** +Constructor +*/ +inline TILStruct::TILStruct() + : + iUid(KNullUid) + { + } + +/** +Obtain the UID identifying the structure. +@return The identifying UID of the structure. +*/ +inline const TUid& TILStruct::Uid() const + { + return iUid; + } + +/** +Constructor +@param aParameterStructure The structure to store +*/ +template +inline TILStructParam::TILStructParam(const T& aParameterStructure) + { + iUid = TUid::Uid(U); + iBuf = TPckgBuf(aParameterStructure); + } + +/** +Default Constructor +*/ +template +inline TILStructParam::TILStructParam() + { + iUid = TUid::Uid(U); + } + +/** +Operator to return the structure represented by the class. +@return The structure represented by the class. +*/ +template +inline TILStructParam::operator T&() + { + return iBuf(); + } + +/** +Static method to return the structure represented by TILStruct. +@param A const reference to the base structure. +@return A const pointer to the structure represented by the class. +*/ +template +inline const T* TILStructParam::GetStructure(const TILStruct& aConfig) + { + const T* ptr = &((static_cast& >(aConfig)).iBuf()); + return ptr; + } + +/** +Static method to return the structure represented by TILStruct. +@param A reference to the base structure. +@return A pointer to the structure represented by the class. +*/ +template +inline T* TILStructParam::GetStructure(TILStruct& aConfig) + { + T* ptr = &((static_cast& >(aConfig)).iBuf()); + return ptr; + } + + + +#endif // TILSTRUCT_INL