]> git.donarmstrong.com Git - lilypond.git/commitdiff
Manual cleanup after unsmob_xxx -> Xxx:unsmob conversion
authorDavid Kastrup <dak@gnu.org>
Sun, 27 Jul 2014 14:24:57 +0000 (16:24 +0200)
committerDavid Kastrup <dak@gnu.org>
Sat, 2 Aug 2014 14:52:58 +0000 (16:52 +0200)
13 files changed:
Documentation/contributor/programming-work.itexi
lily/include/engraver.hh
lily/include/global-context.hh
lily/include/grob.hh
lily/include/input.hh
lily/include/item.hh
lily/include/music-output.hh
lily/include/music.hh
lily/include/paper-score.hh
lily/include/performance.hh
lily/include/performer.hh
lily/include/spanner.hh
lily/include/stream-event.hh

index 447f553ea4cf2b1f57e5c736f4794aee06392112..a02910b768f1af603cc4508b46c9e92efb379327 100644 (file)
@@ -2149,7 +2149,7 @@ Test whether the type of @var{s} is [type].
 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
index 76da2049a8a95448bedac406faa9b71d909b3186..2cb28292fc30290c029744893dfa89caaf7ff7d4 100644 (file)
@@ -65,13 +65,13 @@ public:
      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
index 28a89b25d301a07f0b1dbb3a234679e1459521ea..31e2190bc21c22dbb08d458774c4982f8fecdb1d 100644 (file)
@@ -48,6 +48,8 @@ public:
   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_;
@@ -55,6 +57,5 @@ protected:
 };
 
 SCM ly_format_output (SCM);
-Global_context *Global_context::unsmob (SCM x);
 
 #endif // GLOBAL_CONTEXT_HH
index bac9538a8530d0f26384afb5b3c239529f9d9dd3..2aec0fa90906c482188a6a17597af8afda7dbd26 100644 (file)
@@ -171,10 +171,6 @@ public:
   static SCM internal_skylines_from_element_stencils (SCM, Axis);
 };
 
-/* smob utilities */
-Spanner *Spanner::unsmob (SCM);
-Item *Item::unsmob (SCM);
-
 /* unification */
 void uniquify (vector <Grob *> &);
 
index 5b0641ef6e43520d00c0ece82afc60c4aae5188b..5a2992fdbe2ae54efb936ad5614989e7c07e500b 100644 (file)
@@ -21,6 +21,7 @@
 #define INPUT_HH
 
 #include "lily-proto.hh"
+#include "smobs.hh"
 
 /**
    Base class for anything that records its poisition in the parse file.
@@ -35,6 +36,8 @@ public:
   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;
@@ -66,10 +69,7 @@ protected:
   string message_string (const string &msg) const;
 };
 
-#include "smobs.hh"
-
 SCM make_input (Input spot);
-Input *Input::unsmob (SCM);
 
 extern Input dummy_input_global;
 
index bae549594cecf1976ee4f14ef2eb0c105d30d5df..ac945eac413527b926defcdef5e66b514465f88a 100644 (file)
@@ -36,6 +36,8 @@ public:
   Item (SCM);
   Item (Item const &);
 
+  static Item *unsmob (SCM);
+
   virtual Grob *clone () const;
 
   static bool is_non_musical (Grob *);
index 836233f7d1c880c6c01d047fd682d8d23af9ebbc..73d2ac94c6f50733e8bef9bbb3abf79aaa36a264 100644 (file)
@@ -38,6 +38,4 @@ public:
   virtual void process ();
 };
 
-Paper_score *Paper_score::unsmob (SCM);
-Performance *Performance::unsmob (SCM);
 #endif /* MUSIC_OUTPUT_HH */
index 0774fac255948c5c0ba337819cae0695e9f075a5..e59f82c758f6a26d408a275c414298bb881f8d80 100644 (file)
@@ -47,6 +47,7 @@ public:
   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);
@@ -69,7 +70,6 @@ protected:
   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);
index c44634b2c9b5117f4e1747dfc8b365714897317c..05933d49f39ca8e20f1a506301131899a4a63e74 100644 (file)
@@ -39,6 +39,8 @@ public:
 
   DECLARE_CLASSNAME (Paper_score);
 
+  static Paper_score *unsmob (SCM);
+
   Output_def *layout () const;
   System *root_system () const;
 
index 8b5de863319365ba66070d9826d825aa6c3e1602..f3093f82c5060699bddb979a5aa0f7e428c735dc 100644 (file)
@@ -31,6 +31,8 @@ public:
   ~Performance ();
   DECLARE_CLASSNAME (Performance);
 
+  static Performance *unsmob (SCM);
+
   void add_element (Audio_element *p);
   virtual void process ();
   void remap_grace_durations ();
index bf40ea0fa5258ce0001dd05f3d76bbede9598f66..aa9b098d34d3e478dbd6343c373f288b87309d98 100644 (file)
@@ -33,6 +33,7 @@ public:
   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);
@@ -40,7 +41,5 @@ protected:
   virtual void create_audio_elements ();
 };
 
-Performer *Performer::unsmob (SCM perf);
-
 #endif /* PERFORMER_HH */
 
index 40b3473dcaef4046886decbc27e2852db8d9d707..b56cc2264de02372fa8ae4f41fc7881bd73f8a75 100644 (file)
@@ -52,6 +52,8 @@ public:
   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;
index cba4611c309fcbdbe6211171c21cde4354acf21b..14a8af41dca73f2559765398d227a04445163afa 100644 (file)
@@ -30,6 +30,8 @@ public:
   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 *);
 
@@ -46,7 +48,6 @@ public:
 
 #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 */