equal
deleted
inserted
replaced
|
1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 inline TCommsBufIter::TCommsBufIter(RCommsBufChain& aChain) |
|
17 : iCurrent(aChain.First()) |
|
18 /** |
|
19 Construct an iterator for the RCommsBuf using the supplied chain |
|
20 */ |
|
21 { |
|
22 } |
|
23 |
|
24 inline TCommsBufIter::TCommsBufIter(RCommsBuf* aBuf) |
|
25 : iCurrent(aBuf) |
|
26 /** |
|
27 Construct an iterator for the RCommsBuf using the supplied RCommsBuf |
|
28 */ |
|
29 { |
|
30 } |
|
31 |
|
32 inline TCommsBufIter TCommsBufIter::operator++ (TInt) |
|
33 /** |
|
34 Advance the iterator |
|
35 */ |
|
36 { |
|
37 TCommsBufIter it(iCurrent); |
|
38 if (iCurrent != NULL) |
|
39 iCurrent = iCurrent->Next(); |
|
40 return it; |
|
41 } |
|
42 inline TCommsBufIter& TCommsBufIter::operator++ () |
|
43 /** |
|
44 Advance the iterator |
|
45 */ |
|
46 { |
|
47 if (iCurrent != NULL) |
|
48 iCurrent = iCurrent->Next(); |
|
49 return *this; |
|
50 } |
|
51 |
|
52 inline RCommsBuf* TCommsBufIter::Current() |
|
53 /** |
|
54 Returns the pointer to the current RCommsBuf |
|
55 */ |
|
56 { |
|
57 return iCurrent; |
|
58 } |
|
59 |
|
60 inline TBool TCommsBufIter::AtEnd() const |
|
61 /** |
|
62 Check if the iterator is at the end. If so, further calls to TCommsBufIter::Current returns NULL. |
|
63 |
|
64 @return ETrue if the iterator is reached the end |
|
65 */ |
|
66 { |
|
67 return iCurrent == NULL; |
|
68 } |
|
69 |
|
70 inline TCommsBufIter::TCommsBufIter() |
|
71 : iCurrent(NULL) |
|
72 /** |
|
73 The constructor |
|
74 */ |
|
75 { |
|
76 } |