31 // Two-phase constructor. |
31 // Two-phase constructor. |
32 // ----------------------------------------------------------------------------- |
32 // ----------------------------------------------------------------------------- |
33 // |
33 // |
34 CStringList* CStringList::NewL() |
34 CStringList* CStringList::NewL() |
35 { |
35 { |
36 TRACE_FUNC_ENTRY; |
|
37 CStringList* self = CStringList::NewLC(); |
36 CStringList* self = CStringList::NewLC(); |
38 CleanupStack::Pop( self ); |
37 CleanupStack::Pop( self ); |
39 TRACE_FUNC_EXIT; |
|
40 return self; |
38 return self; |
41 } |
39 } |
42 |
40 |
43 // ----------------------------------------------------------------------------- |
41 // ----------------------------------------------------------------------------- |
44 // CStringList::NewLC() |
42 // CStringList::NewLC() |
45 // Two-phase constructor. The created instance is placed to cleanup stack |
43 // Two-phase constructor. The created instance is placed to cleanup stack |
46 // ----------------------------------------------------------------------------- |
44 // ----------------------------------------------------------------------------- |
47 // |
45 // |
48 CStringList* CStringList::NewLC() |
46 CStringList* CStringList::NewLC() |
49 { |
47 { |
50 TRACE_FUNC_ENTRY; |
|
51 CStringList* self = new ( ELeave ) CStringList(); |
48 CStringList* self = new ( ELeave ) CStringList(); |
52 CleanupStack::PushL( self ); |
49 CleanupStack::PushL( self ); |
53 self->ConstructL(); |
50 self->ConstructL(); |
54 TRACE_FUNC_EXIT; |
|
55 return self; |
51 return self; |
56 } |
52 } |
57 |
53 |
58 // ----------------------------------------------------------------------------- |
54 // ----------------------------------------------------------------------------- |
59 // CStringList::CStringList() |
55 // CStringList::CStringList() |
60 // Default constuctor |
56 // Default constuctor |
61 // ----------------------------------------------------------------------------- |
57 // ----------------------------------------------------------------------------- |
62 // |
58 // |
63 CStringList::CStringList() |
59 CStringList::CStringList() |
64 { |
60 { |
65 TRACE_FUNC; |
|
66 } |
61 } |
67 |
62 |
68 // ----------------------------------------------------------------------------- |
63 // ----------------------------------------------------------------------------- |
69 // CStringList::~CStringList() |
64 // CStringList::~CStringList() |
70 // Destructor |
65 // Destructor |
71 // ----------------------------------------------------------------------------- |
66 // ----------------------------------------------------------------------------- |
72 // |
67 // |
73 CStringList::~CStringList() |
68 CStringList::~CStringList() |
74 { |
69 { |
75 TRACE_FUNC_ENTRY; |
|
76 delete iLines; |
70 delete iLines; |
77 iLines = NULL; |
71 iLines = NULL; |
78 TRACE_FUNC_EXIT; |
|
79 } |
72 } |
80 |
73 |
81 // ----------------------------------------------------------------------------- |
74 // ----------------------------------------------------------------------------- |
82 // CStringList::ConstructL() |
75 // CStringList::ConstructL() |
83 // Initializes member data |
76 // Initializes member data |
84 // ----------------------------------------------------------------------------- |
77 // ----------------------------------------------------------------------------- |
85 // |
78 // |
86 void CStringList::ConstructL() |
79 void CStringList::ConstructL() |
87 { |
80 { |
88 TRACE_FUNC_ENTRY; |
|
89 const TInt KDefaultArrayGranularity = 10; |
81 const TInt KDefaultArrayGranularity = 10; |
90 iLines = new (ELeave) CDesCArrayFlat(KDefaultArrayGranularity); |
82 iLines = new (ELeave) CDesCArrayFlat(KDefaultArrayGranularity); |
91 SetMark(0); |
83 SetMark(0); |
92 TRACE_FUNC_EXIT; |
|
93 } |
84 } |
94 |
85 |
95 // ----------------------------------------------------------------------------- |
86 // ----------------------------------------------------------------------------- |
96 // CStringList::Count() const |
87 // CStringList::Count() const |
97 // Returns the count of lines |
88 // Returns the count of lines |