13
0

temporal: move another domain-swapping object to the right header

This commit is contained in:
Paul Davis 2023-08-06 13:03:42 -06:00
parent d87b10037b
commit 47a7a16c43
2 changed files with 27 additions and 26 deletions

View File

@ -26,6 +26,7 @@
#include "pbd/signals.h"
#include "temporal/types.h"
#include "temporal/timeline.h"
namespace Temporal {
@ -35,7 +36,7 @@ struct LIBTEMPORAL_API TimeDomainSwapper : public virtual PBD::Destructible {
};
struct LIBTEMPORAL_API TimeDomainCommand : public Command {
struct LIBTEMPORAL_API TimeDomainCommand : public PBD::Command {
public:
TimeDomainCommand (TimeDomain f, TimeDomain t) : from (f), to (t) {}
void add (TimeDomainSwapper&);
@ -55,6 +56,30 @@ struct LIBTEMPORAL_API TimeDomainCommand : public Command {
};
class LIBTEMPORAL_API DomainSwapInformation {
public:
static DomainSwapInformation* start (TimeDomain prev);
~DomainSwapInformation ();
void add (timecnt_t& t) { counts.push_back (&t); }
void add (timepos_t& p) { positions.push_back (&p); }
void add (TimeDomainSwapper& tt) { time_things.push_back (&tt); }
void clear ();
private:
DomainSwapInformation (TimeDomain prev) : previous (prev) {}
std::vector<timecnt_t*> counts;
std::vector<timepos_t*> positions;
std::vector<TimeDomainSwapper*> time_things;
TimeDomain previous;
void undo ();
};
extern LIBTEMPORAL_API DomainSwapInformation* domain_swap;
}
#endif /* __tmeporal_domain_swap_h__ */

View File

@ -1247,7 +1247,7 @@ class LIBTEMPORAL_API TempoMapCutBuffer
Points _points;
};
class LIBTEMPORAL_API TempoCommand : public Command {
class LIBTEMPORAL_API TempoCommand : public PBD::Command {
public:
TempoCommand (std::string const & name, XMLNode const * before, XMLNode const * after);
@ -1267,30 +1267,6 @@ class LIBTEMPORAL_API TempoCommand : public Command {
XMLNode const * _after;
};
class LIBTEMPORAL_API DomainSwapInformation {
public:
static DomainSwapInformation* start (TimeDomain prev);
~DomainSwapInformation ();
void add (timecnt_t& t) { counts.push_back (&t); }
void add (timepos_t& p) { positions.push_back (&p); }
void add (TimeDomainSwapper& tt) { time_things.push_back (&tt); }
void clear ();
private:
DomainSwapInformation (TimeDomain prev) : previous (prev) {}
std::vector<timecnt_t*> counts;
std::vector<timepos_t*> positions;
std::vector<TimeDomainSwapper*> time_things;
TimeDomain previous;
void undo ();
};
extern LIBTEMPORAL_API DomainSwapInformation* domain_swap;
} /* end of namespace Temporal */
#ifdef COMPILER_MSVC