metadataengine/server/inc/mdspropertydef.inl
changeset 0 c53acadfccc6
equal deleted inserted replaced
-1:000000000000 0:c53acadfccc6
       
     1 /*
       
     2 * Copyright (c) 2009 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:  Class to hold description about one property
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 inline TBool CMdsPropertyDef::CheckMinMaxValue( TInt32 aValue ) const
       
    20 	{
       
    21 	return ( aValue >= iMinValue.iInt32 && aValue <= iMaxValue.iInt32 );
       
    22 	}
       
    23 
       
    24 inline TBool CMdsPropertyDef::CheckMinMaxValue( TUint32 aValue ) const
       
    25 	{
       
    26 	return ( aValue >= iMinValue.iUint32 && aValue <= iMaxValue.iUint32 );
       
    27 	}
       
    28 
       
    29 inline TBool CMdsPropertyDef::CheckMinMaxValue( const TInt64& aValue ) const
       
    30 	{
       
    31 	return ( aValue >= iMinValue.iInt64 && aValue <= iMaxValue.iInt64 );
       
    32 	}
       
    33 
       
    34 inline TBool CMdsPropertyDef::CheckMinMaxValue( const TReal& aValue ) const
       
    35 	{
       
    36 	return ( aValue >= iMinValue.iReal && aValue <= iMaxValue.iReal );
       
    37 	}
       
    38 
       
    39 /**
       
    40  * Get property type
       
    41  * @return property type
       
    42  */
       
    43 inline TPropertyType CMdsPropertyDef::GetType() const
       
    44 	{
       
    45 	return iType;
       
    46 	}
       
    47 	
       
    48 /**
       
    49  * Get property read-only
       
    50  * @return property read-only
       
    51  */
       
    52 inline TBool CMdsPropertyDef::GetReadOnly() const
       
    53 	{
       
    54 	return iPropertyFlags & EPropertyReadOnly;
       
    55 	}
       
    56 
       
    57 /**
       
    58  * Get property mandatory
       
    59  * @return is property mandatory
       
    60  */
       
    61 inline TBool CMdsPropertyDef::GetMandatory() const
       
    62 	{
       
    63 	return iPropertyFlags & EPropertyMandatory;
       
    64 	}
       
    65 
       
    66 /**
       
    67  * Get property indexed flag
       
    68  * @return is property indexed
       
    69  */
       
    70 inline TBool CMdsPropertyDef::GetIndexed() const
       
    71 	{
       
    72 	return iIndexed;
       
    73 	}
       
    74 
       
    75 inline TBool CMdsPropertyDef::operator!=( const CMdsPropertyDef& aPropertyDef ) const
       
    76 	{
       
    77 	return !( *this == aPropertyDef );
       
    78 	}