class RRegion : public TRegion |
Expandable region.
This class provides for the construction and destruction of a TRegion , including a granularity for expanding the region. A region;s granularity represents the number of memory slots allocated when the object is created, and the number of new memory slots allocated each time an RRegion is expanded beyond the number of free slots. The default granularity is five.
Public Member Functions | |
---|---|
RRegion () | |
RRegion ( TInt ) | |
RRegion (const RRegion &) | |
RRegion (const TRect &, TInt ) | |
RRegion ( TInt , TRect *, TInt ) | |
TInt | CheckSpare () |
IMPORT_C void | Close () |
IMPORT_C void | Destroy () |
Protected Member Functions | |
---|---|
RRegion ( TInt , TInt ) |
Inherited Enumerations | |
---|---|
TRegion:@20 |
Private Attributes | |
---|---|
TInt | iGranularity |
TRect * | iRectangleList |
Inherited Attributes | |
---|---|
TRegion::iAllocedRects | |
TRegion::iCount | |
TRegion::iError |
IMPORT_C | RRegion | ( | TInt | aGran | ) |
Constructs the object with the specified granularity.
TInt aGran | The initial value for the region's granularity. This value must not be negative. |
IMPORT_C | RRegion | ( | const RRegion & | aRegion | ) |
Copy constructor.
Constructs a new region from an existing one by performing a bit-wise copy. Both the new and existing regions are left containing pointers to the same data, so Close() must only be called on one of them.
Use of this method is not recommended.
const RRegion & aRegion | The region to be copied. |
IMPORT_C | RRegion | ( | const TRect & | aRect, |
TInt | aGran = EDefaultGranularity | |||
) |
Constructs the object with the specified rectangle and granularity.
The resulting region consists of the specified single rectangle.
IMPORT_C | RRegion | ( | TInt | aCount, |
TRect * | aRectangleList, | |||
TInt | aGran = EDefaultGranularity | |||
) |
Constructor that takes ownership of an already created rectangle list.
TInt | CheckSpare | ( | ) | const [inline] |
Gets the number of free memory slots in the region.
This is the number of slots which have been allocated, minus the number in use.
IMPORT_C void | Close | ( | ) |
Closes the region.
Frees up any memory which has been allocated, and unsets the error flag, if set.
The region can be re-used after calling this method. Its granularity is preserved.
IMPORT_C void | Destroy | ( | ) |
Deletes the region.
Frees all memory.
Note this method will delete the RRegion object and therefore it should not be invoked on RRegion objects that are not allocated on the heap. RRegion::Close() should be used for RRegion objects stored on the stack.
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.