mmuifw_plat/mul_datamodel_api/inc/mul/mulvarianttype.h
branchRCL_3
changeset 26 0e9bb658ef58
parent 0 e83bab7cf002
equal deleted inserted replaced
25:4ea6f81c838a 26:0e9bb658ef58
       
     1 /*
       
     2 * Copyright (c) 2007-2008 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:  MulVarianttype implementation
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef MULVARIANTTYPE_H
       
    19 #define MULVARIANTTYPE_H
       
    20 
       
    21 #include <mul/imulvarianttype.h>
       
    22 #include <alf/alfvarianttype.h>
       
    23 
       
    24 #include <osn/osndefines.h>
       
    25        
       
    26 namespace Alf
       
    27     {       
       
    28 // Forward Declarations
       
    29 
       
    30 /*! @class MulVariantType
       
    31  *  @brief To create data for data model
       
    32  */  
       
    33 class MulVariantType : public IMulVariantType
       
    34     {
       
    35 public: //Constructor and Destructor
       
    36 
       
    37     /**
       
    38      * The default constructor.
       
    39      */
       
    40     OSN_IMPORT MulVariantType();
       
    41     
       
    42     /**
       
    43      * Constructor for Descriptor
       
    44      * 
       
    45      * @param aDes Descriptor
       
    46      * @return new Object
       
    47      */
       
    48     OSN_IMPORT MulVariantType( const TDesC& aDes );
       
    49             
       
    50     /**
       
    51      * Constructor for variant data type creation for a integer type of data
       
    52      * @param aValue - integer to be assigned for the variant data
       
    53      * @return New object.
       
    54      */
       
    55     OSN_IMPORT MulVariantType(const int& aValue);
       
    56     
       
    57     /**
       
    58      * Constructor for variant data type creation for a Unsigned integer type of data
       
    59      * @param aValue - unsigned integer to be assigned for the variant data
       
    60      * @return New object.
       
    61      */
       
    62     OSN_IMPORT MulVariantType(const uint& aValue);
       
    63         
       
    64     /**
       
    65      * Constructor for variant data type creation for a real type of data
       
    66      * @param aValue - Real value to be assigned for the variant data
       
    67      * @return New object.
       
    68      */
       
    69     OSN_IMPORT MulVariantType(const double& aValue);
       
    70         
       
    71     /**
       
    72      * Constructor for variant data type creation for a bool type of data
       
    73      * @param aValue - Boolean value to be assigned for the variant data
       
    74      * @return New object.
       
    75      */
       
    76     OSN_IMPORT MulVariantType(const bool& aValue);
       
    77     
       
    78     /**
       
    79      * Constructor for variant data type creation for a Alf Variant type of data
       
    80      * @param aData -the variant data
       
    81      * @return New object.
       
    82      */
       
    83     OSN_IMPORT MulVariantType( IAlfMap& aData ); 
       
    84     
       
    85     /**
       
    86      * Destructor
       
    87      */
       
    88     OSN_IMPORT ~MulVariantType();
       
    89     
       
    90 public: // From IMulVariantType
       
    91     
       
    92     OSN_IMPORT std::auto_ptr< IMulVariantType > Clone();
       
    93        
       
    94     OSN_IMPORT const TDesC& DesC() const;
       
    95        
       
    96     OSN_IMPORT TMulType Type() const;
       
    97        
       
    98     OSN_IMPORT bool boolean() const ;
       
    99 
       
   100     OSN_IMPORT int integer() const ;
       
   101 
       
   102     OSN_IMPORT uint uinteger() const ;
       
   103 
       
   104     OSN_IMPORT double real() const ;
       
   105 
       
   106     OSN_IMPORT IAlfMap& Map() const ;
       
   107     
       
   108 private:
       
   109     
       
   110     void Construct( TMulType aType );
       
   111         
       
   112 private:
       
   113     
       
   114     class MulVariantTypeImpl;
       
   115     
       
   116 private:
       
   117 
       
   118     std::auto_ptr<MulVariantTypeImpl> mVarData;
       
   119     
       
   120     };
       
   121     
       
   122     } // namespace Alf  
       
   123 
       
   124 #endif //I_MULVARIANTTYPE_H
       
   125 
       
   126 //End of file