aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-09 10:23:12 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-09 10:23:12 +0000
commit7a2c9e974666881f44406c88189ae546a67ff0b7 (patch)
treef6846da02bf779a262f58e5042f3fa1bbf7415d3 /src
parent7f7c79fcc67df4fae498ca943e36592d3f7a3ad2 (diff)
downloadpaludis-7a2c9e974666881f44406c88189ae546a67ff0b7.tar.gz
paludis-7a2c9e974666881f44406c88189ae546a67ff0b7.tar.xz
Rework Pimp to avoid ImpPtr ickiness
Fixes: ticket:1070
Diffstat (limited to 'src')
-rw-r--r--src/clients/cave/cmd_resolve_display_callback.cc4
-rw-r--r--src/clients/cave/cmd_resolve_display_callback.hh7
-rw-r--r--src/clients/cave/command_factory.cc4
-rw-r--r--src/clients/cave/command_factory.hh5
-rw-r--r--src/clients/cave/format_user_config.cc4
-rw-r--r--src/clients/cave/format_user_config.hh5
-rw-r--r--src/clients/cave/script_command.cc4
-rw-r--r--src/clients/cave/script_command.hh6
-rw-r--r--src/clients/inquisitio/exact_matcher.cc4
-rw-r--r--src/clients/inquisitio/exact_matcher.hh8
-rw-r--r--src/clients/inquisitio/key_extractor.cc4
-rw-r--r--src/clients/inquisitio/key_extractor.hh6
-rw-r--r--src/clients/inquisitio/pcre_matcher.cc4
-rw-r--r--src/clients/inquisitio/pcre_matcher.hh8
-rw-r--r--src/clients/inquisitio/text_matcher.cc4
-rw-r--r--src/clients/inquisitio/text_matcher.hh8
-rw-r--r--src/output/console_query_task.cc2
-rw-r--r--src/output/console_query_task.hh6
-rw-r--r--src/output/mask_displayer.cc4
-rw-r--r--src/output/mask_displayer.hh8
20 files changed, 61 insertions, 44 deletions
diff --git a/src/clients/cave/cmd_resolve_display_callback.cc b/src/clients/cave/cmd_resolve_display_callback.cc
index fbad2c06c..7dd3c8ad3 100644
--- a/src/clients/cave/cmd_resolve_display_callback.cc
+++ b/src/clients/cave/cmd_resolve_display_callback.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2009, 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -52,7 +52,7 @@ namespace paludis
DisplayCallback::DisplayCallback(const std::string & s) :
- Pimp<DisplayCallback>(s)
+ _imp(s)
{
if (_imp->output)
std::cout << _imp->stage << std::flush;
diff --git a/src/clients/cave/cmd_resolve_display_callback.hh b/src/clients/cave/cmd_resolve_display_callback.hh
index 1f8e993fd..249c13d2b 100644
--- a/src/clients/cave/cmd_resolve_display_callback.hh
+++ b/src/clients/cave/cmd_resolve_display_callback.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2009, 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -33,10 +33,11 @@ namespace paludis
{
};
- class DisplayCallback :
- private Pimp<DisplayCallback>
+ class DisplayCallback
{
private:
+ Pimp<DisplayCallback> _imp;
+
void update() const;
public:
diff --git a/src/clients/cave/command_factory.cc b/src/clients/cave/command_factory.cc
index 0192ec841..9fd9c2257 100644
--- a/src/clients/cave/command_factory.cc
+++ b/src/clients/cave/command_factory.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2008, 2009, 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -124,7 +124,7 @@ namespace
}
CommandFactory::CommandFactory() :
- Pimp<CommandFactory>()
+ _imp()
{
std::vector<std::string> paths;
tokenise<delim_kind::AnyOfTag, delim_mode::DelimiterTag>(getenv_with_default("CAVE_COMMANDS_PATH", LIBEXECDIR "/cave/commands"),
diff --git a/src/clients/cave/command_factory.hh b/src/clients/cave/command_factory.hh
index 943568cc5..dc3a60999 100644
--- a/src/clients/cave/command_factory.hh
+++ b/src/clients/cave/command_factory.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008, 2010 Ciaran McCreesh
+ * Copyright (c) 2008, 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -40,12 +40,13 @@ namespace paludis
};
class PALUDIS_VISIBLE CommandFactory :
- private Pimp<CommandFactory>,
public Singleton<CommandFactory>
{
friend class Singleton<CommandFactory>;
private:
+ Pimp<CommandFactory> _imp;
+
CommandFactory();
~CommandFactory();
diff --git a/src/clients/cave/format_user_config.cc b/src/clients/cave/format_user_config.cc
index 34ca5729c..3af8a3584 100644
--- a/src/clients/cave/format_user_config.cc
+++ b/src/clients/cave/format_user_config.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2010 Ciaran McCreesh
+ * Copyright (c) 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -106,7 +106,7 @@ namespace paludis
}
FormatUserConfigFile::FormatUserConfigFile() :
- Pimp<FormatUserConfigFile>()
+ _imp()
{
}
diff --git a/src/clients/cave/format_user_config.hh b/src/clients/cave/format_user_config.hh
index 86fcac53c..ec954761b 100644
--- a/src/clients/cave/format_user_config.hh
+++ b/src/clients/cave/format_user_config.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2010 Ciaran McCreesh
+ * Copyright (c) 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -36,12 +36,13 @@ namespace paludis
void set_want_colours(const bool v);
class FormatUserConfigFile :
- private Pimp<FormatUserConfigFile>,
public Singleton<FormatUserConfigFile>
{
friend class Singleton<FormatUserConfigFile>;
private:
+ Pimp<FormatUserConfigFile> _imp;
+
FormatUserConfigFile();
~FormatUserConfigFile();
diff --git a/src/clients/cave/script_command.cc b/src/clients/cave/script_command.cc
index d4aae5cf3..e3e0f6da7 100644
--- a/src/clients/cave/script_command.cc
+++ b/src/clients/cave/script_command.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2010 Ciaran McCreesh
+ * Copyright (c) 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -52,7 +52,7 @@ namespace paludis
}
ScriptCommand::ScriptCommand(const std::string &, const FSPath & e) :
- Pimp<ScriptCommand>(e)
+ _imp(e)
{
}
diff --git a/src/clients/cave/script_command.hh b/src/clients/cave/script_command.hh
index 0308fb8e9..1ee4a2c4f 100644
--- a/src/clients/cave/script_command.hh
+++ b/src/clients/cave/script_command.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2010 Ciaran McCreesh
+ * Copyright (c) 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -29,9 +29,11 @@ namespace paludis
namespace cave
{
class PALUDIS_VISIBLE ScriptCommand :
- private Pimp<ScriptCommand>,
public Command
{
+ private:
+ Pimp<ScriptCommand> _imp;
+
public:
ScriptCommand(const std::string &, const FSPath &);
~ScriptCommand();
diff --git a/src/clients/inquisitio/exact_matcher.cc b/src/clients/inquisitio/exact_matcher.cc
index 7c9f8abc3..210456009 100644
--- a/src/clients/inquisitio/exact_matcher.cc
+++ b/src/clients/inquisitio/exact_matcher.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2010 Ciaran McCreesh
+ * Copyright (c) 2007, 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -39,7 +39,7 @@ namespace paludis
}
ExactMatcher::ExactMatcher(const std::string & s) :
- Pimp<ExactMatcher>(s)
+ _imp(s)
{
}
diff --git a/src/clients/inquisitio/exact_matcher.hh b/src/clients/inquisitio/exact_matcher.hh
index 975da047c..7cc7d3988 100644
--- a/src/clients/inquisitio/exact_matcher.hh
+++ b/src/clients/inquisitio/exact_matcher.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007 Ciaran McCreesh
+ * Copyright (c) 2007, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -26,9 +26,11 @@
namespace inquisitio
{
class ExactMatcher :
- public Matcher,
- private paludis::Pimp<ExactMatcher>
+ public Matcher
{
+ private:
+ paludis::Pimp<ExactMatcher> _imp;
+
public:
ExactMatcher(const std::string &);
virtual ~ExactMatcher();
diff --git a/src/clients/inquisitio/key_extractor.cc b/src/clients/inquisitio/key_extractor.cc
index 625442763..3895cdeac 100644
--- a/src/clients/inquisitio/key_extractor.cc
+++ b/src/clients/inquisitio/key_extractor.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009, 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -61,7 +61,7 @@ namespace paludis
KeyExtractor::KeyExtractor(const std::string & k, const bool f, const bool v,
const Environment & e) :
- Pimp<KeyExtractor>(k, f, v, e)
+ _imp(k, f, v, e)
{
}
diff --git a/src/clients/inquisitio/key_extractor.hh b/src/clients/inquisitio/key_extractor.hh
index d9aa9377c..1205a697a 100644
--- a/src/clients/inquisitio/key_extractor.hh
+++ b/src/clients/inquisitio/key_extractor.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2010 Ciaran McCreesh
+ * Copyright (c) 2007, 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -27,9 +27,11 @@
namespace inquisitio
{
class KeyExtractor :
- private paludis::Pimp<KeyExtractor>,
public Extractor
{
+ private:
+ paludis::Pimp<KeyExtractor> _imp;
+
public:
KeyExtractor(const std::string &, const bool flatten, const bool visible_only,
const paludis::Environment &);
diff --git a/src/clients/inquisitio/pcre_matcher.cc b/src/clients/inquisitio/pcre_matcher.cc
index dcf285788..03ff84491 100644
--- a/src/clients/inquisitio/pcre_matcher.cc
+++ b/src/clients/inquisitio/pcre_matcher.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2007, 2009, 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -41,7 +41,7 @@ namespace paludis
}
PCREMatcher::PCREMatcher(const std::string & s) :
- Pimp<PCREMatcher>(s)
+ _imp(s)
{
}
diff --git a/src/clients/inquisitio/pcre_matcher.hh b/src/clients/inquisitio/pcre_matcher.hh
index 2b2c62884..3120ecd22 100644
--- a/src/clients/inquisitio/pcre_matcher.hh
+++ b/src/clients/inquisitio/pcre_matcher.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2009 Ciaran McCreesh
+ * Copyright (c) 2007, 2009, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -26,9 +26,11 @@
namespace inquisitio
{
class PCREMatcher :
- public Matcher,
- private paludis::Pimp<PCREMatcher>
+ public Matcher
{
+ private:
+ paludis::Pimp<PCREMatcher> _imp;
+
public:
PCREMatcher(const std::string &);
virtual ~PCREMatcher();
diff --git a/src/clients/inquisitio/text_matcher.cc b/src/clients/inquisitio/text_matcher.cc
index 736e237a7..131db2b5e 100644
--- a/src/clients/inquisitio/text_matcher.cc
+++ b/src/clients/inquisitio/text_matcher.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2010 Ciaran McCreesh
+ * Copyright (c) 2007, 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -39,7 +39,7 @@ namespace paludis
}
TextMatcher::TextMatcher(const std::string & s) :
- Pimp<TextMatcher>(s)
+ _imp(s)
{
}
diff --git a/src/clients/inquisitio/text_matcher.hh b/src/clients/inquisitio/text_matcher.hh
index eadb72c38..e7b5635c8 100644
--- a/src/clients/inquisitio/text_matcher.hh
+++ b/src/clients/inquisitio/text_matcher.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007 Ciaran McCreesh
+ * Copyright (c) 2007, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -26,9 +26,11 @@
namespace inquisitio
{
class TextMatcher :
- public Matcher,
- private paludis::Pimp<TextMatcher>
+ public Matcher
{
+ private:
+ paludis::Pimp<TextMatcher> _imp;
+
public:
TextMatcher(const std::string &);
virtual ~TextMatcher();
diff --git a/src/output/console_query_task.cc b/src/output/console_query_task.cc
index efd5b35f7..ba10752ac 100644
--- a/src/output/console_query_task.cc
+++ b/src/output/console_query_task.cc
@@ -79,7 +79,7 @@ namespace
}
ConsoleQueryTask::ConsoleQueryTask(const Environment * const e) :
- Pimp<ConsoleQueryTask>(e)
+ _imp(e)
{
}
diff --git a/src/output/console_query_task.hh b/src/output/console_query_task.hh
index 994b2abc7..ab84f85a2 100644
--- a/src/output/console_query_task.hh
+++ b/src/output/console_query_task.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -34,9 +34,11 @@
namespace paludis
{
class PALUDIS_VISIBLE ConsoleQueryTask :
- private Pimp<ConsoleQueryTask>,
public ConsoleTask
{
+ private:
+ Pimp<ConsoleQueryTask> _imp;
+
protected:
ConsoleQueryTask(const Environment * const env);
diff --git a/src/output/mask_displayer.cc b/src/output/mask_displayer.cc
index 7f6002e43..3b0a68315 100644
--- a/src/output/mask_displayer.cc
+++ b/src/output/mask_displayer.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009, 2010, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -221,7 +221,7 @@ namespace
MaskDisplayer::MaskDisplayer(const Environment * const e, const std::shared_ptr<const PackageID> & id,
const bool want_description) :
- Pimp<MaskDisplayer>(e, id, want_description)
+ _imp(e, id, want_description)
{
}
diff --git a/src/output/mask_displayer.hh b/src/output/mask_displayer.hh
index 971265c34..fa360f119 100644
--- a/src/output/mask_displayer.hh
+++ b/src/output/mask_displayer.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2011 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -27,9 +27,11 @@
namespace paludis
{
- class MaskDisplayer :
- private Pimp<MaskDisplayer>
+ class MaskDisplayer
{
+ private:
+ Pimp<MaskDisplayer> _imp;
+
public:
MaskDisplayer(const Environment * const, const std::shared_ptr<const PackageID> &,
const bool want_description);