// toy export filter.

#include "toy/exporter.H"

namespace toy {
  void exporter::init(class xrml::file* file_handle)
  {
    fh = file_handle;  // save private copy of the file handle
    // fh is declared already as a member of xrml::exporter.
  }

  void exporter::save(class xrml::world* wrl)
  {
    fh->printf("Toy export filter output");
    fh->indent();
    fh->newline(); // prints new line + spaces according to indentation level, see file.H
    fh->printf("indented: here's a string '%s', and a number %d",
	      "hi hi", 42);
    fh->outdent();
    fh->newline();
    fh->printf("indentation undone");
    fh->newline();
  }
}
