From bff8d980783a67ac2fa3ef0624aae2ce956a148d Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Wed, 7 May 2008 20:05:49 -0500 Subject: [PATCH] Clean up a copy/assignment permissions for many classes. --- Timeline/Annotation_Region.H | 3 +++ Timeline/Audio_File.H | 3 +++ Timeline/Audio_Region.H | 3 +++ Timeline/Clock.H | 4 ++++ Timeline/Control_Sequence.H | 5 +++++ Timeline/Disk_Stream.H | 4 ++++ Timeline/Engine.H | 3 +++ Timeline/Loggable.H | 17 +++++++++++++++-- Timeline/Peaks.H | 4 ++++ Timeline/Port.H | 6 ++++++ Timeline/Record_DS.H | 5 +++++ Timeline/Sequence.H | 5 +++++ Timeline/Sequence_Point.H | 2 ++ Timeline/Tempo_Point.C | 4 ++++ Timeline/Timeline.H | 3 +++ Timeline/Track.H | 4 ++++ Timeline/Transport.H | 4 ++++ 17 files changed, 77 insertions(+), 2 deletions(-) diff --git a/Timeline/Annotation_Region.H b/Timeline/Annotation_Region.H index 1ad9975..826fa25 100644 --- a/Timeline/Annotation_Region.H +++ b/Timeline/Annotation_Region.H @@ -26,6 +26,9 @@ class Annotation_Region : public Sequence_Region { + /* not permitted */ + Annotation_Region & operator = ( const Annotation_Region &rhs ); + char *_label; public: diff --git a/Timeline/Audio_File.H b/Timeline/Audio_File.H index 1fbc316..448f702 100644 --- a/Timeline/Audio_File.H +++ b/Timeline/Audio_File.H @@ -35,6 +35,9 @@ class Audio_File { static std::map _open_files; + Audio_File ( const Audio_File &rhs ); + const Audio_File & operator= ( const Audio_File &rhs ); + protected: struct format_desc diff --git a/Timeline/Audio_Region.H b/Timeline/Audio_Region.H index 3082639..61d4d80 100644 --- a/Timeline/Audio_Region.H +++ b/Timeline/Audio_Region.H @@ -32,6 +32,9 @@ class Audio_Region : public Sequence_Region { + /* not permitted */ + Audio_Region & operator = ( const Audio_Region &rhs ); + public: static bool inherit_track_color; diff --git a/Timeline/Clock.H b/Timeline/Clock.H index af8b7b7..3d8e141 100644 --- a/Timeline/Clock.H +++ b/Timeline/Clock.H @@ -35,6 +35,10 @@ const float CLOCK_UPDATE_FREQ = 0.06f; class Clock : public Fl_Widget { + /* not permitted */ + Clock ( const Clock &rhs ); + Clock & operator = ( const Clock &rhs ); + nframes_t _when; nframes_t *_v; diff --git a/Timeline/Control_Sequence.H b/Timeline/Control_Sequence.H index 222d87c..54e1e50 100644 --- a/Timeline/Control_Sequence.H +++ b/Timeline/Control_Sequence.H @@ -25,6 +25,11 @@ class Control_Sequence : public Sequence { + + /* not permitted */ + Control_Sequence ( const Control_Sequence &rhs ); + Control_Sequence & operator = ( const Control_Sequence &rhs ); + public: enum curve_type_e { Linear, Quadratic }; diff --git a/Timeline/Disk_Stream.H b/Timeline/Disk_Stream.H index f528187..2f78e5c 100644 --- a/Timeline/Disk_Stream.H +++ b/Timeline/Disk_Stream.H @@ -38,6 +38,10 @@ class Audio_Sequence; class Disk_Stream : public Mutex { + /* not permitted */ + Disk_Stream ( const Disk_Stream &rhs ); + Disk_Stream & operator = ( const Disk_Stream &rhs ); + protected: pthread_t _thread; /* io thread */ diff --git a/Timeline/Engine.H b/Timeline/Engine.H index ac6334d..0eaf207 100644 --- a/Timeline/Engine.H +++ b/Timeline/Engine.H @@ -51,6 +51,9 @@ class Engine : public Mutex static int xrun ( void *arg ); int xrun ( void ); + Engine ( const Engine &rhs ); + Engine & operator = ( const Engine &rhs ); + private: friend class Port; diff --git a/Timeline/Loggable.H b/Timeline/Loggable.H index f6e77b6..e760f13 100644 --- a/Timeline/Loggable.H +++ b/Timeline/Loggable.H @@ -137,11 +137,12 @@ private: void init ( bool loggable=true ) { + _new_state = _old_state = NULL; + _nest = 0; + if ( loggable ) { _id = ++_log_id; - _old_state = NULL; - _nest = 0; ensure_size( _id ); @@ -152,6 +153,9 @@ private: } + /* not implemented */ + const Loggable & operator= ( const Loggable &rhs ); + public: static const char *escape ( const char *s ); @@ -221,6 +225,7 @@ public: static bool do_this ( const char *s, bool reverse ); + protected: void log_start ( void ); @@ -251,6 +256,10 @@ class Logger Loggable *_this; Logger ( ) {} + /* not permitted */ + Logger ( const Logger &rhs ); + const Logger & operator= ( const Logger &rhs ); + public: Logger ( Loggable *l ) : _this( l ) @@ -286,6 +295,10 @@ class Log_Entry char **_sa; int _i; + /* not permitted */ + Log_Entry ( const Log_Entry &rhs ); + Log_Entry & operator= ( const Log_Entry &rhs ); + public: struct Pair diff --git a/Timeline/Peaks.H b/Timeline/Peaks.H index 1cf79f1..48a86cc 100644 --- a/Timeline/Peaks.H +++ b/Timeline/Peaks.H @@ -123,6 +123,10 @@ class Peak_Writer int _index; + Peak_Writer ( const Peak_Writer &rhs ); + const Peak_Writer &operator= ( const Peak_Writer &rhs ); + + public: Peak_Writer ( const char *filename, int chunksize, int channels ); diff --git a/Timeline/Port.H b/Timeline/Port.H index d988f60..947baee 100644 --- a/Timeline/Port.H +++ b/Timeline/Port.H @@ -28,6 +28,12 @@ class Port jack_port_t *_port; const char *_name; + /* FIXME: reference count? */ + +/* /\* not permitted *\/ */ +/* Port ( const Port &rhs ); */ +/* Port & operator= ( const Port &rhs ); */ + public: enum type_e { Output, Input }; diff --git a/Timeline/Record_DS.H b/Timeline/Record_DS.H index abd073e..be6facb 100644 --- a/Timeline/Record_DS.H +++ b/Timeline/Record_DS.H @@ -28,6 +28,11 @@ class Peak_Writer; class Record_DS : public Disk_Stream { + /* not permitted */ + Record_DS ( const Record_DS &rhs ); + Record_DS & operator= ( const Record_DS &rhs ); + + nframes_t _frames_written; volatile nframes_t _stop_frame; diff --git a/Timeline/Sequence.H b/Timeline/Sequence.H index c57dd72..e5ef9ef 100644 --- a/Timeline/Sequence.H +++ b/Timeline/Sequence.H @@ -41,6 +41,10 @@ class Sequence_Widget; class Sequence : public Fl_Widget, public Loggable { + /* not permitted */ + Sequence ( const Sequence &rhs ); + Sequence & operator= ( const Sequence &rhs ); + static queue _delete_queue; void init ( void ); @@ -61,6 +65,7 @@ public: LOG_NAME_FUNC( Sequence ); Sequence ( Track *track=0 ); + Sequence ( int X, int Y, int W, int H ); virtual ~Sequence ( ); diff --git a/Timeline/Sequence_Point.H b/Timeline/Sequence_Point.H index 69f1466..16e9589 100644 --- a/Timeline/Sequence_Point.H +++ b/Timeline/Sequence_Point.H @@ -23,6 +23,8 @@ class Sequence_Point : public Sequence_Widget { + /* not permitted */ + Sequence_Point & operator= ( const Sequence_Point &rhs ); protected: diff --git a/Timeline/Tempo_Point.C b/Timeline/Tempo_Point.C index a9348a4..61f87c5 100644 --- a/Timeline/Tempo_Point.C +++ b/Timeline/Tempo_Point.C @@ -112,6 +112,10 @@ Tempo_Point::handle ( int m ) class Tempo_Point_Editor : public Fl_Menu_Window { + /* not permitted */ + Tempo_Point_Editor ( const Tempo_Point_Editor &rhs ); + Tempo_Point_Editor & operator = ( const Tempo_Point_Editor &rhs ); + float *_tempo; Fl_Float_Input *_fi; diff --git a/Timeline/Timeline.H b/Timeline/Timeline.H index ef900b3..de3f8ab 100644 --- a/Timeline/Timeline.H +++ b/Timeline/Timeline.H @@ -105,6 +105,9 @@ class Timeline : public Fl_Overlay_Window, public RWLock nframes_t p1, p2; /* cursors */ + /* not permitted */ + Timeline ( const Timeline &rhs ); + Timeline & operator = ( const Timeline &rhs ); public: diff --git a/Timeline/Track.H b/Timeline/Track.H index a664e88..7099595 100644 --- a/Timeline/Track.H +++ b/Timeline/Track.H @@ -56,6 +56,10 @@ class Audio_File; class Track : public Fl_Group, public Loggable { + /* not permitted */ + Track ( const Track &rhs ); + Track & operator= ( const Track &rhs ); + public: Track ( const char *L, int channels=1 ); diff --git a/Timeline/Transport.H b/Timeline/Transport.H index 66a139d..fc52a44 100644 --- a/Timeline/Transport.H +++ b/Timeline/Transport.H @@ -34,6 +34,10 @@ struct Transport : public jack_position_t, public Fl_Pack private: + /* not permitted */ + Transport ( const Transport &rhs ); + Transport & operator = ( const Transport &rhs ); + Fl_Button *_home_button; Fl_Button *_end_button; Fl_Button *_play_button;