(c) 2005--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
+
#include "cpu-timer.hh"
#include "global-context.hh"
#include "international.hh"
"process it and return the @code{Music_output} object in its final state.")
{
Global_context *g = dynamic_cast<Global_context *> (unsmob_context (context));
- SCM_ASSERT_TYPE (g, context, SCM_ARG1, __FUNCTION__, "Global context");
+
+ LY_ASSERT_FIRST_TYPE (unsmob_global_context, context)
SCM output = g->get_output ();
progress_indication ("\n");
"@var{global}. The translator group is returned.")
{
Global_context *g = dynamic_cast<Global_context *> (unsmob_context (global));
- SCM_ASSERT_TYPE (g, global, SCM_ARG1, __FUNCTION__, "Global context");
+ LY_ASSERT_FIRST_TYPE (unsmob_global_context, global)
Translator_group *tg = new Translator_group ();
tg->connect_to_context (g);
"The context is returned.\n"
)
{
- Output_def *odef = unsmob_output_def (output_def);
-
- SCM_ASSERT_TYPE (odef, output_def, SCM_ARG1, __FUNCTION__,
- "Output definition");
+ LY_ASSERT_FIRST_SMOB (Output_def, output_def);
+ Output_def *odef = unsmob_output_def (output_def);
Global_context *glob = new Global_context (odef);
"global context @var{ctx}. The context is returned in its\n"
"final state.\n")
{
- Music *music = unsmob_music (mus);
- Global_context *g = dynamic_cast<Global_context *> (unsmob_context (ctx));
- SCM_ASSERT_TYPE (music, mus, SCM_ARG1, __FUNCTION__, "Music");
- SCM_ASSERT_TYPE (g, ctx, SCM_ARG2, __FUNCTION__, "Global context");
+ LY_ASSERT_FIRST_SMOB (Music, mus);
+ LY_ASSERT_TYPE (unsmob_global_context, 2);
+ Music *music = unsmob_music (mus);
if (!music
|| !music->get_length ().to_bool ())
{
return SCM_BOOL_F;
}
+ Global_context *g = dynamic_cast<Global_context *> (unsmob_context (ctx));
+
Cpu_timer timer;
message (_ ("Interpreting music... "));
"Optionally, this routine takes an Object-key to\n"
"to uniquely identify the Score block containing it.\n")
{
+ LY_ASSERT_FIRST_SMOB (Music, mus);
+ LY_ASSERT_SMOB (Output_def, 2);
+
SCM glob = ly_make_global_context (output_def);
ly_make_global_translator (glob);
ly_interpret_music_expression (mus, glob);