X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fpaper-outputter.hh;h=6779e1d942197575e2422c8a6b2d3d5a22d302e8;hb=8cab78caa0db1ba14f2e52e4c1ddbb541ea0e5cb;hp=4f2ea7b4cc0d8f4f517a07d3fc6e0abac701a2c4;hpb=6f28237e24268c76147ba3e9d8619316a4b4b4fb;p=lilypond.git diff --git a/lily/include/paper-outputter.hh b/lily/include/paper-outputter.hh index 4f2ea7b4cc..6779e1d942 100644 --- a/lily/include/paper-outputter.hh +++ b/lily/include/paper-outputter.hh @@ -3,48 +3,42 @@ source file of the GNU LilyPond music typesetter - (c) 1997--2004 Han-Wen Nienhuys + (c) 1997--2009 Han-Wen Nienhuys */ - #ifndef PAPER_OUTPUTTER_HH #define PAPER_OUTPUTTER_HH #include "lily-proto.hh" -#include "array.hh" -#include "string.hh" -#include "lily-guile.hh" +#include "std-vector.hh" +#include "std-string.hh" #include "protected-scm.hh" +#include "smobs.hh" -/** - Interface for a Grob to output itself; The Paper_score contains a - pointer to a Paper_outputter, and this enables every grob to output - itself. - - The Paper_outputter contains a reference to an output stream - (Paper_stream). */ - +/* + Glue between the backend (grobs, systems, pages) and the output file. + proxy for Scheme backends. +*/ class Paper_outputter { - bool verbatim_scheme_b_; + SCM output_module_; + string file_name_; + SCM file_; + public: + DECLARE_SMOBS (Paper_outputter); - SCM output_func_; - SCM output_module_; - Protected_scm file_; - - String basename_; - Paper_outputter (String nm); - ~Paper_outputter (); - - void dump_scheme (SCM); - - void output_metadata (Paper_def*, SCM); - void output_music_output_def (Music_output_def* odef); +public: + SCM file () const; + SCM dump_string (SCM); void output_scheme (SCM scm); - void output_expr (SCM expr, Offset o); - void output_header (Paper_def*, SCM, int); - void output_line (SCM, Offset*, bool); + Paper_outputter (SCM port, string format); + SCM scheme_to_string (SCM); + void output_stencil (Stencil); + void close (); }; +Paper_outputter *get_paper_outputter (string, string); +DECLARE_UNSMOB (Paper_outputter, outputter); + #endif /* PAPER_OUTPUTTER_HH */