Public Member Functions | Protected Member Functions
Group2PhaseReader Class Reference

Brief description of class still missing. More...

#include <Group2PhaseReader.h>

Inheritance diagram for Group2PhaseReader:
QGpCoreTools::ArgumentStdinReader

List of all members.

Public Member Functions

 Group2PhaseReader ()
bool setOptions (int &argc, char **argv)

Protected Member Functions

virtual bool parse (QTextStream &s)

Detailed Description

Brief description of class still missing.

Full description of class still missing


Constructor & Destructor Documentation

Description of constructor still missing

References TRACE.


Member Function Documentation

bool Group2PhaseReader::parse ( QTextStream &  s) [protected, virtual]

Implements QGpCoreTools::ArgumentStdinReader.

References QGpCoreTools::Curve< pointType >::append(), QGpCoreTools::Point2D::fromString(), sOut(), and TRACE.

{
  TRACE;
  QTextStream sOut(stdout);
  Curve<Point2D> curve;
  Point2D p;
  QString buf;
  buf=s.readLine();
  while(!s.atEnd() && buf[0]!='\n' && buf[0]!='#') {
    p.fromString(buf);
    curve.append(p);
    buf=s.readLine();
  }
  scanCurve(curve);
  return true;
}
bool Group2PhaseReader::setOptions ( int &  argc,
char **  argv 
)

References QGpCoreTools::endl(), QGpCoreTools::tr(), and TRACE.

Referenced by main().

{
  TRACE;
  // Check arguments
  int i, j=1;
  for(i=1; i<argc; i++) {
    QByteArray arg=argv[i];
    if(arg[0]=='-') {
      App::stream() << tr("gpgroup2phase: bad option %1, see -help").arg(argv[i]) << endl;
      return false;
    } else {
      argv[j++]=argv[i];
    }
  }
  if(j < argc) {
    argv[j]=0;
    argc=j;
  }
  return true;
}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines