Remove use of boost::noncopyable.
authorCarl Hetherington <cth@carlh.net>
Thu, 29 Apr 2021 06:31:23 +0000 (08:31 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 29 Apr 2021 06:31:23 +0000 (08:31 +0200)
21 files changed:
src/lib/active_text.h
src/lib/butler.h
src/lib/dcp_content_type.h
src/lib/dcp_video.h
src/lib/dcpomatic_socket.h
src/lib/film.h
src/lib/filter.h
src/lib/filter_graph.h
src/lib/image_proxy.h
src/lib/j2k_encoder.h
src/lib/job.h
src/lib/resampler.h
src/lib/scoped_temporary.h
src/lib/signal_manager.h
src/lib/subtitle_analysis.h
src/lib/video_ring_buffers.h
src/lib/zipper.h
src/wx/content_menu.h
src/wx/content_panel.h
src/wx/job_view.h
src/wx/language_tag_widget.h

index f5211ae7f0cc68983c541b6ba0206dc6d41e178a..b54957b3ff270da744b6f6e29e4bb4a722f63277 100644 (file)
@@ -24,7 +24,6 @@
 
 #include "dcpomatic_time.h"
 #include "player_text.h"
-#include <boost/noncopyable.hpp>
 #include <boost/thread/mutex.hpp>
 #include <list>
 #include <map>
@@ -34,9 +33,14 @@ class TextContent;
 /** @class ActiveText
  *  @brief A class to maintain information on active subtitles for Player.
  */
-class ActiveText : public boost::noncopyable
+class ActiveText
 {
 public:
+       ActiveText () {}
+
+       ActiveText (ActiveText const&) = delete;
+       ActiveText& operator= (ActiveText const&) = delete;
+
        std::list<PlayerText> get_burnt (dcpomatic::DCPTimePeriod period, bool always_burn_captions) const;
        void clear_before (dcpomatic::DCPTime time);
        void clear ();
index 8c7f554cb800f4ef94a4a40278463748616cc8f8..ac83cecec7ebedff3afacaee84b9a9834c1e5455 100644 (file)
@@ -32,7 +32,7 @@
 class Player;
 class PlayerVideo;
 
-class Butler : public ExceptionStore, public boost::noncopyable
+class Butler : public ExceptionStore
 {
 public:
        Butler (
@@ -48,6 +48,9 @@ public:
 
        ~Butler ();
 
+       Butler (Butler const&) = delete;
+       Butler& operator= (Butler const&) = delete;
+
        void seek (dcpomatic::DCPTime position, bool accurate);
 
        class Error {
index eea698217ca5e59a79e0addbed9e1bf4211cf62f..f45bbb9f87808bed7a8fe5a0d5241943dedb81fe 100644 (file)
 
 */
 
+
 #ifndef DCPOMATIC_DCP_CONTENT_TYPE_H
 #define DCPOMATIC_DCP_CONTENT_TYPE_H
 
+
 /** @file src/dcp_content_type.h
  *  @brief DCPContentType class.
  */
 
+
 #include <dcp/dcp.h>
 #include <string>
 #include <vector>
 
+
 /** @class DCPContentType
  *  @brief A description of the type of content for a DCP (e.g. feature, trailer etc.)
  */
-class DCPContentType : public boost::noncopyable
+class DCPContentType
 {
 public:
        DCPContentType (std::string, dcp::ContentKind, std::string);
 
+       DCPContentType (DCPContentType const&) = delete;
+       DCPContentType& operator= (DCPContentType const&) = delete;
+
        /** @return user-visible `pretty' name */
        std::string pretty_name () const {
                return _pretty_name;
@@ -66,4 +73,5 @@ private:
        static std::vector<DCPContentType const *> _dcp_content_types;
 };
 
+
 #endif
index 8efd680a2a1942036fadb6f19ef3895db26e21c8..0bb583c57488432e86b27fbf2411430660d6a147 100644 (file)
@@ -39,12 +39,15 @@ class PlayerVideo;
  *  Objects of this class are used for the queue that we keep
  *  of images that require encoding.
  */
-class DCPVideo : public boost::noncopyable
+class DCPVideo
 {
 public:
        DCPVideo (std::shared_ptr<const PlayerVideo>, int index, int dcp_fps, int bandwidth, Resolution r);
        DCPVideo (std::shared_ptr<const PlayerVideo>, cxml::ConstNodePtr);
 
+       DCPVideo (DCPVideo const&) = delete;
+       DCPVideo& operator= (DCPVideo const&) = delete;
+
        dcp::ArrayData encode_locally ();
        dcp::ArrayData encode_remotely (EncodeServerDescription, int timeout = 30);
 
index 49a27858892153e860ae46e3f3f557909da6a917..f4520e5cf7c070d3407c2196b1baf8ff98939476 100644 (file)
@@ -20,7 +20,6 @@
 
 #include "digester.h"
 #include <boost/asio.hpp>
-#include <boost/noncopyable.hpp>
 #include <boost/scoped_ptr.hpp>
 
 /** @class Socket
  *  This class wraps some things that I could not work out how to do easily with boost;
  *  most notably, sync read/write calls with timeouts.
  */
-class Socket : public boost::noncopyable
+class Socket
 {
 public:
        explicit Socket (int timeout = 30);
 
+       Socket (Socket const&) = delete;
+       Socket& operator= (Socket const&) = delete;
+
        /** @return Our underlying socket */
        boost::asio::ip::tcp::socket& socket () {
                return _socket;
@@ -79,8 +81,6 @@ private:
        void start_write_digest ();
        void finish_write_digest ();
 
-       Socket (Socket const &);
-
        boost::asio::io_service _io_service;
        boost::asio::deadline_timer _deadline;
        boost::asio::ip::tcp::socket _socket;
index 00c3f71c5b721516d89e76f9576dc8d09bf45c96..bb868ffad346c7fa2436191e6152f6570486b2d8 100644 (file)
@@ -93,12 +93,15 @@ private:
  *
  *  The content of a Film is held in a Playlist (created and managed by the Film).
  */
-class Film : public std::enable_shared_from_this<Film>, public Signaller, public boost::noncopyable
+class Film : public std::enable_shared_from_this<Film>, public Signaller
 {
 public:
        explicit Film (boost::optional<boost::filesystem::path> dir);
        ~Film ();
 
+       Film (Film const&) = delete;
+       Film& operator= (Film const&) = delete;
+
        std::shared_ptr<InfoFileHandle> info_file_handle (dcpomatic::DCPTimePeriod period, bool read) const;
        boost::filesystem::path j2c_path (int, Frame, Eyes, bool) const;
        boost::filesystem::path internal_video_asset_dir () const;
index 455b271a2c7b8b18c94f9d8258d1a2eab4654ad2..5fbfd9c234e3a999bf04d7cbfa826241d49563bc 100644 (file)
 
 */
 
+
 /** @file src/filter.h
  *  @brief A class to describe one of FFmpeg's video or audio filters.
  */
 
+
 #ifndef DCPOMATIC_FILTER_H
 #define DCPOMATIC_FILTER_H
 
-#include <boost/utility.hpp>
+
 #include <string>
 #include <vector>
 
+
 /** @class Filter
  *  @brief A class to describe one of FFmpeg's video or audio filters.
  *
  *  8bpp.  FFmpeg quantizes e.g. yuv422p10le down to yuv422p before running such filters, which
  *  we don't really want to do.
  */
-class Filter : public boost::noncopyable
+class Filter
 {
 public:
        Filter (std::string i, std::string n, std::string c, std::string f);
 
+       Filter (Filter const&) = delete;
+       Filter& operator= (Filter const&) = delete;
+
        /** @return our id */
        std::string id () const {
                return _id;
@@ -80,4 +86,5 @@ private:
        static void maybe_add (std::string, std::string, std::string, std::string);
 };
 
+
 #endif
index 10298cb74297babfebcb03d0ddc377d77591d482..2b54d7829b87ef24d9f41e40adc05546fdf54f3d 100644 (file)
@@ -38,12 +38,15 @@ class Filter;
 /** @class FilterGraph
  *  @brief A graph of FFmpeg filters.
  */
-class FilterGraph : public boost::noncopyable
+class FilterGraph
 {
 public:
        FilterGraph ();
        virtual ~FilterGraph ();
 
+       FilterGraph (FilterGraph const&) = delete;
+       FilterGraph& operator== (FilterGraph const&) = delete;
+
        void setup (std::vector<Filter const *>);
        AVFilterContext* get (std::string name);
 
index b279e634443736628706103b88dc6fb0b960c698..22946ed98a56b1272421e053ceae35df58cdf811 100644 (file)
@@ -54,11 +54,15 @@ namespace cxml {
  *  the TIFF data compressed until the decompressed image is needed.
  *  At this point, the class decodes the TIFF to an Image.
  */
-class ImageProxy : public boost::noncopyable
+class ImageProxy
 {
 public:
+       ImageProxy () {}
        virtual ~ImageProxy () {}
 
+       ImageProxy (ImageProxy const&) = delete;
+       ImageProxy& operator= (ImageProxy const&) = delete;
+
        struct Result {
                Result (std::shared_ptr<Image> image_, int log2_scaling_)
                        : image (image_)
index 06b4d429ccd95ed4c08eb599d61d02b1a2ff8421..cea96530960b8febd04da7846a20dd095503b5fa 100644 (file)
@@ -55,12 +55,15 @@ class PlayerVideo;
  *  This class keeps a queue of frames to be encoded and distributes
  *  the work around threads and encoding servers.
  */
-class J2KEncoder : public boost::noncopyable, public ExceptionStore, public std::enable_shared_from_this<J2KEncoder>
+class J2KEncoder : public ExceptionStore, public std::enable_shared_from_this<J2KEncoder>
 {
 public:
        J2KEncoder (std::shared_ptr<const Film> film, std::shared_ptr<Writer> writer);
        ~J2KEncoder ();
 
+       J2KEncoder (J2KEncoder const&) = delete;
+       J2KEncoder& operator= (J2KEncoder const&) = delete;
+
        /** Called to indicate that a processing run is about to begin */
        void begin ();
 
index d047913a0a750f9f82c57ee65a3dcdd86497732b..6d8435c60fe29be840a244c18ba949e281614e2d 100644 (file)
@@ -36,12 +36,15 @@ class Film;
 /** @class Job
  *  @brief A parent class to represent long-running tasks which are run in their own thread.
  */
-class Job : public std::enable_shared_from_this<Job>, public Signaller, public boost::noncopyable
+class Job : public std::enable_shared_from_this<Job>, public Signaller
 {
 public:
        explicit Job (std::shared_ptr<const Film> film);
        virtual ~Job ();
 
+       Job (Job const&) = delete;
+       Job& operator= (Job const&) = delete;
+
        /** @return user-readable name of this job */
        virtual std::string name () const = 0;
        virtual std::string json_name () const = 0;
index 1f8200c69366fc2c642f08945991245f6e17d0fe..5a3a7fa40406c8dca974fa61da7cb4c18a71b8f6 100644 (file)
 
 */
 
+
 #include "types.h"
 #include <samplerate.h>
-#include <boost/utility.hpp>
+
 
 class AudioBuffers;
 
-class Resampler : public boost::noncopyable
+
+class Resampler
 {
 public:
        Resampler (int, int, int);
        ~Resampler ();
 
+       Resampler (Resampler const&) = delete;
+       Resampler& operator= (Resampler const&) = delete;
+
        std::shared_ptr<const AudioBuffers> run (std::shared_ptr<const AudioBuffers>);
        std::shared_ptr<const AudioBuffers> flush ();
        void reset ();
index 986f565a0896a64e507eba34ba7bdbc1d8c94d14..8f7416093aaed085a3d14cbe80c98f2ba256f26e 100644 (file)
 
 */
 
+
 #include <boost/filesystem.hpp>
-#include <boost/noncopyable.hpp>
 #include <cstdio>
 
+
 /** @class ScopedTemporary
  *  @brief A temporary file which is deleted when the ScopedTemporary object goes out of scope.
  */
-class ScopedTemporary : public boost::noncopyable
+class ScopedTemporary
 {
 public:
        ScopedTemporary ();
        ~ScopedTemporary ();
 
+       ScopedTemporary (ScopedTemporary const&) = delete;
+       ScopedTemporary& operator= (ScopedTemporary const&) = delete;
+
        /** @return temporary filename */
        boost::filesystem::path file () const {
                return _file;
index 78e936ea2f46e9a82172265ac27b6316b1c869ee..99e3b5c52c271277a64fd654d121303eed877505 100644 (file)
@@ -26,7 +26,6 @@
 #include "exception_store.h"
 #include <boost/asio.hpp>
 #include <boost/thread.hpp>
-#include <boost/noncopyable.hpp>
 
 
 class Signaller;
index 0a9dc6dca058ebbeb6f03cf3efbd4095f6018cec..04dcc95014b5654489b07b8d64031fbbe3b197a4 100644 (file)
 
 
 #include "rect.h"
-#include <boost/noncopyable.hpp>
 #include <boost/filesystem.hpp>
 
 
 /** @class SubtitleAnalysis
  *  @brief Class to store the results of a SubtitleAnalysisJob.
  */
-class SubtitleAnalysis : public boost::noncopyable
+class SubtitleAnalysis
 {
 public:
        explicit SubtitleAnalysis (boost::filesystem::path path);
@@ -42,6 +41,9 @@ public:
                , _analysis_y_offset (analysis_y_offset_)
        {}
 
+       SubtitleAnalysis (SubtitleAnalysis const&) = delete;
+       SubtitleAnalysis& operator= (SubtitleAnalysis const&) = delete;
+
        void write (boost::filesystem::path path) const;
 
        boost::optional<dcpomatic::Rect<double>> bounding_box () const {
index 444a49ea771e489c3d5cb7bf60ba919b17466cc3..47fda01f7fd7b9c503a84d6cffc7c2dde60b15a3 100644 (file)
@@ -22,7 +22,6 @@
 #include "dcpomatic_time.h"
 #include "player_video.h"
 #include "types.h"
-#include <boost/noncopyable.hpp>
 #include <boost/thread/mutex.hpp>
 #include <utility>
 
@@ -31,9 +30,14 @@ class Film;
 class PlayerVideo;
 
 
-class VideoRingBuffers : public boost::noncopyable
+class VideoRingBuffers
 {
 public:
+       VideoRingBuffers () {}
+
+       VideoRingBuffers (VideoRingBuffers const&) = delete;
+       VideoRingBuffers& operator= (VideoRingBuffers const&) = delete;
+
        void put (std::shared_ptr<PlayerVideo> frame, dcpomatic::DCPTime time);
        std::pair<std::shared_ptr<PlayerVideo>, dcpomatic::DCPTime> get ();
 
index 62a6af5b970013af41458aedd0b2a9b9f82f580e..9f3e867c773c78e6ab8c8f22c2a855c64f7902cc 100644 (file)
 */
 
 
-#include <boost/noncopyable.hpp>
 #include <boost/filesystem.hpp>
 #include <vector>
 
 
-class Zipper : public boost::noncopyable
+class Zipper
 {
 public:
        Zipper (boost::filesystem::path file);
        ~Zipper ();
 
+       Zipper (Zipper const&) = delete;
+       Zipper& operator= (Zipper const&) = delete;
+
        void add (std::string name, std::string content);
        void close ();
 
index 7743d0712b7bb27008378ea60cac0c2977ab3601..8a3548419aac8d7a9f5067b4a834004fb772f6b8 100644 (file)
@@ -30,11 +30,14 @@ class Film;
 class Job;
 class DCPContent;
 
-class ContentMenu : public boost::noncopyable
+class ContentMenu
 {
 public:
        explicit ContentMenu (wxWindow* p);
 
+       ContentMenu (ContentMenu const &) = delete;
+       ContentMenu& operator= (ContentMenu const &) = delete;
+
        void popup (std::weak_ptr<Film>, ContentList, TimelineContentViewList, wxPoint);
 
 private:
index 2a74df215fcbdf03588e5e8f5590be04068e0ad6..aca8181184b596c7d02b2c9391f3bd984f9b0f6e 100644 (file)
@@ -64,11 +64,14 @@ private:
 };
 
 
-class ContentPanel : public boost::noncopyable
+class ContentPanel
 {
 public:
        ContentPanel (wxNotebook *, std::shared_ptr<Film>, std::weak_ptr<FilmViewer> viewer);
 
+       ContentPanel (ContentPanel const&) = delete;
+       ContentPanel& operator= (ContentPanel const&) = delete;
+
        std::shared_ptr<Film> film () const {
                return _film;
        }
index 19f746b012bf90fcc3473807e4e7fbb32720fb0a..4a602fc6229b0b82542e065c8a584ed0816c10dd 100644 (file)
@@ -21,7 +21,6 @@
 #ifndef DCPOMATIC_JOB_VIEW_H
 #define DCPOMATIC_JOB_VIEW_H
 
-#include <boost/noncopyable.hpp>
 #include <boost/signals2.hpp>
 
 class Job;
@@ -36,12 +35,15 @@ class wxButton;
 class wxSizer;
 class wxCheckBox;
 
-class JobView : public boost::noncopyable
+class JobView
 {
 public:
        JobView (std::shared_ptr<Job> job, wxWindow* parent, wxWindow* container, wxFlexGridSizer* table);
        virtual ~JobView () {}
 
+       JobView (JobView const&) = delete;
+       JobView& operator= (JobView const&) = delete;
+
        virtual int insert_position () const = 0;
        virtual void job_list_changed () {}
 
index c2fd63d926f20c53d54130d3889b4b42f29f15d9..16c00e3a63cc1fc0186a37a10a1781456bd43def 100644 (file)
@@ -21,7 +21,6 @@
 
 #include <dcp/language_tag.h>
 #include <wx/wx.h>
-#include <boost/noncopyable.hpp>
 #include <boost/signals2.hpp>
 
 
@@ -31,12 +30,15 @@ class wxStaticText;
 class wxWindow;
 
 
-class LanguageTagWidget : public boost::noncopyable
+class LanguageTagWidget
 {
 public:
        LanguageTagWidget (wxWindow* parent, wxString tooltip, boost::optional<dcp::LanguageTag> tag, boost::optional<wxString> size_to_fit = boost::none);
        ~LanguageTagWidget ();
 
+       LanguageTagWidget (LanguageTagWidget const&) = delete;
+       LanguageTagWidget& operator= (LanguageTagWidget const&) = delete;
+
        wxSizer* sizer () const {
                return _sizer;
        }