]> git.donarmstrong.com Git - lilypond.git/blob - lily/translator-scheme.cc
* The grand 2005-2006 replace.
[lilypond.git] / lily / translator-scheme.cc
1 /*
2   translator-scheme.cc -- implement Scheme context functions
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2002--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
8
9 #include "context-def.hh"
10 #include "translator-group.hh"
11 #include "moment.hh"
12
13 LY_DEFINE (ly_translator_name, "ly:translator-name",
14            1, 0, 0, (SCM trans),
15            "Return the type name of the translator object @var{trans}. "
16            "The name is a symbol.")
17 {
18   Translator *tr = unsmob_translator (trans);
19   SCM_ASSERT_TYPE (tr, trans, SCM_ARG1, __FUNCTION__, "Translator");
20   char const *nm = tr->class_name ();
21   return ly_symbol2scm (nm);
22 }
23
24 LY_DEFINE (ly_translator_description, "ly:translator-description",
25            1, 0, 0, (SCM me),
26            "Return an alist of properties of  translator @var{me}.")
27 {
28   Translator *tr = unsmob_translator (me);
29   SCM_ASSERT_TYPE (tr, me, SCM_ARG1, __FUNCTION__, "Translator");
30   return tr->translator_description ();
31 }
32