Geometric Information Aggregator. More...

#include <robj2dcontainer.h>

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

Public Member Functions

 RObj2DContainer (const size_t id, RLayout *layout)
 
size_t GetNbObjs (void) const
 
virtual void ClearInfo (void)
 
void Add (RGeoInfo *info)
 
void Complete (void)
 
virtual void Assign (const RPoint &pos, RGrid *grid, size_t order)
 
virtual bool IsIn (size_t id) const
 
virtual ~RObj2DContainer (void)
 
- Public Member Functions inherited from RGeoInfo
 RGeoInfo (RObj2D *obj)
 
 RGeoInfo (const RGeoInfo &info)
 
int Compare (const RGeoInfo &info) const
 
int Compare (const size_t id) const
 
tCoord GetArea (void) const
 
void Boundary (RRect &rect)
 
RObj2DContainerGetContainer (void) const
 
void SetContainer (RObj2DContainer *container)
 
bool IsValid (void) const
 
RObj2DGetObj (void) const
 
void SetConfig (tOrientation ori)
 
RObj2DConfigGetConfig (void) const
 
bool IsValid (const RPoint &pos, const RSize &limits) const
 
bool IsMovingAway (const RPoint &pos, const RPoint &ref, bool left, bool bottom) const
 
bool Test (RPoint &pos, RGrid *grid)
 
void PushBottomLeft (RPoint &pos, const RSize &limits, RGrid *grid)
 
void PushCenter (RPoint &pos, const RSize &limits, RGrid *grid)
 
bool Overlap (RGeoInfo *info) const
 
size_t GetNbPoints (void) const
 
RPoint GetPos (void) const
 
RGeoInfooperator+= (const RPoint &pt)
 
RGeoInfooperator-= (const RPoint &pt)
 
RGeoInfooperator= (const RGeoInfo &info)
 
bool IsIn (RPoint pos) const
 
void Add (RPolygons &polys)
 
RPolygon GetPlacedPolygon (void) const
 
size_t GetOrder (void) const
 
virtual ~RGeoInfo (void)
 

Private Attributes

RPoint Origin
 
RLayoutLayout
 
- Private Attributes inherited from iRContainer< C >
C ** Tab
 
size_t NbPtr
 
size_t MaxPtr
 
size_t LastPtr
 
size_t IncPtr
 

Additional Inherited Members

- Protected Member Functions inherited from RGeoInfo
 RGeoInfo (void)
 
- Protected Attributes inherited from RGeoInfo
RObj2DObj
 
RObj2DConfigConfig
 
RPoint Pos
 
RObj2DContainerContainer
 
size_t Order
 
- Private Member Functions inherited from RContainer< RGeoInfo, false, false >
 RContainer (size_t m, size_t i=0)
 
 RContainer (const RContainer< RGeoInfo, true, false > &src)
 
 RContainer (const RContainer< RGeoInfo, false, false > &src)
 
int Compare (const RContainer< RGeoInfo, false, false > &) 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< RGeoInfo, a, o > &src)
 
RContaineroperator= (const RContainer< RGeoInfo, true, false > &src)
 
RContaineroperator= (const RContainer< RGeoInfo, false, false > &src)
 
void Copy (const RContainer< RGeoInfo, a, false > &src)
 
RContaineroperator+= (const RContainer< RGeoInfo, 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 RGeoInfooperator[] (size_t idx) const
 
RGeoInfooperator[] (size_t idx)
 
const RGeoInfoGetPtrAt (size_t idx) const
 
RGeoInfoGetPtrAt (size_t idx)
 
RGeoInfoGetPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) const
 
RGeoInfoGetPtr (const TUse &tag, size_t min=0, size_t max=0) const
 
RGeoInfoGetInsertPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0)
 
RGeoInfoGetInsertPtr (const TUse &tag, size_t min=0, size_t max=0)
 
RGeoInfoGetInsertPtrAt (const TUse &tag, size_t pos)
 
RContainer< RGeoInfo, false,
false > * 
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 RGeoInfo **tab, size_t min=0, size_t max=0) const
 
size_t GetTab (RGeoInfo **tab, size_t min=0, size_t max=0)
 
void InsertPtrAt (RGeoInfo *ins, size_t pos, bool del)
 
void InsertPtrAt (RGeoInfo *ins, size_t pos)
 
void InsertPtr (RGeoInfo *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< RGeoInfo > &src1, const iRContainer< RGeoInfo > &src2)
 
void Union (const iRContainer< RGeoInfo > &src1, const iRContainer< RGeoInfo > &src2)
 
virtual ~RContainer (void)
 
- Private Member Functions inherited from iRContainer< C >
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< C > &src)
 
iRContaineroperator= (const iRContainer< C > &src)
 
void Copy (const iRContainer< C > &src)
 
iRContaineroperator+= (const iRContainer< C > &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 C * operator[] (size_t idx) const
 
C * operator[] (size_t idx)
 
const C * GetPtrAt (size_t idx) const
 
C * GetPtrAt (size_t idx)
 
C * GetPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) const
 
C * GetPtr (const TUse &tag, size_t min=0, size_t max=0) const
 
C * GetInsertPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0)
 
C * GetInsertPtr (const TUse &tag, size_t min=0, size_t max=0)
 
C * GetInsertPtrAt (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 C **tab, size_t min=0, size_t max=0) const
 
size_t GetTab (C **tab, size_t min=0, size_t max=0)
 
void InsertPtrAt (C *ins, size_t pos, bool del)
 
void InsertPtrAt (C *ins, size_t pos)
 
void InsertPtr (C *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< C > &src1, const iRContainer< C > &src2)
 
void Union (const iRContainer< C > &src1, const iRContainer< C > &src2)
 
virtual ~iRContainer (void)
 
void Create (const iRContainer< C > &src)
 
iRContainerNormalCopy (const iRContainer< C > &src)
 
void DeepCopy (const iRContainer< C > &src)
 
iRContainerAdd (const iRContainer< C > &src)
 
- Static Private Member Functions inherited from RContainer< RGeoInfo, false, false >
static int SortOrder (const void *a, const void *b)
 
- Static Private Member Functions inherited from iRContainer< C >
static int SortOrder (const void *a, const void *b)
 

Detailed Description

Geometric Information Aggregator.

The RGeoInfoContainer class provides an aggregator of geometric information to be considered like one entity.

Constructor & Destructor Documentation

RObj2DContainer ( const size_t  id,
RLayout layout 
)

Construct an aggregator of geometric information relative to a given layout.

Parameters
idThe identifier of the object.
layoutLayout.
virtual ~RObj2DContainer ( void  )
virtual

Destruct the container.

Member Function Documentation

size_t GetNbObjs ( void  ) const
Returns
the number of objects contained.
virtual void ClearInfo ( void  )
virtual

Clear the geometric information.

Reimplemented from RGeoInfo.

void Add ( RGeoInfo info)

Add a geometric information information to the container.

Parameters
infoThe geometric information.
void Complete ( void  )

Does some calculation after each geometric information were added to the container.

virtual void Assign ( const RPoint pos,
RGrid grid,
size_t  order 
)
virtual

Assign the geometric information to the position and update the grid with the identifiers of the objects.

Parameters
posPosition to place.
gridGrid.
orderOrder of the corresponding geometric information.

Reimplemented from RGeoInfo.

virtual bool IsIn ( size_t  id) const
virtual

Verify if a given object is in the container or not.

Parameters
idIdentifier of the object.
Returns
true if the object is in, else false.

Member Data Documentation

RPoint Origin
private

Origin of the aggregator (Left-bottom).

RLayout* Layout
private

Layout associated to the container.