Connection. More...

#include <rconnection.h>

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

Public Member Functions

 RConnection (const RString &name, double weight=1.0)
 
int Compare (const RConnection &c) const
 
int Compare (const RString &name) const
 
void Insert (RObj2DConnector *con)
 
size_t GetNb (void) const
 
RCursor< RObj2DConnectorGetConnectors (void) const
 
void SetWeight (double weight)
 
double GetWeight (void) const
 
RString GetName (void) const
 

Private Attributes

RString Name
 
double Weight
 
- Private Attributes inherited from iRContainer< C >
C ** Tab
 
size_t NbPtr
 
size_t MaxPtr
 
size_t LastPtr
 
size_t IncPtr
 

Additional Inherited Members

- Private Member Functions inherited from RContainer< RObj2DConnector, false, false >
 RContainer (size_t m, size_t i=0)
 
 RContainer (const RContainer< RObj2DConnector, true, false > &src)
 
 RContainer (const RContainer< RObj2DConnector, false, false > &src)
 
int Compare (const RContainer< RObj2DConnector, 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< RObj2DConnector, a, o > &src)
 
RContaineroperator= (const RContainer< RObj2DConnector, true, false > &src)
 
RContaineroperator= (const RContainer< RObj2DConnector, false, false > &src)
 
void Copy (const RContainer< RObj2DConnector, a, false > &src)
 
RContaineroperator+= (const RContainer< RObj2DConnector, 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 RObj2DConnectoroperator[] (size_t idx) const
 
RObj2DConnectoroperator[] (size_t idx)
 
const RObj2DConnectorGetPtrAt (size_t idx) const
 
RObj2DConnectorGetPtrAt (size_t idx)
 
RObj2DConnectorGetPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) const
 
RObj2DConnectorGetPtr (const TUse &tag, size_t min=0, size_t max=0) const
 
RObj2DConnectorGetInsertPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0)
 
RObj2DConnectorGetInsertPtr (const TUse &tag, size_t min=0, size_t max=0)
 
RObj2DConnectorGetInsertPtrAt (const TUse &tag, size_t pos)
 
RContainer< RObj2DConnector,
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 RObj2DConnector **tab, size_t min=0, size_t max=0) const
 
size_t GetTab (RObj2DConnector **tab, size_t min=0, size_t max=0)
 
void InsertPtrAt (RObj2DConnector *ins, size_t pos, bool del)
 
void InsertPtrAt (RObj2DConnector *ins, size_t pos)
 
void InsertPtr (RObj2DConnector *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< RObj2DConnector > &src1, const iRContainer< RObj2DConnector > &src2)
 
void Union (const iRContainer< RObj2DConnector > &src1, const iRContainer< RObj2DConnector > &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< RObj2DConnector, 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

Connection.

The RConnection class provides a representation for a connection between objects.

Constructor & Destructor Documentation

RConnection ( const RString name,
double  weight = 1.0 
)

Construct a connection.

Parameters
nameName of the connection.
weightWeight of the connection (Default is 1).

Member Function Documentation

int Compare ( const RConnection c) const

This function compares two connections returns 0 if there are the same.

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

This function compares the name of the connection with a string and returns 0 if there are the same.

Parameters
nameName to compare with.
void Insert ( RObj2DConnector con)

Add a connector to the connection.

Parameters
conConnector.
size_t GetNb ( void  ) const
Returns
the number of connectors.
RCursor<RObj2DConnector> GetConnectors ( void  ) const
Returns
a cursor over the connectors.
void SetWeight ( double  weight)

Set the weight of the connection.

Parameters
weight
double GetWeight ( void  ) const
Returns
the weight.
RString GetName ( void  ) const
Returns
the name.

Member Data Documentation

RString Name
private

Name of the connection.

double Weight
private

Weight of the connection.