Rectangles container. More...

#include <rrects.h>

Inheritance diagram for RRects:
[legend]
Collaboration diagram for RRects:
[legend]

Public Member Functions

 RRects (void)
 
 RRects (size_t max)
 
 RRects (const RRects &rects)
 
tCoord Area (void) const
 
RCursor< RRectGetRects (void) const
 
- Public Member Functions inherited from RContainer< RRect, true, false >
 RContainer (size_t m, size_t i=0)
 
 RContainer (const RContainer< RRect, true, bOrder > &src)
 
 RContainer (const RContainer< RRect, false, bOrder > &src)
 
int Compare (const RContainer< RRect, bAlloc, bOrder > &) const
 
size_t GetNb (void) const
 
size_t GetMaxPos (void) const
 
size_t GetMaxNb (void) const
 
size_t GetIncNb (void) const
 
bool VerifyIndex (size_t idx) const
 
void VerifyTab (size_t max=0)
 
void Clear (size_t m=0, size_t i=0, bool force=false)
 
void ReOrder (int sortOrder(const void *, const void *), size_t min, size_t max)
 
void ReOrder (int sortOrder(const void *, const void *))
 
void ReOrder (void)
 
void Exchange (size_t pos1, size_t pos2)
 
void Shift (size_t idx, bool reverse)
 
void Transfer (RContainer< RRect, a, o > &src)
 
RContaineroperator= (const RContainer< RRect, true, bOrder > &src)
 
RContaineroperator= (const RContainer< RRect, false, bOrder > &src)
 
void Copy (const RContainer< RRect, a, bOrder > &src)
 
RContaineroperator+= (const RContainer< RRect, a, o > &src)
 
size_t GetIndex (const TUse &tag, bool &find, size_t min=0, size_t max=0) const
 
bool IsIn (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) const
 
bool IsIn (const TUse &tag, size_t min=0, size_t max=0) const
 
const RRectoperator[] (size_t idx) const
 
RRectoperator[] (size_t idx)
 
const RRectGetPtrAt (size_t idx) const
 
RRectGetPtrAt (size_t idx)
 
RRectGetPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) const
 
RRectGetPtr (const TUse &tag, size_t min=0, size_t max=0) const
 
RRectGetInsertPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0)
 
RRectGetInsertPtr (const TUse &tag, size_t min=0, size_t max=0)
 
RRectGetInsertPtrAt (const TUse &tag, size_t pos)
 
RContainer< RRect, false,
bOrder > * 
GetPtrs (const TUse &tag, size_t min=0, size_t max=0) const
 
size_t GetTab (const void **tab, size_t min=0, size_t max=0) const
 
size_t GetTab (void **tab, size_t min=0, size_t max=0)
 
size_t GetTab (const RRect **tab, size_t min=0, size_t max=0) const
 
size_t GetTab (RRect **tab, size_t min=0, size_t max=0)
 
void InsertPtrAt (RRect *ins, size_t pos, bool del)
 
void InsertPtrAt (RRect *ins, size_t pos)
 
void InsertPtr (RRect *ins, bool del=false, size_t min=0, size_t max=0)
 
void DeletePtrAt (size_t pos, bool shift, bool del)
 
void DeletePtrAt (size_t pos, bool shift)
 
void DeletePtrAt (size_t pos)
 
void DeletePtr (const TUse &tag, bool sortkey, bool del, size_t min=0, size_t max=0)
 
void DeletePtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0)
 
void DeletePtr (const TUse &tag, size_t min=0, size_t max=0)
 
void Inter (const iRContainer< RRect > &src1, const iRContainer< RRect > &src2)
 
void Union (const iRContainer< RRect > &src1, const iRContainer< RRect > &src2)
 
virtual ~RContainer (void)
 
- Public Member Functions inherited from iRContainer< RRect >
size_t GetNb (void) const
 
size_t GetMaxPos (void) const
 
size_t GetMaxNb (void) const
 
size_t GetIncNb (void) const
 
bool VerifyIndex (size_t idx) const
 
void VerifyTab (size_t max=0)
 
void Clear (size_t m=0, size_t i=0, bool force=false)
 
void ReOrder (int sortOrder(const void *, const void *), size_t min, size_t max)
 
void ReOrder (int sortOrder(const void *, const void *))
 
void ReOrder (void)
 
void Exchange (size_t pos1, size_t pos2)
 
void Shift (size_t idx, bool reverse)
 
void Transfer (iRContainer< RRect > &src)
 
iRContaineroperator= (const iRContainer< RRect > &src)
 
void Copy (const iRContainer< RRect > &src)
 
iRContaineroperator+= (const iRContainer< RRect > &src)
 
size_t GetIndex (bool order, const TUse &tag, bool &find, size_t min=0, size_t max=0) const
 
size_t GetIndex (const TUse &tag, bool &find, size_t min=0, size_t max=0) const
 
bool IsIn (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) const
 
bool IsIn (const TUse &tag, size_t min=0, size_t max=0) const
 
const RRectoperator[] (size_t idx) const
 
RRectoperator[] (size_t idx)
 
const RRectGetPtrAt (size_t idx) const
 
RRectGetPtrAt (size_t idx)
 
RRectGetPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) const
 
RRectGetPtr (const TUse &tag, size_t min=0, size_t max=0) const
 
RRectGetInsertPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0)
 
RRectGetInsertPtr (const TUse &tag, size_t min=0, size_t max=0)
 
RRectGetInsertPtrAt (const TUse &tag, size_t pos)
 
size_t GetTab (const void **tab, size_t min=0, size_t max=0) const
 
size_t GetTab (void **tab, size_t min=0, size_t max=0)
 
size_t GetTab (const RRect **tab, size_t min=0, size_t max=0) const
 
size_t GetTab (RRect **tab, size_t min=0, size_t max=0)
 
void InsertPtrAt (RRect *ins, size_t pos, bool del)
 
void InsertPtrAt (RRect *ins, size_t pos)
 
void InsertPtr (RRect *ins, bool del=false, size_t min=0, size_t max=0)
 
void DeletePtrAt (size_t pos, bool shift, bool del)
 
void DeletePtrAt (size_t pos, bool shift)
 
void DeletePtrAt (size_t pos)
 
void DeletePtr (const TUse &tag, bool sortkey, bool del, size_t min=0, size_t max=0)
 
void DeletePtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0)
 
void DeletePtr (const TUse &tag, size_t min=0, size_t max=0)
 
void Inter (const iRContainer< RRect > &src1, const iRContainer< RRect > &src2)
 
void Union (const iRContainer< RRect > &src1, const iRContainer< RRect > &src2)
 
virtual ~iRContainer (void)
 

Additional Inherited Members

- Static Public Member Functions inherited from RContainer< RRect, true, false >
static int SortOrder (const void *a, const void *b)
 
- Static Public Member Functions inherited from iRContainer< RRect >
static int SortOrder (const void *a, const void *b)
 
- Protected Member Functions inherited from iRContainer< RRect >
void Create (const iRContainer< RRect > &src)
 
iRContainerNormalCopy (const iRContainer< RRect > &src)
 
void DeepCopy (const iRContainer< RRect > &src)
 
iRContainerAdd (const iRContainer< RRect > &src)
 
- Protected Attributes inherited from iRContainer< RRect >
RRect ** Tab
 
size_t NbPtr
 
size_t MaxPtr
 
size_t LastPtr
 
size_t IncPtr
 

Detailed Description

Rectangles container.

This class implements a container of rectangles.

Constructor & Destructor Documentation

RRects ( void  )

Construct a container of rectangles.

RRects ( size_t  max)

Construct a container of rectangles with a initial maximal size.

Parameters
maxInitial maximal size.
RRects ( const RRects rects)

Construct a container of rectangles from another.

Parameters
rectsThe container used as reference.

Member Function Documentation

tCoord Area ( void  ) const

Return the area of all the rectangles.

RCursor<RRect> GetRects ( void  ) const
Returns
cursor over the rectangle.