Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: e32std.h
Link against: euser.lib

Class RRegion

class RRegion : public TRegion;

Description

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.

Derivation

Members

Defined in RRegion:
CheckSpare(), Close(), Destroy(), RRegion(), RRegion(), RRegion(), RRegion(), RRegion(), RRegion()

Inherited from TRegion:
AddRect(), BoundingRect(), CheckError(), Clear(), ClipRect(), Contains(), Copy(), Count(), ERRegionBuf, ForceError(), Intersect(), Intersection(), Intersects(), IsContainedBy(), IsEmpty(), Offset(), RectangleList(), RectangleListW(), Sort(), SubRect(), SubRegion(), Tidy(), Union(), anonymous, iAllocedRects, iCount, iError, operator[]()


Construction and destruction


RRegion()

protected: IMPORT_C RRegion(TInt aBuf, TInt aGran);

Description

Parameters

TInt aBuf

TInt aGran


RRegion()

IMPORT_C RRegion();

Description

Default constructor.

Initialises its granularity to five.


RRegion()

IMPORT_C RRegion(TInt aGran);

Description

Constructs the object with the specified granularity.

Parameters

TInt aGran

The initial value for the region's granularity. This value must not be negative.


RRegion()

IMPORT_C RRegion(const RRegion &aRegion);

Description

Copy constructor.

Constructs a new object from an existing one.

Parameters

const RRegion &aRegion

The region to be copied.


RRegion()

IMPORT_C RRegion(const TRect &aRect, TInt aGran=EDefaultGranularity);

Description

Constructs the object with the specified rectangle and granularity.

The resulting region consists of the specified single rectangle.

Parameters

const TRect &aRect

The single rectangle with which to initialise the region

TInt aGran

The initial value for the region's granularity. By default, this is five.


RRegion()

IMPORT_C RRegion(TInt aCount, TRect *aRectangleList, TInt aGran=EDefaultGranularity);

Description

Constructor that takes ownership of an already created rectangle list.

Parameters

TInt aCount

The number of rectangles in the region.

TRect *aRectangleList

A pointer to the set of rectangles.

TInt aGran

The region's granularity.

[Top]


Member functions


Close()

IMPORT_C void Close();

Description

Closes the region.

Frees up any memory which has been allocated, and unsets the error flag, if set.

The region is not deleted, so that it can be re-used. Its granularity is preserved.


Destroy()

IMPORT_C void Destroy();

Description

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.

Panic codes

USER

42 if the RRegion object is stored on the stack.


CheckSpare()

inline TInt CheckSpare() const;

Description

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.

Return value

TInt

The number of free memory slots in the region.