From d33cedef34146407ff9c8a7d45a091bceca74bdd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Wed, 21 Nov 2007 23:31:12 +0000 Subject: [PATCH] replace boost::noncopyable by plain C++ idiom git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21704 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/graphics/GraphicsCache.h | 7 +++++-- src/graphics/GraphicsCacheItem.h | 19 +++++++++++-------- src/graphics/GraphicsConverter.h | 7 +++++-- src/graphics/PreviewLoader.h | 9 ++++++--- src/graphics/Previews.h | 11 +++++++---- 5 files changed, 34 insertions(+), 19 deletions(-) diff --git a/src/graphics/GraphicsCache.h b/src/graphics/GraphicsCache.h index bf4a4ffe80..d58ff14342 100644 --- a/src/graphics/GraphicsCache.h +++ b/src/graphics/GraphicsCache.h @@ -20,7 +20,6 @@ #ifndef GRAPHICSCACHE_H #define GRAPHICSCACHE_H -#include #include #include @@ -36,7 +35,7 @@ namespace graphics { class CacheItem; -class Cache : boost::noncopyable { +class Cache { public: /// This is a singleton class. Get the instance. @@ -72,6 +71,10 @@ public: ItemPtr const item(support::FileName const & file) const; private: + /// noncopyable + Cache(Cache const &); + void operator=(Cache const &); + /** Make the c-tor, d-tor private so we can control how many objects * are instantiated. */ diff --git a/src/graphics/GraphicsCacheItem.h b/src/graphics/GraphicsCacheItem.h index 12b86de64d..cceee96f32 100644 --- a/src/graphics/GraphicsCacheItem.h +++ b/src/graphics/GraphicsCacheItem.h @@ -9,11 +9,11 @@ * * Full author contact details are available in file CREDITS. * - * The graphics cache is a container of lyx::graphics::CacheItems. - * Each lyx::graphics::CacheItem, defined here represents a separate image file. + * The graphics cache is a container of graphics::CacheItems. + * Each graphics::CacheItem, defined here represents a separate image file. * * The routines here can be used to load the graphics file into memory at - * which point (status() == lyx::graphics::Loaded). + * which point (status() == graphics::Loaded). * The user is then free to access image() in order to copy it and to then * transform the copy (rotate, scale, clip) and to generate the pixmap. * @@ -21,8 +21,8 @@ * file conversion to a loadable format; * file loading. * - * Whether you get that, of course, depends on lyx::graphics::Converter and - * on the lyx::graphics::Image-derived image class. + * Whether you get that, of course, depends on graphics::Converter and + * on the graphics::Image-derived image class. */ #ifndef GRAPHICSCACHEITEM_H @@ -30,7 +30,6 @@ #include "GraphicsTypes.h" -#include #include #include @@ -44,8 +43,8 @@ namespace graphics { class Image; class Converter; -/// A lyx::graphics::Cache item holder. -class CacheItem : boost::noncopyable { +/// A graphics::Cache item holder. +class CacheItem { public: /// CacheItem(support::FileName const & file); @@ -91,6 +90,10 @@ public: boost::signals::connection connect(slot_type const &) const; private: + /// noncopyable + CacheItem(CacheItem const &); + void operator=(CacheItem const &); + /// Use the Pimpl idiom to hide the internals. class Impl; diff --git a/src/graphics/GraphicsConverter.h b/src/graphics/GraphicsConverter.h index 0f0dec559e..d380c36577 100644 --- a/src/graphics/GraphicsConverter.h +++ b/src/graphics/GraphicsConverter.h @@ -19,7 +19,6 @@ #include #include -#include namespace lyx { @@ -27,7 +26,7 @@ namespace support { class FileName; } namespace graphics { -class Converter : boost::noncopyable { +class Converter { public: /// Can the conversion be performed? static bool isReachable(std::string const & from_format_name, @@ -62,6 +61,10 @@ public: support::FileName const & convertedFile() const; private: + /// noncopyable + Converter(Converter const &); + void operator=(Converter const &); + /// Use the Pimpl idiom to hide the internals. class Impl; diff --git a/src/graphics/PreviewLoader.h b/src/graphics/PreviewLoader.h index 97c8879e06..d954401b7b 100644 --- a/src/graphics/PreviewLoader.h +++ b/src/graphics/PreviewLoader.h @@ -8,7 +8,7 @@ * * Full author contact details are available in file CREDITS. * - * lyx::graphics::PreviewLoader collects latex snippets together. Then, on a + * graphics::PreviewLoader collects latex snippets together. Then, on a * startLoading() call, these are dumped to file and processed, converting * each snippet to a separate bitmap image file. Once a bitmap file is ready * to be loaded back into LyX, the PreviewLoader emits a signal to inform @@ -18,7 +18,6 @@ #ifndef PREVIEWLOADER_H #define PREVIEWLOADER_H -#include #include #include @@ -31,7 +30,7 @@ namespace graphics { class PreviewImage; -class PreviewLoader : boost::noncopyable { +class PreviewLoader { public: /** We need buffer because we require the preamble to the * LaTeX file. @@ -89,6 +88,10 @@ public: Buffer const & buffer() const; private: + /// noncopyable + PreviewLoader(PreviewLoader const &); + void operator=(PreviewLoader const &); + /// Use the Pimpl idiom to hide the internals. class Impl; /// The pointer never changes although *pimpl_'s contents may. diff --git a/src/graphics/Previews.h b/src/graphics/Previews.h index 13aaef9c30..429855c44a 100644 --- a/src/graphics/Previews.h +++ b/src/graphics/Previews.h @@ -8,14 +8,13 @@ * * Full author contact details are available in file CREDITS. * - * lyx::graphics::Previews is a singleton class that stores the - * lyx::graphics::PreviewLoader for each buffer requiring one. + * graphics::Previews is a singleton class that stores the + * graphics::PreviewLoader for each buffer requiring one. */ #ifndef PREVIEWS_H #define PREVIEWS_H -#include #include namespace lyx { @@ -27,7 +26,7 @@ namespace graphics { class PreviewLoader; -class Previews : boost::noncopyable { +class Previews { public: /// a wrapper for lyxrc.preview static LyXRC_PreviewStatus status(); @@ -50,6 +49,10 @@ public: void generateBufferPreviews(Buffer const & buffer) const; private: + /// noncopyable + Previews(Previews const &); + void operator=(Previews const &); + /** Make the c-tor, d-tor private so we can control how many objects * are instantiated. */ -- 2.39.5