temporal: stub API for tempo map cut/copy/paste

This commit is contained in:
Paul Davis 2023-05-04 15:10:50 -06:00
parent b3040a31fc
commit f7ba9af6b2
2 changed files with 33 additions and 0 deletions

View File

@ -851,6 +851,32 @@ TempoMap::copy_points (TempoMap const & other)
}
}
TempoMapCutBuffer*
TempoMap::cut (timepos_t const & start, timepos_t const & end)
{
return cut_copy (start, end, false);
}
TempoMapCutBuffer*
TempoMap::copy ( timepos_t const & start, timepos_t const & end)
{
return cut_copy (start, end, true);
}
TempoMapCutBuffer*
TempoMap::cut_copy (timepos_t const & start, timepos_t const & end, bool copy)
{
TempoMapCutBuffer* cb;
return cb;
}
void
TempoMap::paste (TempoMapCutBuffer& cb, timepos_t const & position)
{
}
MeterPoint*
TempoMap::add_meter (MeterPoint* mp)
{

View File

@ -61,6 +61,7 @@ namespace Temporal {
class Meter;
class TempoMap;
class TempoMapCutBuffer;
class MapOwned {
protected:
@ -817,6 +818,10 @@ class /*LIBTEMPORAL_API*/ TempoMap : public PBD::StatefulDestructible
LIBTEMPORAL_API TempoMetric metric_at (Beats const &, bool can_match = true) const;
LIBTEMPORAL_API TempoMetric metric_at (BBT_Argument const &, bool can_match = true) const;
LIBTEMPORAL_API TempoMapCutBuffer* cut (timepos_t const & start, timepos_t const & end);
LIBTEMPORAL_API TempoMapCutBuffer* copy (timepos_t const & start, timepos_t const & end);
LIBTEMPORAL_API void paste (TempoMapCutBuffer&, timepos_t const & position);
private:
template<typename TimeType, typename Comparator> TempoPoint const & _tempo_at (TimeType when, Comparator cmp) const {
assert (!_tempos.empty());
@ -1131,6 +1136,8 @@ class /*LIBTEMPORAL_API*/ TempoMap : public PBD::StatefulDestructible
void reset_section (Points::iterator& begin, Points::iterator& end, superclock_t, TempoMetric& metric);
TempoMapCutBuffer* cut_copy (timepos_t const & start, timepos_t const & end, bool copy);
/* These are not really const, but the lookup tables are marked mutable
* to allow time domain conversions to store their results while being
* marked const (which is more semantically correct).