javaextensions/pim/framework/inc.s60/cpimintvalue.h
branchRCL_3
changeset 19 04becd199f91
equal deleted inserted replaced
16:f5050f1da672 19:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 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:  Specialized integer value class
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPIMINTVALUE_H
       
    20 #define CPIMINTVALUE_H
       
    21 
       
    22 // INTERNAL INCLUDES
       
    23 #include "cpimvaluebase.h"
       
    24 
       
    25 // EXTERNAL INCLUDES
       
    26 #include <e32std.h>
       
    27 
       
    28 /**
       
    29  * Specialized integer value class
       
    30  * @since S60 v3.1
       
    31  */
       
    32 NONSHARABLE_CLASS(CPIMIntValue) : public CPIMValueBase
       
    33 {
       
    34 public:
       
    35 
       
    36     /**
       
    37      * Two-phased constructor.
       
    38      *
       
    39      * @return New instance of this class.
       
    40      */
       
    41     static CPIMIntValue* NewL(TPIMAttribute aAttributes,
       
    42     TInt aIntegerValue);
       
    43 
       
    44     /**
       
    45      * Two-phased constructor.
       
    46      *
       
    47      * @return New instance of this class. The instance
       
    48      *         is pushed to the cleanup stack
       
    49      */
       
    50     static CPIMIntValue* NewLC(TPIMAttribute aAttributes,
       
    51                                TInt aIntegerValue);
       
    52 
       
    53     /**
       
    54      * Destructor
       
    55      */
       
    56     virtual ~CPIMIntValue();
       
    57 
       
    58 public: // Functions from CPIMValue
       
    59 
       
    60     /**
       
    61      * SetValue
       
    62      * Sets new integer value for this field
       
    63      * value holder. The old value will be overwritten
       
    64      *
       
    65      * @param aIntegerValue New value
       
    66      */
       
    67     virtual void SetIntValue(TInt aIntegerValue);
       
    68 
       
    69     /**
       
    70      * Value
       
    71      * Returns the integer value of this integer
       
    72      * value holder. The value cannot be modified
       
    73      *
       
    74      * @return Integer value
       
    75      */
       
    76     virtual TInt IntValue() const;
       
    77 
       
    78 private:
       
    79 
       
    80     /**
       
    81      * Default C++ constructor
       
    82      */
       
    83     CPIMIntValue(TPIMAttribute aAttributes,
       
    84                  TInt aIntegerValue);
       
    85 
       
    86     /**
       
    87      * Second phase constructor
       
    88      */
       
    89     void ConstructL();
       
    90 
       
    91 private: // Data
       
    92 
       
    93     // Integer
       
    94     TInt iIntegerValue;
       
    95 };
       
    96 
       
    97 #endif // CPIMINTVALUE_H
       
    98 // End of file