class TMdERange |
The TMdERange template is used for representing value ranges of various types. A range is composed of an upper limit, a lower limit, and type that describe how the limits are to be interpreted.
Value ranges are used with CMdERangePropertyCondition nodes to define a range of values that the condition matches. Basic operations such as "greater than", "equals to", and "between" are all implemented using value ranges. There are also more complex ranges that can be used in loops.
TMdERange is the base template for many different kind of value ranges. However, all ranges can be processed with the Min() , Max() , and Type() methods, regardless of any extra data defined by a specialized range type.
Public Member Functions | |
---|---|
TMdERange (const T &, const T &, TMdERangeType ) | |
TBool | InRange (const T &) |
const T & | Max () |
const T & | Min () |
TUint32 | RequiredBufferSize () |
void | SerializeL (CMdCSerializationBuffer &) |
void | SetMax (const T &) |
void | SetMin (const T &) |
void | SetType ( TMdERangeType ) |
const TMdERangeType & | Type () |
Private Attributes | |
---|---|
T | iMax |
T | iMin |
TMdERangeType | iType |
TMdERange | ( | const T & | aMin, |
const T & | aMax, | ||
TMdERangeType | aType = EMdERangeTypeAny | ||
) | [inline] |
const T & aMin | |
const T & aMax | |
TMdERangeType aType = EMdERangeTypeAny |
TBool | InRange | ( | const T & | aValue | ) | [inline] |
Test if value is in the range.
const T & aValue | Tested value. |
TUint32 | RequiredBufferSize | ( | ) | [inline] |
Get required size of serialized buffer when this is serialized.
void | SerializeL | ( | CMdCSerializationBuffer & | aBuffer | ) | [inline] |
Serialize own data to serialized buffer (correct position must be set before calling) and return new position of serialized buffer.
CMdCSerializationBuffer & aBuffer | serialized buffer. |
void | SetMax | ( | const T & | aMax | ) | [inline] |
Sets the upper limit of the range.
const T & aMax | The maximum value. |
void | SetMin | ( | const T & | aMin | ) | [inline] |
Sets the lower limit of the range.
const T & aMin | The minimum value. |
void | SetType | ( | TMdERangeType | aType | ) | [inline] |
Sets the type of the range.
TMdERangeType aType | The new type. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.