|
1 /* |
|
2 * Copyright (c) 2010 Kanrikogaku Kenkyusho, Ltd. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "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 * Kanrikogaku Kenkyusho, Ltd. - Initial contribution |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "directprintnumofcopies.h" |
|
20 #include "clog.h" |
|
21 |
|
22 CDirectPrintNumOfCopies* CDirectPrintNumOfCopies::NewL() |
|
23 { |
|
24 CDirectPrintNumOfCopies* obj = new (ELeave) CDirectPrintNumOfCopies(); |
|
25 CleanupStack::PushL( obj ) ; |
|
26 obj->ConstructL(); |
|
27 CleanupStack::Pop(); // obj |
|
28 return obj; |
|
29 } |
|
30 |
|
31 CDirectPrintNumOfCopies::~CDirectPrintNumOfCopies() |
|
32 { |
|
33 LOG("CDirectPrintNumOfCopies::~CDirectPrintNumOfCopies begin"); |
|
34 iNumsOfCopies.Close(); |
|
35 LOG("CDirectPrintNumOfCopies::~CDirectPrintNumOfCopies end"); |
|
36 } |
|
37 |
|
38 CDirectPrintNumOfCopies::CDirectPrintNumOfCopies() : iCount( 0 ) |
|
39 { |
|
40 } |
|
41 |
|
42 void CDirectPrintNumOfCopies::ConstructL() |
|
43 { |
|
44 } |
|
45 |
|
46 void CDirectPrintNumOfCopies::Reset( TInt aCount ) |
|
47 { |
|
48 LOG("CDirectPrintNumOfCopies::Reset begin"); |
|
49 iCount = aCount; |
|
50 iNumsOfCopies.Reset(); |
|
51 LOG("CDirectPrintNumOfCopies::Reset end"); |
|
52 } |
|
53 |
|
54 void CDirectPrintNumOfCopies::AddNumOfCopyL( TInt aNumOfCopies, TBool& aFull ) |
|
55 { |
|
56 LOG1("CDirectPrintNumOfCopies::AddNumOfCopyL aNumOfCopies: %d", aNumOfCopies); |
|
57 iNumsOfCopies.AppendL( aNumOfCopies ); |
|
58 aFull = ( iNumsOfCopies.Count() == iCount ) ? ETrue : EFalse; |
|
59 LOG1("CDirectPrintNumOfCopies::AddNumOfCopyL end with aFull: %d", aFull); |
|
60 } |
|
61 |
|
62 const RArray<TInt>& CDirectPrintNumOfCopies::NumsOfCopies() const |
|
63 { |
|
64 return iNumsOfCopies; |
|
65 } |
|
66 |
|
67 // End of File |