2 translator-scheme.cc -- implement Scheme context functions
4 source file of the GNU LilyPond music typesetter
6 (c) 2002--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
9 #include "context-def.hh"
10 #include "translator-group.hh"
13 LY_DEFINE (ly_translator_name, "ly:translator-name",
15 "Return the type name of the translator object @var{trans}. "
16 "The name is a symbol.")
18 LY_ASSERT_SMOB (Translator, trans, 1);
19 Translator *tr = unsmob_translator (trans);
20 char const *nm = tr->class_name ();
21 return ly_symbol2scm (nm);
24 LY_DEFINE (ly_translator_description, "ly:translator-description",
26 "Return an alist of properties of translator @var{me}.")
28 LY_ASSERT_SMOB (Translator, me, 1);
29 Translator *tr = unsmob_translator (me);
30 return tr->translator_description ();