model_server/smt/src/smt_txt.cxx
// Output text value of the node to stream
Output text value of the node to stream
Output text value of the node to stream
static void pnode(const smtTree *t, ostream& s)
  {
   Initialize(pnode);
  if(t->type == SMT_token && t->tlth != 0 && t->extype != SMTT_el)
    {
    char * txt = new char[t->tlth+1];
    smtHeader * h = checked_cast(smtHeader,t->get_header());
    if(h)
      {
      strncpy(txt, &(h->srcbuf[t->tbeg]),t->tlth);
      txt[t->tlth] = 0;
      s << txt;
      }
    else msg("SMT: invalid tree - header not found") << eom;
    delete txt;
    }
  }
static void pnode ( const smtTree * t , ostream & s ) { Initialize ( pnode ) ; if ( t -> type == SMT_token && t -> tlth != 0 && t -> extype != SMTT_el ) { char * txt = new char [ t -> tlth + 1 ] ; smtHeader * h = checked_cast ( smtHeader , t -> get_header ( ) ) ; if ( h ) { strncpy ( txt , & ( h -> srcbuf [ t -> tbeg ] ) , t -> tlth ) ; txt [ t -> tlth ] = 0 ; s << txt ; } else msg ( " " ) << eom ; delete txt ; } }
Output text value of the node to stream
Output text value of the node to stream