source file of the GNU LilyPond music typesetter
- (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
-
#ifndef PAPER_OUTPUTTER_HH
#define PAPER_OUTPUTTER_HH
#include "lily-proto.hh"
-#include "array.hh"
-#include "string.hh"
+#include "std-vector.hh"
+#include "std-string.hh"
+#include "protected-scm.hh"
+#include "smobs.hh"
-/**
- Abstract interface for a Score_element to output itself.
- */
+/*
+ Glue between the backend (grobs, systems, pages) and the output file.
+ proxy for Scheme backends.
+*/
class Paper_outputter
{
+ SCM output_module_;
+ string file_name_;
+ SCM file_;
+
public:
- Paper_outputter (Paper_stream *);
- virtual ~Paper_outputter ();
-
- virtual void output_molecule (Molecule const *, Offset, char const *)=0;
- void output_molecule (Molecule const *, Offset, char const *, String);
- virtual void start_line ()=0;
- virtual void stop_line ()=0;
- virtual void switch_to_font (String fontname)=0;
-
- Array<String> font_arr_;
- String current_font_;
- Paper_stream* outstream_l_;
+ DECLARE_SMOBS (Paper_outputter);
+
+public:
+ SCM file () const;
+ SCM dump_string (SCM);
+ void output_scheme (SCM scm);
+ Paper_outputter (SCM port, string format);
+ SCM scheme_to_string (SCM);
+ void output_stencil (Stencil);
+ void close ();
};
-#endif // PAPER_OUTPUTTER_HH
+Paper_outputter *get_paper_outputter (string, string);
+DECLARE_UNSMOB (Paper_outputter, outputter);
+
+#endif /* PAPER_OUTPUTTER_HH */