lib/PKFmanip.cpp
bool PKFmanip::readHeader(istream &in) {

  char tmp[1024];
  in.getline(tmp,sizeof tmp);

  // Header begin
  if(strncmp(tmp,"PKF 0.2",7)) {
    cerr << "ERROR : readkPKF() : Not in PKF 0.2 format!\n";
    return false;
  }
  in.getline(tmp,sizeof tmp);
  if(strncmp(tmp,"BIARC_KNOT",10)) {
    cerr << "Expected BIARC_KNOT. Only Biarc Format is supported.\n";
    return false;
  }
  _NameString    = setString(tmp+11);
  _EticString    = readString(in,"ETICL","ETIC");
  _CiteString    = readString(in,"CITEL","CITE");
  _HistoryString = readString(in,"HISTL","HIST");
  //Header End

  return true;
}
/*!
  Read the PKF header from a stream object \a in.
  Returns 1 if all is ok, 0 otherwise.
  More details about the PKF format are given in classes
  that inherit the PKFmanip class. I.e. Curve, CurveBundle ...

  \sa writeHeader()
*/
Read the PKF header from a stream object \a in.
Returns 1 if all is ok, 0 otherwise.
More details about the PKF format are given in classes
that inherit the PKFmanip class.

\sa writeHeader()
Read the PKF header from a stream object \ a in . Returns 1 if all is ok 0 otherwise . More details about the PKF format are given in classes that inherit the PKFmanip class . \ sa writeHeader ()
bool PKFmanip::readHeader(istream &in) {
  char tmp[1024];
  in.getline(tmp,sizeof tmp);
  if(strncmp(tmp,"PKF 0.2",7)) {
    cerr << "ERROR : readkPKF() : Not in PKF 0.2 format!\n";
    return false;
  }
  in.getline(tmp,sizeof tmp);
  if(strncmp(tmp,"BIARC_KNOT",10)) {
    cerr << "Expected BIARC_KNOT. Only Biarc Format is supported.\n";
    return false;
  }
  _NameString    = setString(tmp+11);
  _EticString    = readString(in,"ETICL","ETIC");
  _CiteString    = readString(in,"CITEL","CITE");
  _HistoryString = readString(in,"HISTL","HIST");
  return true;
}
bool PKFmanip :: readHeader ( istream & in ) { char tmp [ 1024 ] ; in . getline ( tmp , sizeof tmp ) ; if ( strncmp ( tmp , " " , 7 ) ) { cerr << " \n " ; return false ; } in . getline ( tmp , sizeof tmp ) ; if ( strncmp ( tmp , " " , 10 ) ) { cerr << " \n " ; return false ; } _NameString = setString ( tmp + 11 ) ; _EticString = readString ( in , " " , " " ) ; _CiteString = readString ( in , " " , " " ) ; _HistoryString = readString ( in , " " , " " ) ; return true ; }
Read the PKF header from a stream object \a in.
Read the PKF header from a stream object \ a in .
// Header begin //Header End