clean up lua-class inheritance
Implicit casts of derived classes only work for the first parent. other parent classes require dedicated casts
This commit is contained in:
parent
04c9b3155c
commit
ab01d150be
@ -151,6 +151,7 @@ LuaBindings::common (lua_State* L)
|
|||||||
.endClass ()
|
.endClass ()
|
||||||
|
|
||||||
.deriveWSPtrClass <PBD::Controllable, PBD::StatefulDestructible> ("Controllable")
|
.deriveWSPtrClass <PBD::Controllable, PBD::StatefulDestructible> ("Controllable")
|
||||||
|
.addFunction ("name", &PBD::Controllable::name)
|
||||||
.addFunction ("get_value", &PBD::Controllable::get_value)
|
.addFunction ("get_value", &PBD::Controllable::get_value)
|
||||||
.endClass ()
|
.endClass ()
|
||||||
|
|
||||||
@ -317,9 +318,10 @@ LuaBindings::common (lua_State* L)
|
|||||||
.addFunction ("first_mark_after", &Locations::first_mark_after)
|
.addFunction ("first_mark_after", &Locations::first_mark_after)
|
||||||
.endClass ()
|
.endClass ()
|
||||||
|
|
||||||
.deriveWSPtrClass <SessionObject, PBD::StatefulDestructible> ("SessionObject")
|
.beginWSPtrClass <SessionObject> ("SessionObject")
|
||||||
/* multiple inheritance is not covered by luabridge,
|
/* SessionObject is-a PBD::StatefulDestructible,
|
||||||
* we need explicit casts :( */
|
* but multiple inheritance is not covered by luabridge,
|
||||||
|
* we need explicit casts */
|
||||||
.addCast<PBD::Stateful> ("to_stateful")
|
.addCast<PBD::Stateful> ("to_stateful")
|
||||||
.addCast<PBD::StatefulDestructible> ("to_statefuldestructible")
|
.addCast<PBD::StatefulDestructible> ("to_statefuldestructible")
|
||||||
.addFunction ("name", &SessionObject::name)
|
.addFunction ("name", &SessionObject::name)
|
||||||
@ -530,8 +532,8 @@ LuaBindings::common (lua_State* L)
|
|||||||
.addData ("logarithmic", &ParameterDescriptor::logarithmic)
|
.addData ("logarithmic", &ParameterDescriptor::logarithmic)
|
||||||
.endClass ()
|
.endClass ()
|
||||||
|
|
||||||
.deriveWSPtrClass <Processor, Automatable> ("Processor")
|
.deriveWSPtrClass <Processor, SessionObject> ("Processor")
|
||||||
.addCast<SessionObject> ("to_sessionobject")
|
.addCast<Automatable> ("to_automatable")
|
||||||
.addCast<PluginInsert> ("to_insert")
|
.addCast<PluginInsert> ("to_insert")
|
||||||
.addCast<SideChain> ("to_sidechain")
|
.addCast<SideChain> ("to_sidechain")
|
||||||
.addCast<IOProcessor> ("to_ioprocessor")
|
.addCast<IOProcessor> ("to_ioprocessor")
|
||||||
@ -583,7 +585,7 @@ LuaBindings::common (lua_State* L)
|
|||||||
|
|
||||||
.endClass ()
|
.endClass ()
|
||||||
|
|
||||||
.deriveWSPtrClass <AutomationControl, Evoral::Control> ("AutomationControl")
|
.deriveWSPtrClass <AutomationControl, PBD::Controllable> ("AutomationControl")
|
||||||
.addCast<Evoral::Control> ("to_ctrl")
|
.addCast<Evoral::Control> ("to_ctrl")
|
||||||
.addFunction ("automation_state", &AutomationControl::automation_state)
|
.addFunction ("automation_state", &AutomationControl::automation_state)
|
||||||
.addFunction ("automation_style", &AutomationControl::automation_style)
|
.addFunction ("automation_style", &AutomationControl::automation_style)
|
||||||
|
Loading…
Reference in New Issue
Block a user