The DejaVU Framework -- hush 3.0
[.] Papers Tutorials Examples Manuals Interfaces Sources Packages Resources ?

include: runner.h hush-3.1/grammar/grammar


[.] - [up] [top] - index make include slides talks
  ifndef RUNNER_H
  define RUNNER_H
  
  include <grammar/string.h>
  include <grammar/converter.h>
  include <grammar/attribute.h>
  
  

runner


  class runner {
  public:
  runner(char *s, runner *x = 0) : str(s), _runner(x) { }
  virtual void process(attribute& p) { }
  virtual void run() {
          string_converter cv(str);
          for( int i = 1; i <= cv.argc(); i++ ) {
                  attribute p( cv[i] );
                  self()->process(p);
                  }
          }
  virtual void execute(ostream&) { }
  virtual int operator()(ostream& out) {
          self()->run(); 
          self()->execute(out);
          return 1;
          }
  
  virtual runner* self() { return _runner?_runner:this; }
  
  private:
  char* str;
  runner* _runner;
  };

slide: runner

          
  endif
  

[.] Papers Tutorials Examples Manuals Interfaces Sources Packages Resources ?
Hush Online Technology
hush@cs.vu.nl
11/03/98