if (Score *score = unsmob_score (scm_car (s)))
{
SCM outputs = score
- ->book_rendering (paper_book->paper_, default_layout, key);
+ ->book_rendering (paper_book->paper_, default_layout);
while (scm_is_pair (outputs))
{
}
Context *
-Context_def::instantiate (SCM ops, Object_key const *key)
+Context_def::instantiate (SCM ops)
{
- Context *context = new Context (key);
+ Context *context = new Context ();
context->definition_ = self_scm ();
context->definition_mods_ = ops;
Context::Context (Context const &src)
{
+ (void) src;
assert (false);
}
}
-Context::Context (Object_key const *key)
+Context::Context ()
{
daddy_context_ = 0;
aliases_ = SCM_EOL;
SCM ops = ev->get_property ("ops");
SCM type_scm = ev->get_property ("type");
string type = ly_symbol2string (type_scm);
- Object_key const *key = 0;
vector<Context_def*> path
= unsmob_context_def (definition_)->path_to_acceptable_context (type_scm, get_output_def ());
}
Context_def *cdef = path[0];
- Context *new_context = cdef->instantiate (ops, key);
+ Context *new_context = cdef->instantiate (ops);
new_context->id_string_ = id;
(void) file;
(void) fun;
(void) line;
+ (void) name;
SCM props = updated_grob_properties (context (), symbol);
}
LY_DEFINE (ly_make_global_context, "ly:make-global-context",
- 1, 1, 0, (SCM output_def, SCM key),
+ 1, 0, 0, (SCM output_def),
"Set up a global interpretation context, using the output\n"
"block @var{output_def}.\n"
"The context is returned.\n"
-
- "\n\nOptionally, this routine takes an Object-key to\n"
- "to uniquely identify the Score block containing it.\n")
+ )
{
Output_def *odef = unsmob_output_def (output_def);
SCM_ASSERT_TYPE (odef, output_def, SCM_ARG1, __FUNCTION__,
"Output definition");
- Global_context *glob = new Global_context (odef, unsmob_key (key));
+ Global_context *glob = new Global_context (odef);
if (!glob)
{
}
LY_DEFINE (ly_run_translator, "ly:run-translator",
- 2, 1, 0, (SCM mus, SCM output_def, SCM key),
+ 2, 1, 0, (SCM mus, SCM output_def),
"Process @var{mus} according to @var{output_def}. \n"
"An interpretation context is set up,\n"
"and @var{mus} is interpreted with it. \n"
"Optionally, this routine takes an Object-key to\n"
"to uniquely identify the Score block containing it.\n")
{
- SCM glob = ly_make_global_context (output_def, key);
+ SCM glob = ly_make_global_context (output_def);
ly_make_global_translator (glob);
ly_interpret_music_expression (mus, glob);
return glob;
#include "output-def.hh"
#include "warn.hh"
-Global_context::Global_context (Output_def *o, Object_key *key)
- : Context (new Lilypond_context_key (key,
- Moment (0),
- "Global", "", 0))
+Global_context::Global_context (Output_def *o)
+ : Context ()
{
output_def_ = o;
definition_ = find_context_def (o, ly_symbol2scm ("Global"));
vector<Context_def*> path_to_acceptable_context (SCM type_string,
Output_def *) const;
- Context *instantiate (SCM extra_ops, Object_key const *);
+ Context *instantiate (SCM extra_ops);
SCM to_alist () const;
static SCM make_scm ();
SCM definition_;
/* Additions to the Context_def, given by \with */
SCM definition_mods_;
- // Context_key_manager key_manager_;
SCM properties_scm_;
SCM context_list_;
friend class Context_def;
// UGH! initialises implementation_
friend SCM ly_make_global_translator (SCM);
- void clear_key_disambiguations ();
DECLARE_LISTENER (set_property_from_event);
DECLARE_LISTENER (unset_property_from_event);
public:
- Object_key const *get_grob_key (string name);
- Object_key const *get_context_key (string name, string id);
-
string id_string () const { return id_string_; }
SCM children_contexts () const { return context_list_; }
SCM default_child_context_name () const;
Translator_group *implementation () const { return implementation_; }
Context *get_parent_context () const;
- Context (Object_key const *);
+ Context ();
/* properties: */
SCM internal_get_property (SCM name_sym) const;
friend class Output_def;
public:
- Global_context (Output_def *, Object_key *key);
+ Global_context (Output_def *);
int get_moments_left () const;
Moment sneaky_insert_extra_moment (Moment);
void add_moment_to_process (Moment);
SCM get_music () const;
void add_output_def (Output_def *def);
void set_music (SCM music);
- SCM book_rendering (Output_def *, Output_def *, Object_key *);
+ SCM book_rendering (Output_def *, Output_def *);
};
DECLARE_UNSMOB (Score, score);
SCM ly_render_output (SCM, SCM);
-SCM ly_run_translator (SCM, SCM, SCM);
+SCM ly_run_translator (SCM, SCM);
#endif /* SCORE_HH */
}
LY_DEFINE (ly_score_embedded_format, "ly:score-embedded-format",
- 2, 1, 0, (SCM score, SCM layout, SCM key),
+ 2, 0, 0, (SCM score, SCM layout),
"Run @var{score} through @var{layout}, an output definition, "
"scaled to correct output-scale already, "
"return a list of layout-lines. "
itself. */
score_def->parent_ = od;
- SCM context = ly_run_translator (sc->get_music (), score_def->self_scm (),
- key);
+ SCM context = ly_run_translator (sc->get_music (), score_def->self_scm ());
SCM output = ly_format_output (context);
scm_remember_upto_here_1 (prot);
*/
SCM
Score::book_rendering (Output_def *layoutbook,
- Output_def *default_def,
- Object_key *book_key)
+ Output_def *default_def)
{
if (error_found_)
return SCM_EOL;
int outdef_count = defs_.size ();
- Object_key *key = new Lilypond_general_key (book_key, user_key_, 0);
- SCM scm_key = key->unprotect ();
-
for (int i = 0; !i || i < outdef_count; i++)
{
Output_def *def = outdef_count ? defs_[i] : default_def;
}
/* TODO: fix or junk --no-layout. */
- SCM context = ly_run_translator (music_, def->self_scm (), scm_key);
+ SCM context = ly_run_translator (music_, def->self_scm ());
if (dynamic_cast<Global_context *> (unsmob_context (context)))
{
SCM s = ly_format_output (context);
scm_remember_upto_here_1 (scaled);
}
- scm_remember_upto_here_1 (scm_key);
scm_remember_upto_here_1 (scaled_bookdef);
return outputs;
}