[solang] Fixed NonCopyable and its use
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [solang] Fixed NonCopyable and its use
- Date: Tue, 13 Apr 2010 16:02:32 +0000 (UTC)
commit 70e1232233a69e9adbb47a7aca6d0ba1fe39e3dc
Author: Debarshi Ray <rishi gnu org>
Date: Sun Apr 11 17:27:18 2010 +0300
Fixed NonCopyable and its use
+ NonCopyable is not a polymorphic base class, hence its destructor
should not be virtual.
+ NonCopyable is not meant to be instantiated directly, hence its
constructor should be protected.
+ Inherit NonCopyable privately.
src/application/engine.h | 2 +-
src/application/main-window.h | 2 +-
src/attribute/search-criterion-source.h | 2 +-
src/common/archive-maker.h | 2 +-
src/common/content-type-repo.h | 2 +-
src/common/db-object.h | 4 ++--
src/common/finally.h | 2 +-
src/common/i-operation.h | 2 +-
src/common/i-photo-destination.h | 2 +-
src/common/i-photo-search-criteria.h | 2 +-
src/common/i-photo-source.h | 4 ++--
src/common/i-plugin.h | 2 +-
src/common/i-renderer-selector.h | 4 ++--
src/common/i-renderer.h | 2 +-
src/common/i-storage.h | 3 ++-
src/common/non-copyable.h | 9 ++++-----
src/editor/editor.cpp | 2 +-
src/renderer/slideshow-window.h | 4 ++--
18 files changed, 26 insertions(+), 26 deletions(-)
---
diff --git a/src/application/engine.h b/src/application/engine.h
index f377d24..e67aca2 100644
--- a/src/application/engine.h
+++ b/src/application/engine.h
@@ -37,7 +37,7 @@ namespace Solang
{
class Engine :
- public NonCopyable
+ private NonCopyable
{
public:
typedef std::map<Glib::ustring, IStoragePtr> StorageMap;
diff --git a/src/application/main-window.h b/src/application/main-window.h
index 14123ea..fb7b607 100644
--- a/src/application/main-window.h
+++ b/src/application/main-window.h
@@ -37,7 +37,7 @@ class Application;
class MainWindow :
public Gtk::Window,
- public NonCopyable
+ private NonCopyable
{
public:
MainWindow() throw();
diff --git a/src/attribute/search-criterion-source.h b/src/attribute/search-criterion-source.h
index eabcad3..0348acb 100644
--- a/src/attribute/search-criterion-source.h
+++ b/src/attribute/search-criterion-source.h
@@ -27,7 +27,7 @@ namespace Solang
{
class SearchCriterionSource :
- public NonCopyable
+ private NonCopyable
{
public:
virtual
diff --git a/src/common/archive-maker.h b/src/common/archive-maker.h
index 53730de..5a407ff 100644
--- a/src/common/archive-maker.h
+++ b/src/common/archive-maker.h
@@ -38,7 +38,7 @@ typedef std::tr1::shared_ptr<const ArchiveEntry> ConstArchiveEntryPtr;
typedef std::tr1::shared_ptr<ArchiveEntry> ArchiveEntryPtr;
class ArchiveMaker :
- public NonCopyable,
+ private NonCopyable,
public sigc::trackable
{
public:
diff --git a/src/common/content-type-repo.h b/src/common/content-type-repo.h
index ed58d5e..6bd69a0 100644
--- a/src/common/content-type-repo.h
+++ b/src/common/content-type-repo.h
@@ -31,7 +31,7 @@ namespace Solang
{
class ContentTypeRepo
- : public NonCopyable
+ : private NonCopyable
{
private:
typedef Gdk::Pixbuf::SListHandle_PixbufFormat
diff --git a/src/common/db-object.h b/src/common/db-object.h
index be925c1..8cc0144 100644
--- a/src/common/db-object.h
+++ b/src/common/db-object.h
@@ -1,6 +1,6 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
- * Copyright (C) 2009 Debarshi Ray <rishi gnu org>
+ * Copyright (C) 2009, 2010 Debarshi Ray <rishi gnu org>
* Copyright (C) 2009 Santanu Sinha <santanu sinha gmail com>
*
* Solang is free software: you can redistribute it and/or modify it
@@ -33,7 +33,7 @@ class Database;
//Represents an object that is serialized to a database
class DBObject :
- public NonCopyable
+ private NonCopyable
{
public:
typedef sigc::slot<void> SlotAsyncReady;
diff --git a/src/common/finally.h b/src/common/finally.h
index 100be6b..98751d6 100644
--- a/src/common/finally.h
+++ b/src/common/finally.h
@@ -27,7 +27,7 @@ namespace Solang
{
class Finally :
- public NonCopyable
+ private NonCopyable
{
public:
Finally(const sigc::slot<void> & s) throw();
diff --git a/src/common/i-operation.h b/src/common/i-operation.h
index 672e543..7c68c92 100644
--- a/src/common/i-operation.h
+++ b/src/common/i-operation.h
@@ -36,7 +36,7 @@ namespace Solang
{
class IOperation :
- public NonCopyable,
+ private NonCopyable,
public sigc::trackable
{
public:
diff --git a/src/common/i-photo-destination.h b/src/common/i-photo-destination.h
index 373de63..634ec85 100644
--- a/src/common/i-photo-destination.h
+++ b/src/common/i-photo-destination.h
@@ -33,7 +33,7 @@ namespace Solang
class Application;
class IPhotoDestination :
- public NonCopyable
+ private NonCopyable
{
public:
virtual
diff --git a/src/common/i-photo-search-criteria.h b/src/common/i-photo-search-criteria.h
index 6758406..4f9eb44 100644
--- a/src/common/i-photo-search-criteria.h
+++ b/src/common/i-photo-search-criteria.h
@@ -31,7 +31,7 @@ namespace Solang
{
class IPhotoSearchCriteria :
- public NonCopyable
+ private NonCopyable
{
public:
enum ClubbingOperationType
diff --git a/src/common/i-photo-source.h b/src/common/i-photo-source.h
index 5ebb3ca..e8aff33 100644
--- a/src/common/i-photo-source.h
+++ b/src/common/i-photo-source.h
@@ -1,7 +1,7 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
* i-photo-source.h
- * Copyright (C) Debarshi Ray 2009 <rishi gnu org>
+ * Copyright (C) Debarshi Ray 2009, 2010 <rishi gnu org>
*
* photo-source.h is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -34,7 +34,7 @@ class Database;
class Tag;
class IPhotoSource :
- public NonCopyable
+ private NonCopyable
{
public:
virtual
diff --git a/src/common/i-plugin.h b/src/common/i-plugin.h
index 01155b4..c886ba2 100644
--- a/src/common/i-plugin.h
+++ b/src/common/i-plugin.h
@@ -33,7 +33,7 @@ class EnlargedRenderer;
class SlideshowRenderer;
class IPlugin :
- public NonCopyable
+ private NonCopyable
{
public:
virtual
diff --git a/src/common/i-renderer-selector.h b/src/common/i-renderer-selector.h
index d9b9e09..84dfc8b 100644
--- a/src/common/i-renderer-selector.h
+++ b/src/common/i-renderer-selector.h
@@ -1,6 +1,6 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
- * Copyright (C) 2009 Debarshi Ray <rishi gnu org>
+ * Copyright (C) 2009, 2010 Debarshi Ray <rishi gnu org>
*
* Solang is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -31,7 +31,7 @@ class EnlargedRenderer;
class SlideshowRenderer;
class IRendererSelector :
- public NonCopyable
+ private NonCopyable
{
public:
virtual
diff --git a/src/common/i-renderer.h b/src/common/i-renderer.h
index 7c9a386..cd79161 100644
--- a/src/common/i-renderer.h
+++ b/src/common/i-renderer.h
@@ -30,7 +30,7 @@ class IPlugin;
class IRendererSelector;
class IRenderer :
- public NonCopyable
+ private NonCopyable
{
public:
virtual
diff --git a/src/common/i-storage.h b/src/common/i-storage.h
index e2053a2..53bd84f 100644
--- a/src/common/i-storage.h
+++ b/src/common/i-storage.h
@@ -1,6 +1,7 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
* i-storage.h
+ * Copyright (C) Debarshi Ray 2010 <rishi gnu org>
* Copyright (C) Santanu Sinha 2009 <santanu sinha gmail com>
*
* i-storage.h is free software: you can redistribute it and/or modify it
@@ -31,7 +32,7 @@ namespace Solang
{
class IStorage :
- public NonCopyable
+ private NonCopyable
{
public:
virtual
diff --git a/src/common/non-copyable.h b/src/common/non-copyable.h
index f742ddd..d3d2a76 100644
--- a/src/common/non-copyable.h
+++ b/src/common/non-copyable.h
@@ -1,5 +1,6 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
+ * Copyright (C) 2010 Debarshi Ray <rishi gnu org>
* Copyright (C) 2009 Santanu Sinha <santanu sinha gmail com>
*
* Solang is free software: you can redistribute it and/or modify it
@@ -24,13 +25,11 @@ namespace Solang
class NonCopyable
{
-public:
- virtual
- ~NonCopyable();
-
protected:
NonCopyable();
-
+
+ ~NonCopyable();
+
private:
// Blocked.
NonCopyable(const NonCopyable & source);
diff --git a/src/editor/editor.cpp b/src/editor/editor.cpp
index d583c23..92facd6 100644
--- a/src/editor/editor.cpp
+++ b/src/editor/editor.cpp
@@ -39,7 +39,7 @@ namespace Solang
{
class IOperationFactory :
- public NonCopyable
+ private NonCopyable
{
public:
virtual
diff --git a/src/renderer/slideshow-window.h b/src/renderer/slideshow-window.h
index a4481a4..ea6cce4 100644
--- a/src/renderer/slideshow-window.h
+++ b/src/renderer/slideshow-window.h
@@ -1,6 +1,6 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
- * Copyright (C) 2009 Debarshi Ray <rishi gnu org>
+ * Copyright (C) 2009, 2010 Debarshi Ray <rishi gnu org>
*
* Solang is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -31,7 +31,7 @@ namespace Solang
class SlideshowWindow :
public Gtk::Window,
- public NonCopyable
+ private NonCopyable
{
public:
SlideshowWindow() throw();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]