ImagePrint/ImagePrintEngine/ImagePrintServer/src/server/cnumofcopies.cpp
branchGCC_SURGE
changeset 25 59ea2209bb67
parent 23 08cc4cc059d4
parent 15 a92d00fca574
equal deleted inserted replaced
23:08cc4cc059d4 25:59ea2209bb67
     1 /*
       
     2 * Copyright (c) 2004-2007 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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "cnumofcopies.h"
       
    20 #include "clog.h"
       
    21 
       
    22 CNumOfCopies* CNumOfCopies::NewL()
       
    23     {
       
    24 	CNumOfCopies* obj = new (ELeave) CNumOfCopies();
       
    25     CleanupStack::PushL( obj ) ;
       
    26     obj->ConstructL();
       
    27 	CleanupStack::Pop(); // obj
       
    28     return obj;
       
    29     }
       
    30 
       
    31 CNumOfCopies::~CNumOfCopies()
       
    32     {
       
    33     LOG("CNumOfCopies::~CNumOfCopies begin");
       
    34 	iNumsOfCopies.Close();
       
    35 	LOG("CNumOfCopies::~CNumOfCopies end");
       
    36     }
       
    37 
       
    38 CNumOfCopies::CNumOfCopies() : iCount( 0 )
       
    39     {
       
    40     }
       
    41 
       
    42 void CNumOfCopies::ConstructL()
       
    43     {
       
    44     }
       
    45     
       
    46 void CNumOfCopies::Reset( TInt aCount )
       
    47     {
       
    48     LOG("CNumOfCopies::Reset begin");
       
    49     iCount = aCount;
       
    50     iNumsOfCopies.Reset();
       
    51     LOG("CNumOfCopies::Reset end");
       
    52     }    
       
    53     
       
    54 void CNumOfCopies::AddNumOfCopyL( TInt aNumOfCopies, TBool& aFull )
       
    55 	{
       
    56 	LOG1("CNumOfCopies::AddNumOfCopyL aNumOfCopies: %d", aNumOfCopies);
       
    57 	iNumsOfCopies.AppendL( aNumOfCopies );
       
    58 	aFull = ( iNumsOfCopies.Count() == iCount ) ? ETrue : EFalse;
       
    59 	LOG1("CNumOfCopies::AddNumOfCopyL end with aFull: %d", aFull);
       
    60 	}
       
    61 
       
    62 const RArray<TInt>& CNumOfCopies::NumsOfCopies() const
       
    63 	{
       
    64 	return iNumsOfCopies;
       
    65 	}
       
    66 
       
    67 //  End of File