void PrinterVisitor::
beginVisitOrderByForVariable( ForVarIter_t inputVar,
                              vector<PlanIter_t> const &varRefs ) {
  thePrinter.startBeginVisit( "OrderByForVariable", theId );

  ostringstream iv_s;
  iv_s << inputVar->getVarName()->getStringValue() << " : ";
  if ( !Properties::instance().getNoTreeIDs() )
    iv_s << inputVar.getp();

  string const ref_s( var_refs( varRefs ) );
  thePrinter.addAttribute( "inputVar", iv_s.str() );
  if ( !Properties::instance().getNoTreeIDs() )
    thePrinter.addAttribute( "referenced-by", ref_s );

  thePrinter.endBeginVisit( theId );
}
void PrinterVisitor::
beginVisitOrderByForVariable( ForVarIter_t inputVar,
                              vector<PlanIter_t> const &varRefs ) {
  thePrinter.startBeginVisit( "OrderByForVariable", theId );

  ostringstream iv_s;
  iv_s << inputVar->getVarName()->getStringValue();

  if ( !Properties::instance().getNoTreeIDs() )
  {
#ifndef NDEBUG
    if ( Properties::instance().getStableIteratorIDs() )
      iv_s << " : " << inputVar->getId();
    else
#endif
      iv_s << " : " << inputVar.getp();

    printVarRefs( "referenced-by", varRefs );
  }

  thePrinter.addAttribute( "inputVar", iv_s.str() );

  thePrinter.endBeginVisit( theId );
}