2D Object. More...

#include <robj2d.h>

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

Public Member Functions

 RObj2D (size_t id, const RString &name)
 
int Compare (const RObj2D *o) const
 
int Compare (const RObj2D &o) const
 
int Compare (const size_t id) const
 
int Compare (const RString &name) const
 
void CreateOri (tOrientation ori)
 
size_t GetId (void) const
 
void SetId (size_t id)
 
RString GetName (void) const
 
virtual bool IsIn (size_t id) const
 
RObj2DConfigGetDefaultConfig (void)
 
size_t GetNbConnectors (void) const
 
RCursor< RObj2DConnectorGetConnectors (void) const
 
template<class TUse >
RObj2DConnectorGetConnector (const TUse &use, bool order=true) const
 
double GetConnectorWeights (void) const
 
void Copy (const RObj2D &obj)
 
virtual ~RObj2D (void)
 
- Public Member Functions inherited from RContainer< RObj2DConfig, true, true >
 RContainer (size_t m, size_t i=0)
 
 RContainer (const RContainer< RObj2DConfig, true, true > &src)
 
 RContainer (const RContainer< RObj2DConfig, false, true > &src)
 
int Compare (const RContainer< RObj2DConfig, true, true > &) 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< RObj2DConfig, a, o > &src)
 
RContaineroperator= (const RContainer< RObj2DConfig, true, true > &src)
 
RContaineroperator= (const RContainer< RObj2DConfig, false, true > &src)
 
void Copy (const RContainer< RObj2DConfig, a, true > &src)
 
RContaineroperator+= (const RContainer< RObj2DConfig, 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 RObj2DConfigoperator[] (size_t idx) const
 
RObj2DConfigoperator[] (size_t idx)
 
const RObj2DConfigGetPtrAt (size_t idx) const
 
RObj2DConfigGetPtrAt (size_t idx)
 
RObj2DConfigGetPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) const
 
RObj2DConfigGetPtr (const TUse &tag, size_t min=0, size_t max=0) const
 
RObj2DConfigGetInsertPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0)
 
RObj2DConfigGetInsertPtr (const TUse &tag, size_t min=0, size_t max=0)
 
RObj2DConfigGetInsertPtrAt (const TUse &tag, size_t pos)
 
RContainer< RObj2DConfig,
false, true > * 
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 RObj2DConfig **tab, size_t min=0, size_t max=0) const
 
size_t GetTab (RObj2DConfig **tab, size_t min=0, size_t max=0)
 
void InsertPtrAt (RObj2DConfig *ins, size_t pos, bool del)
 
void InsertPtrAt (RObj2DConfig *ins, size_t pos)
 
void InsertPtr (RObj2DConfig *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< RObj2DConfig > &src1, const iRContainer< RObj2DConfig > &src2)
 
void Union (const iRContainer< RObj2DConfig > &src1, const iRContainer< RObj2DConfig > &src2)
 
virtual ~RContainer (void)
 
- Public 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)
 

Protected Attributes

size_t Id
 
RString Name
 
RContainer< RObj2DConnector,
true, true > 
Connectors
 
- Protected Attributes inherited from iRContainer< C >
C ** Tab
 
size_t NbPtr
 
size_t MaxPtr
 
size_t LastPtr
 
size_t IncPtr
 

Additional Inherited Members

- Static Public Member Functions inherited from RContainer< RObj2DConfig, true, true >
static int SortOrder (const void *a, const void *b)
 
- Static Public Member Functions inherited from iRContainer< C >
static int SortOrder (const void *a, const void *b)
 
- Protected Member Functions inherited from iRContainer< C >
void Create (const iRContainer< C > &src)
 
iRContainerNormalCopy (const iRContainer< C > &src)
 
void DeepCopy (const iRContainer< C > &src)
 
iRContainerAdd (const iRContainer< C > &src)
 

Detailed Description

2D Object.

The RObj2D class represent an object to place.

Constructor & Destructor Documentation

RObj2D ( size_t  id,
const RString name 
)

Construct an 2D object.

Parameters
idIdentifier of the object.
nameName of the object.
virtual ~RObj2D ( void  )
virtual

Destruct the object.

Member Function Documentation

int Compare ( const RObj2D o) const

This function compares two objects and returns 0 if there are the same. This function is used for the class RContainer.

Parameters
oObject used for the comparison.
int Compare ( const RObj2D o) const

This function compares two objects and returns 0 if there are the same. This function is used for the class RContainer.

Parameters
oObject used for the comparison.
int Compare ( const size_t  id) const

This function compares an object and an identifier and returns 0 if there are the same. This function is used for the class RContainer.

Parameters
idIdentifier used for the comparison.
int Compare ( const RString name) const

This function compares an object and a name and returns 0 if there are the same. This function is used for the class RContainer.

Parameters
nameName used for the comparison.
void CreateOri ( tOrientation  ori)

Create a specific orientation if possible. The method creates the correct configuration and compute the rectangular decompositions and the area of the object.

Parameters
oriOrientation.
size_t GetId ( void  ) const

Return the identifier of the object.

void SetId ( size_t  id)

Set the identifier of the object if the current one is invalid.

Parameters
idIdentifier.
RString GetName ( void  ) const
Returns
the name of the connector.
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.
RObj2DConfig* GetDefaultConfig ( void  )

The method is used to manage the configuration (the one corresponding to the oNormal orientation). It is created if necessary.

Returns
the default configuration.
size_t GetNbConnectors ( void  ) const
Returns
the number of connectors.
RCursor<RObj2DConnector> GetConnectors ( void  ) const
Returns
a cursor over the connectors.
RObj2DConnector* GetConnector ( const TUse &  use,
bool  order = true 
) const
Returns
a pointer to a particular connector.
Parameters
useSearch criteria.
orderSpecify if the search criteria is the one ordering the container.
double GetConnectorWeights ( void  ) const

Compute the sum of the weights of all the connections which have a connector linked to the object.

Returns
the sum of the weights.
void Copy ( const RObj2D obj)

Copy an object.

Parameters
objObject to copy.

Member Data Documentation

size_t Id
protected

Identifier of the object.

RString Name
protected

Name of the object.

RContainer<RObj2DConnector,true,true> Connectors
protected

The connectors of this object