equal
deleted
inserted
replaced
109 void CMdELogicCondition::SetLocked(TBool aLocked) |
109 void CMdELogicCondition::SetLocked(TBool aLocked) |
110 { |
110 { |
111 // Base class locking. |
111 // Base class locking. |
112 CMdECondition::SetLocked(aLocked); |
112 CMdECondition::SetLocked(aLocked); |
113 |
113 |
114 const TInt count = iChildren.Count(); |
|
115 |
|
116 // Lock children as well. |
114 // Lock children as well. |
117 for(TInt i = 0; i < count; ++i) |
115 for( TInt i = iChildren.Count()- 1; i >=0; i-- ) |
118 { |
116 { |
119 iChildren[i]->SetLocked(aLocked); |
117 iChildren[i]->SetLocked(aLocked); |
120 } |
118 } |
121 } |
119 } |
122 |
120 |
123 TUint32 CMdELogicCondition::InternalQueryOptimizationFlags(TUint32& aFlags) |
121 TUint32 CMdELogicCondition::InternalQueryOptimizationFlags(TUint32& aFlags) |
124 { |
122 { |
125 const TInt count = iChildren.Count(); |
|
126 |
|
127 // get flag from childrens |
123 // get flag from childrens |
128 for( TInt i = 0 ; i < count; i++) |
124 for( TInt i = iChildren.Count() - 1; i >=0; i-- ) |
129 { |
125 { |
130 iOptimizationFlags |= iChildren[i]->InternalQueryOptimizationFlags(aFlags); |
126 iOptimizationFlags |= iChildren[i]->InternalQueryOptimizationFlags(aFlags); |
131 } |
127 } |
132 |
128 |
133 return 0; |
129 return 0; |
142 |
138 |
143 // required size for children offsets (children count * TUint32) |
139 // required size for children offsets (children count * TUint32) |
144 bufferSize += count * CMdCSerializationBuffer::KRequiredSizeForTUint32; |
140 bufferSize += count * CMdCSerializationBuffer::KRequiredSizeForTUint32; |
145 |
141 |
146 // Required size for childrens |
142 // Required size for childrens |
147 for( TInt i = 0 ; i < count; i++) |
143 for( TInt i = count - 1; i >=0; i-- ) |
148 { |
144 { |
149 bufferSize += iChildren[i]->RequiredBufferSize(); |
145 bufferSize += iChildren[i]->RequiredBufferSize(); |
150 } |
146 } |
151 |
147 |
152 return bufferSize; |
148 return bufferSize; |
336 TTextPropertyConditionCompareMethod aCompareMethod, |
332 TTextPropertyConditionCompareMethod aCompareMethod, |
337 const TDesC& aText) |
333 const TDesC& aText) |
338 { |
334 { |
339 AssertNotLocked(); |
335 AssertNotLocked(); |
340 |
336 |
341 CMdETextPropertyCondition* condition |
337 CMdETextPropertyCondition* condition = CMdETextPropertyCondition::NewLC( aPropertyDef, |
342 = CMdETextPropertyCondition::NewLC(aPropertyDef, aCompareMethod, aText); |
338 aCompareMethod, aText ); |
343 AddL(condition); |
339 AddL(condition); |
344 CleanupStack::Pop(condition); |
340 CleanupStack::Pop(condition); |
345 return *condition; |
341 return *condition; |
346 } |
342 } |
347 |
343 |