]> git.lyx.org Git - features.git/commitdiff
replace boost::noncopyable by plain C++ idiom
authorAndré Pönitz <poenitz@gmx.net>
Wed, 21 Nov 2007 23:31:12 +0000 (23:31 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Wed, 21 Nov 2007 23:31:12 +0000 (23:31 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21704 a592a061-630c-0410-9148-cb99ea01b6c8

src/graphics/GraphicsCache.h
src/graphics/GraphicsCacheItem.h
src/graphics/GraphicsConverter.h
src/graphics/PreviewLoader.h
src/graphics/Previews.h

index bf4a4ffe8058d93188cf089f0e4eb0c2acaf5564..d58ff143426cda978f53be580f8784e781671a83 100644 (file)
@@ -20,7 +20,6 @@
 #ifndef GRAPHICSCACHE_H
 #define GRAPHICSCACHE_H
 
-#include <boost/noncopyable.hpp>
 #include <boost/scoped_ptr.hpp>
 #include <boost/shared_ptr.hpp>
 
@@ -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.
         */
index 12b86de64d4c20cdf603ad6be20532184d832bee..cceee96f32b028e1634305a4a8a6e8682eae9aed 100644 (file)
@@ -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 <boost/noncopyable.hpp>
 #include <boost/scoped_ptr.hpp>
 #include <boost/signal.hpp>
 
@@ -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;
 
index 0f0dec559ee2d4d4b3546f1d6b2fef2139e53616..d380c36577af6638e5ea23365de376fb04a06cab 100644 (file)
@@ -19,7 +19,6 @@
 
 #include <boost/scoped_ptr.hpp>
 #include <boost/signal.hpp>
-#include <boost/noncopyable.hpp>
 
 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;
 
index 97c8879e069b2b984415b4bed700c9a9ade49437..d954401b7b996d35c2c40e375c06edfa9ed11c15 100644 (file)
@@ -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 <boost/noncopyable.hpp>
 #include <boost/scoped_ptr.hpp>
 #include <boost/signal.hpp>
 
@@ -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.
index 13aaef9c3059ded5b44f0298d366f01a26db0e36..429855c44af5586458634e49a144a77ccc22a3b0 100644 (file)
@@ -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 <boost/noncopyable.hpp>
 #include <boost/scoped_ptr.hpp>
 
 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.
         */