javaextensions/pim/framework/src.s60/cpimbooleanvalue.cpp
changeset 21 2a9601315dfc
equal deleted inserted replaced
18:e8e63152f320 21:2a9601315dfc
       
     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 boolean value class
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 // CLASS HEADER
       
    20 #include "cpimbooleanvalue.h"
       
    21 #include "logger.h"
       
    22 
       
    23 // ======== MEMBER FUNCTIONS ========
       
    24 
       
    25 // ---------------------------------------------------------------------------
       
    26 // CPIMBooleanValue::NewL
       
    27 // Default two-phase constructor
       
    28 // ---------------------------------------------------------------------------
       
    29 //
       
    30 CPIMBooleanValue* CPIMBooleanValue::NewL(TPIMAttribute aAttributes,
       
    31         TBool aBooleanValue)
       
    32 {
       
    33     JELOG2(EPim);
       
    34     CPIMBooleanValue* self =
       
    35         new(ELeave) CPIMBooleanValue(aAttributes, aBooleanValue);
       
    36     return self;
       
    37 }
       
    38 
       
    39 // ---------------------------------------------------------------------------
       
    40 // CPIMBooleanValue::NewLC
       
    41 // Default two-phase constructor. The newly created object is left to the
       
    42 // cleanup stack
       
    43 // ---------------------------------------------------------------------------
       
    44 //
       
    45 CPIMBooleanValue* CPIMBooleanValue::NewLC(TPIMAttribute aAttributes,
       
    46         TBool aBooleanValue)
       
    47 {
       
    48     JELOG2(EPim);
       
    49     CPIMBooleanValue* self =
       
    50         CPIMBooleanValue::NewL(aAttributes, aBooleanValue);
       
    51     CleanupStack::PushL(self);
       
    52     return self;
       
    53 }
       
    54 
       
    55 // ---------------------------------------------------------------------------
       
    56 // Destructor
       
    57 // ---------------------------------------------------------------------------
       
    58 //
       
    59 CPIMBooleanValue::~CPIMBooleanValue()
       
    60 {
       
    61     JELOG2(EPim);
       
    62 }
       
    63 
       
    64 // ---------------------------------------------------------------------------
       
    65 // CPIMBooleanValue::SetValue
       
    66 // (other items were commented in a header)
       
    67 // ---------------------------------------------------------------------------
       
    68 //
       
    69 void CPIMBooleanValue::SetBooleanValue(TBool aBooleanValue)
       
    70 {
       
    71     JELOG2(EPim);
       
    72     iBooleanValue = aBooleanValue;
       
    73 }
       
    74 
       
    75 // ---------------------------------------------------------------------------
       
    76 // CPIMBooleanValue::Value
       
    77 // (other items were commented in a header)
       
    78 // ---------------------------------------------------------------------------
       
    79 //
       
    80 TBool CPIMBooleanValue::BooleanValue() const
       
    81 {
       
    82     JELOG2(EPim);
       
    83     return iBooleanValue;
       
    84 }
       
    85 
       
    86 // ---------------------------------------------------------------------------
       
    87 // CPIMBooleanValue::CPIMBooleanValue
       
    88 // Default C++ constructor
       
    89 // ---------------------------------------------------------------------------
       
    90 //
       
    91 inline CPIMBooleanValue::CPIMBooleanValue(TPIMAttribute aAttributes,
       
    92         TBool aBooleanValue) :
       
    93         CPIMValueBase(aAttributes), iBooleanValue(aBooleanValue)
       
    94 {
       
    95     JELOG2(EPim);
       
    96 }
       
    97 
       
    98 // End of file