replace boost::noncopyable by plain C++ idiom

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21704 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2007-11-21 23:31:12 +00:00
parent 974924a5d5
commit d33cedef34
5 changed files with 34 additions and 19 deletions

View 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.
*/

View 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;

View 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;

View 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.

View 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.
*/