#include <map>
-map<void *, string> type_names;
+map<void *, string> type_names;
void
ly_add_type_predicate (void *ptr,
}
/* type predicates. */
-#include "spanner.hh"
+#include "global-context.hh"
+#include "input.hh"
#include "item.hh"
#include "music.hh"
#include "music-function.hh"
-#include "performance.hh"
#include "paper-score.hh"
-#include "global-context.hh"
-#include "input.hh"
+#include "performance.hh"
+#include "spanner.hh"
+#include "stream-event.hh"
void
init_func_doc ()
ly_add_type_predicate ((void*) &unsmob_item, "Item");
ly_add_type_predicate ((void*) &unsmob_music, "Music");
ly_add_type_predicate ((void*) &unsmob_spanner, "Spanner");
+ ly_add_type_predicate ((void*) &unsmob_stream_event, "Stream_event");
}
ADD_SCM_INIT_FUNC (func_doc, init_func_doc);
#include "stream-event.hh"
+LY_DEFINE (ly_stream_event_p, "ly:stream-event?",
+ 1, 0, 0, (SCM obj),
+ "Is @code{@var{obj}} a @code{Stream_event} object?")
+{
+ return scm_from_bool (unsmob_stream_event (obj));
+}
+
LY_DEFINE (ly_make_stream_event, "ly:make-stream-event",
1, 1, 0, (SCM cl, SCM proplist),
"Create a stream event of class @var{cl} with the given"
"Get the property @var{sym} of stream event @var{mus}."
" If @var{sym} is undefined, return @code{'()}.")
{
- LY_ASSERT_SMOB (Stream_event, sev, 1);
+ LY_ASSERT_TYPE (unsmob_stream_event, sev, 1);
LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
Stream_event *e = unsmob_stream_event (sev);
3, 0, 0, (SCM ev, SCM sym, SCM val),
"Set property @var{sym} in event @var{ev} to @var{val}.")
{
- LY_ASSERT_SMOB (Stream_event, ev, 1);
+ LY_ASSERT_TYPE (unsmob_stream_event, ev, 1);
LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
return ly_prob_set_property_x (ev, sym, val);
return scm_c_memq (class_name, cl) != SCM_BOOL_F;
}
-IMPLEMENT_TYPE_P (Stream_event, "ly:stream-event?");
-
MAKE_SCHEME_CALLBACK (Stream_event, undump, 1);
MAKE_SCHEME_CALLBACK (Stream_event, dump, 1);