mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
Add Lua Bindings for const shared_ptr lists (295dbd8e1e)
This commit is contained in:
parent
89c7159bc5
commit
dbc3008163
2 changed files with 38 additions and 0 deletions
|
|
@ -2029,6 +2029,19 @@ public:
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
template <class T>
|
||||
Class<std::shared_ptr<const std::list<T> > > beginPtrConstStdList (char const* name)
|
||||
{
|
||||
typedef std::list<T> const LT;
|
||||
typedef typename LT::size_type T_SIZE;
|
||||
return beginClass<std::shared_ptr<LT> > (name)
|
||||
.addPtrFunction ("empty", (bool (LT::*)()const)<::empty)
|
||||
.addPtrFunction ("size", (T_SIZE (LT::*)()const)<::size)
|
||||
.addPtrFunction ("reverse", (void (LT::*)())<::reverse)
|
||||
.addExtCFunction ("iter", &CFunc::ptrListIter<T, LT>)
|
||||
.addExtCFunction ("table", &CFunc::ptrListToTable<T, LT>);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Class<std::shared_ptr<std::list<T> > > beginPtrStdList (char const* name)
|
||||
{
|
||||
|
|
@ -2053,6 +2066,21 @@ public:
|
|||
.addExtCFunction ("table", &CFunc::ptrListToTable<T, LT>);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Class<std::shared_ptr<const std::vector<T> > > beginPtrConstStdVector (char const* name)
|
||||
{
|
||||
typedef std::vector<T> const LT;
|
||||
typedef typename std::vector<T>::reference T_REF;
|
||||
typedef typename std::vector<T>::size_type T_SIZE;
|
||||
|
||||
return beginClass<std::shared_ptr<LT> > (name)
|
||||
.addPtrFunction ("empty", (bool (LT::*)()const)<::empty)
|
||||
.addPtrFunction ("size", (T_SIZE (LT::*)()const)<::size)
|
||||
.addPtrFunction ("at", (T_REF (LT::*)(T_SIZE))<::at)
|
||||
.addExtCFunction ("iter", &CFunc::ptrListIter<T, LT>)
|
||||
.addExtCFunction ("table", &CFunc::ptrListToTable<T, LT>);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
Class<std::shared_ptr<std::vector<T> > > beginPtrStdVector (char const* name)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue