src/libYARP_OS/src/mesh.cpp
MeshLink *Mesh::AddLink ( const YARPString& label, const YARPString& srcLabel, const YARPString& destLabel )
{
	int
		success = 0;
	MeshLink
		*link,
		*srcLink,
		*destLink;

	link = LabelledLink ( label );
	srcLink = LabelledLink ( srcLabel );
	destLink = LabelledLink ( destLabel );

	if ( autoClear == -1 )
	{
		autoClear = 1;
	}

	if ( link != NULL )
	{
		link->SetSource ( srcLink );
		link->SetDest ( destLink );
		success = 1;
	}

	return success ? link : (MeshLink *) NULL;
}
/*-----------------------------------------------------------------------------
Function	AddLink
                                                                           
Description	Adds a new link to the mesh

Input		label			The name of the new link
			srcLabel		The label of the link to use as its source
			destLabel		The label of the link to use as its destination

Returns		A pointer to the new link if it was created successfully,
			otherwise NULL.
			If any of the links named already exist, their current
            definition is used.
-----------------------------------------------------------------------------*/
Function        AddLink
Description     Adds a new link to the mesh

Input           label                   The name of the new link
srcLabel                The label of the link to use as its source
destLabel               The label of the link to use as its destination

Returns         A pointer to the new link if it was created successfully,
otherwise NULL.
If any of the links named already exist, their current
definition is used.
Function AddLink Description Adds a new link to the mesh Input label The name of the new link srcLabel The label of the link to use as its source destLabel The label of the link to use as its destination Returns A pointer to the new link if it was created successfully otherwise NULL . If any of the links named already exist their current definition is used .
MeshLink *Mesh::AddLink ( const YARPString& label, const YARPString& srcLabel, const YARPString& destLabel )
{
	int
		success = 0;
	MeshLink
		*link,
		*srcLink,
		*destLink;
	link = LabelledLink ( label );
	srcLink = LabelledLink ( srcLabel );
	destLink = LabelledLink ( destLabel );
	if ( autoClear == -1 )
	{
		autoClear = 1;
	}
	if ( link != NULL )
	{
		link->SetSource ( srcLink );
		link->SetDest ( destLink );
		success = 1;
	}
	return success ? link : (MeshLink *) NULL;
}
MeshLink * Mesh :: AddLink ( const YARPString & label , const YARPString & srcLabel , const YARPString & destLabel ) { int success = 0 ; MeshLink * link , * srcLink , * destLink ; link = LabelledLink ( label ) ; srcLink = LabelledLink ( srcLabel ) ; destLink = LabelledLink ( destLabel ) ; if ( autoClear == -1 ) { autoClear = 1 ; } if ( link != NULL ) { link -> SetSource ( srcLink ) ; link -> SetDest ( destLink ) ; success = 1 ; } return success ? link : ( MeshLink * ) NULL ; }
Function        AddLink
Description     Adds a new link to the mesh
Function AddLink Description Adds a new link to the mesh