int ClusterLink::GetMetric(void) const { int metric = 0; Endpoint::Ptr fromEp = Endpoint::GetByName(From); if (fromEp) metric += fromEp->GetMetric(); Endpoint::Ptr toEp = Endpoint::GetByName(To); if (toEp) metric += toEp->GetMetric(); return metric; }