often than not, the code checks Lilypond specific C++-implemented
types using
-@subsubheading [type *] unsmob_[type] (SCM s)
+@subsubheading [Type *] Type::unsmob (SCM s)
This tries converting a Scheme object to a pointer of the desired
kind. If the Scheme object is of the wrong type, a pointer value
override other ctor
*/
TRANSLATOR_DECLARATIONS (Engraver);
+ static Engraver *unsmob (SCM eng);
};
#define make_item(x, cause) internal_make_item (ly_symbol2scm (x), cause, x, __FILE__, __LINE__, __FUNCTION__)
#define make_spanner(x, cause) internal_make_spanner (ly_symbol2scm (x), cause, x, __FILE__, __LINE__, __FUNCTION__)
#define make_paper_column(x) internal_make_column (ly_symbol2scm (x), x, __FILE__, __LINE__, __FUNCTION__)
-Engraver *Engraver::unsmob (SCM eng);
bool ly_is_grob_cause (SCM obj);
#endif // ENGRAVER_HH
virtual Moment now_mom () const;
virtual Context *get_default_interpreter (const string &context_id = "");
+ static Global_context *unsmob (SCM x);
+
Moment previous_moment () const;
protected:
Moment prev_mom_;
};
SCM ly_format_output (SCM);
-Global_context *Global_context::unsmob (SCM x);
#endif // GLOBAL_CONTEXT_HH
static SCM internal_skylines_from_element_stencils (SCM, Axis);
};
-/* smob utilities */
-Spanner *Spanner::unsmob (SCM);
-Item *Item::unsmob (SCM);
-
/* unification */
void uniquify (vector <Grob *> &);
#define INPUT_HH
#include "lily-proto.hh"
+#include "smobs.hh"
/**
Base class for anything that records its poisition in the parse file.
char const *start () const;
char const *end () const;
+ static Input *unsmob (SCM);
+
void set (Source_file *, char const *, char const *);
void error (const string&) const;
void programming_error (const string&) const;
string message_string (const string &msg) const;
};
-#include "smobs.hh"
-
SCM make_input (Input spot);
-Input *Input::unsmob (SCM);
extern Input dummy_input_global;
Item (SCM);
Item (Item const &);
+ static Item *unsmob (SCM);
+
virtual Grob *clone () const;
static bool is_non_musical (Grob *);
virtual void process ();
};
-Paper_score *Paper_score::unsmob (SCM);
-Performance *Performance::unsmob (SCM);
#endif /* MUSIC_OUTPUT_HH */
Moment get_length () const;
Moment start_mom () const;
void print () const;
+ static Music *unsmob (SCM);
/// Transpose, with the interval central C to #p#
void transpose (Pitch p);
friend SCM ly_extended_make_music (SCM, SCM);
};
-Music *Music::unsmob (SCM);
Music *make_music_by_name (SCM sym);
SCM ly_music_deep_copy (SCM);
SCM ly_camel_case_2_lisp_identifier (SCM name_sym);
DECLARE_CLASSNAME (Paper_score);
+ static Paper_score *unsmob (SCM);
+
Output_def *layout () const;
System *root_system () const;
~Performance ();
DECLARE_CLASSNAME (Performance);
+ static Performance *unsmob (SCM);
+
void add_element (Audio_element *p);
virtual void process ();
void remap_grace_durations ();
VIRTUAL_COPY_CONSTRUCTOR (Translator, Performer);
friend class Performer_group;
Performer_group *get_daddy_performer () const;
+ static Performer *unsmob (SCM perf);
protected:
virtual void announce_element (Audio_element_info);
virtual void create_audio_elements ();
};
-Performer *Performer::unsmob (SCM perf);
-
#endif /* PERFORMER_HH */
DECLARE_SCHEME_CALLBACK (bounds_width, (SCM));
DECLARE_SCHEME_CALLBACK (kill_zero_spanned_time, (SCM));
+ static Spanner *unsmob (SCM);
+
vector<Spanner *> broken_intos_;
vsize get_break_index () const;
Stream_event ();
VIRTUAL_COPY_CONSTRUCTOR (Stream_event, Stream_event);
+ static Stream_event *unsmob (SCM);
+
Stream_event (SCM event_class, SCM immutable_props = SCM_EOL);
Stream_event (SCM class_name, Input *);
#define in_event_class(class_name) internal_in_event_class (ly_symbol2scm (class_name))
-Stream_event *Stream_event::unsmob (SCM);
SCM ly_event_deep_copy (SCM);
#endif /* STREAM_EVENT_HH */