/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2004--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Copyright (C) 2004--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
}
}
-Context::Context (Context const & /* src */)
-{
- assert (false);
-}
-
Scheme_hash_table *
Context::properties_dict () const
{
}
int
-Context::print_smob (SCM s, SCM port, scm_print_state *)
+Context::print_smob (SCM port, scm_print_state *)
{
- Context *sc = (Context *) SCM_CELL_WORD_1 (s);
-
scm_puts ("#<", port);
- scm_puts (sc->class_name (), port);
- if (Context_def *d = Context_def::unsmob (sc->definition_))
+ scm_puts (class_name (), port);
+ if (Context_def *d = Context_def::unsmob (definition_))
{
scm_puts (" ", port);
scm_display (d->get_context_name (), port);
}
- if (!sc->id_string_.empty ())
+ if (!id_string_.empty ())
{
scm_puts ("=", port);
- scm_puts (sc->id_string_.c_str (), port);
+ scm_puts (id_string_.c_str (), port);
}
scm_puts (" ", port);
- scm_display (sc->context_list_, port);
+ scm_display (context_list_, port);
scm_puts (" >", port);
return 1;
{
SCM l = context->get_property ("measureLength");
Rational length (1);
- if (Moment::unsmob (l))
+ if (Moment::is_smob (l))
length = Moment::unsmob (l)->main_part_;
return length;
}
SCM sm = context->get_property ("measurePosition");
Moment m = 0;
- if (Moment::unsmob (sm))
+ if (Moment::is_smob (sm))
{
m = *Moment::unsmob (sm);