]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/music.hh
Issue 4997/3: Use Preinit in Music
[lilypond.git] / lily / include / music.hh
index 8cb69d0700b724e91f7b62f51d12074f86ec7caa..32ca55babcdfaa9deff2d17706728d0f8e529961 100644 (file)
 
 #define is_mus_type(x) internal_is_music_type (ly_symbol2scm (x))
 
-class Music : public Prob
+class Music : public Preinit<Music>, public Prob
 {
 public:
+  void pre_init ();
   Music (SCM init);
   Music (Music const &m);
   VIRTUAL_COPY_CONSTRUCTOR (Music, Music);
@@ -47,15 +48,6 @@ public:
   Moment get_length () const;
   Moment start_mom () const;
   void print () const;
-  static Music *unsmob (SCM m) {
-    return dynamic_cast <Music *> (Prob::unsmob (m));
-  }
-  static bool is_smob (SCM m) {
-    return Prob::is_smob (m) && unsmob (m);
-  }
-
-  /// Transpose, with the interval central C to #p#
-  void transpose (Pitch p);
 
   /// Scale the music in time by #factor#.
   void compress (Moment factor);
@@ -76,12 +68,11 @@ protected:
 };
 
 Music *make_music_by_name (SCM sym);
-SCM ly_music_deep_copy (SCM);
+SCM music_deep_copy (SCM m);
+void set_origin (SCM m, SCM origin);
+
 SCM ly_camel_case_2_lisp_identifier (SCM name_sym);
 
 extern SCM ly_music_p_proc;
 
-/* common transposition function for music and event */
-void transpose_mutable (SCM alist, Pitch delta);
-
 #endif /* MUSIC_HH */