コード例 #1
0
Visitor::VisitResult RefFinderVisitor::visit(QRElementPtr caller)
{
  // Elements that don't reference other elements, should reference 
  // themselves (the default value).
  if (caller->getRef() == "")
    return VR_Continue;

  QRElementPtr elem = descDetails_->getElementForID(caller->getRef());
  assertLogAndThrow(CAT_MATCHTST_MVDETAILS, LL_MVQR_FAIL, 
                    elem != NULL, QRLogicException, 
		    "Element is referencing a non-existing element.");
  caller->setReferencedElement(elem);

  return VR_Continue;
}