remove cruft (following 6dc3bdf
)
This commit is contained in:
parent
a199477cf6
commit
35dcd46d7d
@ -67,6 +67,14 @@ struct TypeListValues
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
TypeListValues recursive template definition.
|
TypeListValues recursive template definition.
|
||||||
|
|
||||||
|
Note that for references and const references,
|
||||||
|
this template will not copy-construct the object.
|
||||||
|
|
||||||
|
Special cases were intentionally removed in 6dc3bdf, becuase
|
||||||
|
we cannot simply copy-constructing Ardour Session Objects.
|
||||||
|
Lifetime is generally C++/boost managed and will
|
||||||
|
stay around for th lifetime of the TypeList.
|
||||||
*/
|
*/
|
||||||
template <typename Head, typename Tail>
|
template <typename Head, typename Tail>
|
||||||
struct TypeListValues <TypeList <Head, Tail> >
|
struct TypeListValues <TypeList <Head, Tail> >
|
||||||
@ -92,58 +100,6 @@ struct TypeListValues <TypeList <Head, Tail> >
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Specializations of type/value list for head types that are references and
|
|
||||||
// const-references. We need to handle these specially since we can't count
|
|
||||||
// on the referenced object hanging around for the lifetime of the list.
|
|
||||||
|
|
||||||
template <typename Head, typename Tail>
|
|
||||||
struct TypeListValues <TypeList <Head&, Tail> >
|
|
||||||
{
|
|
||||||
Head& hd;
|
|
||||||
TypeListValues <Tail> tl;
|
|
||||||
|
|
||||||
TypeListValues (Head& hd_, TypeListValues <Tail> const& tl_)
|
|
||||||
: hd (hd_), tl (tl_)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static std::string const tostring (bool comma = false)
|
|
||||||
{
|
|
||||||
std::string s;
|
|
||||||
|
|
||||||
if (comma)
|
|
||||||
s = ", ";
|
|
||||||
|
|
||||||
s = s + typeid (Head).name () + "&";
|
|
||||||
|
|
||||||
return s + TypeListValues <Tail>::tostring (true);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename Head, typename Tail>
|
|
||||||
struct TypeListValues <TypeList <Head const&, Tail> >
|
|
||||||
{
|
|
||||||
const Head& hd;
|
|
||||||
TypeListValues <Tail> tl;
|
|
||||||
|
|
||||||
TypeListValues (Head const& hd_, const TypeListValues <Tail>& tl_)
|
|
||||||
: hd (hd_), tl (tl_)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static std::string const tostring (bool comma = false)
|
|
||||||
{
|
|
||||||
std::string s;
|
|
||||||
|
|
||||||
if (comma)
|
|
||||||
s = ", ";
|
|
||||||
|
|
||||||
s = s + typeid (Head).name () + " const&";
|
|
||||||
|
|
||||||
return s + TypeListValues <Tail>::tostring (true);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
/**
|
/**
|
||||||
Subclass of a TypeListValues constructable from the Lua stack.
|
Subclass of a TypeListValues constructable from the Lua stack.
|
||||||
|
Loading…
Reference in New Issue
Block a user