src/libYARP_OS/src/mesh.cpp
void MeshLink::SetDest ( MeshLink *link )
{
	if ( dest != NULL )
	{
		//	Remove current destination
		if ( dest->asDestRoot == this )	dest->asDestRoot = destNext;
		if ( destPrev != NULL )			destPrev->destNext = destNext;
		if ( destNext != NULL )			destNext->destPrev = destPrev;
		destPrev = destNext = NULL;
		dest = NULL;
	}
	if ( link != NULL )
	{
		//	Connect new destination
		dest = link;
		destPrev = NULL;
		destNext = link->asDestRoot;
		if ( destNext != NULL )	destNext->destPrev = this;
		link->asDestRoot = this;
	}
}
/*-----------------------------------------------------------------------------
Function	SetDest
                                                                           
Description	Sets the destination link for the object.

Input		link			The link to connect to.

Returns		-
-----------------------------------------------------------------------------*/
Function        SetDest
Description     Sets the destination link for the object.

Input           link                    The link to connect to.

Returns
Function SetDest Description Sets the destination link for the object . Input link The link to connect to . Returns
void MeshLink::SetDest ( MeshLink *link )
{
	if ( dest != NULL )
	{
		if ( dest->asDestRoot == this )	dest->asDestRoot = destNext;
		if ( destPrev != NULL )			destPrev->destNext = destNext;
		if ( destNext != NULL )			destNext->destPrev = destPrev;
		destPrev = destNext = NULL;
		dest = NULL;
	}
	if ( link != NULL )
	{
		dest = link;
		destPrev = NULL;
		destNext = link->asDestRoot;
		if ( destNext != NULL )	destNext->destPrev = this;
		link->asDestRoot = this;
	}
}
void MeshLink :: SetDest ( MeshLink * link ) { if ( dest != NULL ) { if ( dest -> asDestRoot == this ) dest -> asDestRoot = destNext ; if ( destPrev != NULL ) destPrev -> destNext = destNext ; if ( destNext != NULL ) destNext -> destPrev = destPrev ; destPrev = destNext = NULL ; dest = NULL ; } if ( link != NULL ) { dest = link ; destPrev = NULL ; destNext = link -> asDestRoot ; if ( destNext != NULL ) destNext -> destPrev = this ; link -> asDestRoot = this ; } }
Function        SetDest
Description     Sets the destination link for the object.
Function SetDest Description Sets the destination link for the object .
//	Remove current destination //	Connect new destination