aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-20 00:07:04 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-20 00:07:04 +0000
commitf162820c7f31add0738860c7c355d482dee9f7e0 (patch)
tree984887fae1b067f09bedf57785bf5f1e7aa06830
parent867d2b7dfb8b82ec8a731080f6b51642ced8baf3 (diff)
downloadpaludis-f162820c7f31add0738860c7c355d482dee9f7e0.tar.gz
paludis-f162820c7f31add0738860c7c355d482dee9f7e0.tar.xz
Rename to TransformInsertIterator etc. rather from TranslateInsertIterator.
-rw-r--r--doc/doc_main.doxygen4
-rw-r--r--paludis/create_insert_iterator.hh2
-rw-r--r--paludis/files.m42
-rw-r--r--paludis/portage_repository.cc8
-rw-r--r--paludis/transform_insert_iterator.cc (renamed from paludis/translate_insert_iterator.cc)2
-rw-r--r--paludis/transform_insert_iterator.hh (renamed from paludis/translate_insert_iterator.hh)30
-rw-r--r--paludis/transform_insert_iterator_TEST.cc (renamed from paludis/translate_insert_iterator_TEST.cc)10
-rw-r--r--paludis/version_metadata.cc4
8 files changed, 31 insertions, 31 deletions
diff --git a/doc/doc_main.doxygen b/doc/doc_main.doxygen
index 388db48..a2507f5 100644
--- a/doc/doc_main.doxygen
+++ b/doc/doc_main.doxygen
@@ -170,8 +170,8 @@
* paludis::create_inserter) uses the inserted value to create an object.
* - paludis::FilterInsertIterator (which can be created via
* paludis::filter_inserter) only inserts the object if a predicate is true.
- * - paludis::TranslateInsertIterator (which can be created via
- * paludis::translate_inserter) performs a transformation upon the object to
+ * - paludis::TransformInsertIterator (which can be created via
+ * paludis::transform_inserter) performs a transformation upon the object to
* be inserted.
*
* Input iterator adapters:
diff --git a/paludis/create_insert_iterator.hh b/paludis/create_insert_iterator.hh
index c5faaea..b49eb23 100644
--- a/paludis/create_insert_iterator.hh
+++ b/paludis/create_insert_iterator.hh
@@ -105,7 +105,7 @@ namespace paludis
};
/**
- * Convenience function: make a TranslateInsertIterator.
+ * Convenience function: make a CreateInsertIterator.
*
* \ingroup Iterator
*/
diff --git a/paludis/files.m4 b/paludis/files.m4
index f9d6ebe..c3b8782 100644
--- a/paludis/files.m4
+++ b/paludis/files.m4
@@ -113,7 +113,7 @@ add(`stringify', `hh', `cc', `test')
add(`strip', `hh', `cc', `test')
add(`tokeniser', `hh', `cc', `test')
add(`test_environment', `hh', `cc')
-add(`translate_insert_iterator', `hh', `cc', `test')
+add(`transform_insert_iterator', `hh', `cc', `test')
add(`use_dep_atom', `hh', `cc')
add(`use_flag_name', `hh', `cc')
add(`use_flag_name_error', `hh', `cc')
diff --git a/paludis/portage_repository.cc b/paludis/portage_repository.cc
index 6cc7de2..08d1399 100644
--- a/paludis/portage_repository.cc
+++ b/paludis/portage_repository.cc
@@ -25,7 +25,7 @@
#include "strip.hh"
#include "is_file_with_extension.hh"
#include "filter_insert_iterator.hh"
-#include "translate_insert_iterator.hh"
+#include "transform_insert_iterator.hh"
#include "line_config_file.hh"
#include "key_value_config_file.hh"
#include "tokeniser.hh"
@@ -323,9 +323,9 @@ PortageRepository::need_version_names(const QualifiedPackageName & n) const
else
std::copy(DirIterator(path), DirIterator(),
filter_inserter(
- translate_inserter(
- translate_inserter(
- translate_inserter(v->inserter(),
+ transform_inserter(
+ transform_inserter(
+ transform_inserter(v->inserter(),
StripTrailingString(".ebuild")),
StripLeadingString(stringify(n.get<qpn_package>()) + "-")),
std::mem_fun_ref(&FSEntry::basename)),
diff --git a/paludis/translate_insert_iterator.cc b/paludis/transform_insert_iterator.cc
index e32b286..db03acc 100644
--- a/paludis/translate_insert_iterator.cc
+++ b/paludis/transform_insert_iterator.cc
@@ -18,5 +18,5 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "translate_insert_iterator.hh"
+#include "transform_insert_iterator.hh"
diff --git a/paludis/translate_insert_iterator.hh b/paludis/transform_insert_iterator.hh
index b0afa7b..cb037e5 100644
--- a/paludis/translate_insert_iterator.hh
+++ b/paludis/transform_insert_iterator.hh
@@ -18,8 +18,8 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef PALUDIS_GUARD_PALUDIS_TRANSLATE_INSERT_ITERATOR_HH
-#define PALUDIS_GUARD_PALUDIS_TRANSLATE_INSERT_ITERATOR_HH 1
+#ifndef PALUDIS_GUARD_PALUDIS_TRANSFORM_INSERT_ITERATOR_HH
+#define PALUDIS_GUARD_PALUDIS_TRANSFORM_INSERT_ITERATOR_HH 1
#include <functional>
#include <iterator>
@@ -27,13 +27,13 @@
namespace paludis
{
/**
- * A TranslateInsertIterator is an insert iterator that calls some function
+ * A TransformInsertIterator is an insert iterator that calls some function
* upon an item before inserting it.
*
* \ingroup Iterator
*/
template <typename Iter_, typename Trans_>
- class TranslateInsertIterator :
+ class TransformInsertIterator :
public std::iterator<typename std::iterator_traits<Iter_>::iterator_category, void, void, void, void>
{
private:
@@ -42,7 +42,7 @@ namespace paludis
public:
/**
- * Fake a container_type entry to allow a TranslateInsertIterator to
+ * Fake a container_type entry to allow a TransformInsertIterator to
* work with other iterator adapters.
*/
struct container_type
@@ -53,7 +53,7 @@ namespace paludis
/**
* Constructor, from an iterator.
*/
- TranslateInsertIterator(const Iter_ & i, const Trans_ & t) :
+ TransformInsertIterator(const Iter_ & i, const Trans_ & t) :
_i(i),
_t(t)
{
@@ -62,7 +62,7 @@ namespace paludis
/**
* Copy constructor.
*/
- TranslateInsertIterator(const TranslateInsertIterator & other) :
+ TransformInsertIterator(const TransformInsertIterator & other) :
_i(other._i),
_t(other._t)
{
@@ -72,7 +72,7 @@ namespace paludis
* Assignment.
*/
template <typename T_>
- const TranslateInsertIterator & operator= (const T_ value)
+ const TransformInsertIterator & operator= (const T_ value)
{
*_i = _t(value);
return *this;
@@ -81,7 +81,7 @@ namespace paludis
/**
* Dereference.
*/
- TranslateInsertIterator & operator* ()
+ TransformInsertIterator & operator* ()
{
return *this;
}
@@ -89,7 +89,7 @@ namespace paludis
/**
* Dereference arrow.
*/
- TranslateInsertIterator * operator-> ()
+ TransformInsertIterator * operator-> ()
{
return this;
}
@@ -97,7 +97,7 @@ namespace paludis
/**
* Increment.
*/
- TranslateInsertIterator & operator++ ()
+ TransformInsertIterator & operator++ ()
{
return *this;
}
@@ -105,7 +105,7 @@ namespace paludis
/**
* Increment.
*/
- TranslateInsertIterator & operator++ (int)
+ TransformInsertIterator & operator++ (int)
{
return *this;
}
@@ -113,15 +113,15 @@ namespace paludis
};
/**
- * Convenience function: make a TranslateInsertIterator.
+ * Convenience function: make a TransformInsertIterator.
*
* \ingroup Iterator
*/
template <typename Iter_, typename Trans_>
- TranslateInsertIterator<Iter_, Trans_> translate_inserter(
+ TransformInsertIterator<Iter_, Trans_> transform_inserter(
const Iter_ & i, const Trans_ & t)
{
- return TranslateInsertIterator<Iter_, Trans_>(i, t);
+ return TransformInsertIterator<Iter_, Trans_>(i, t);
}
}
diff --git a/paludis/translate_insert_iterator_TEST.cc b/paludis/transform_insert_iterator_TEST.cc
index 6ee7a6f..c07aa55 100644
--- a/paludis/translate_insert_iterator_TEST.cc
+++ b/paludis/transform_insert_iterator_TEST.cc
@@ -18,7 +18,7 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "translate_insert_iterator.hh"
+#include "transform_insert_iterator.hh"
#include <test/test_framework.hh>
#include <test/test_runner.hh>
#include <vector>
@@ -51,14 +51,14 @@ int f(const int & v)
namespace test_cases
{
- struct TranslateInsertIteratorTest : TestCase
+ struct TransformInsertIteratorTest : TestCase
{
- TranslateInsertIteratorTest() : TestCase("translate insert iterator") { }
+ TransformInsertIteratorTest() : TestCase("transform insert iterator") { }
void run()
{
std::vector<int> v;
- std::generate_n(translate_inserter(std::back_inserter(v), std::ptr_fun(&f)),
+ std::generate_n(transform_inserter(std::back_inserter(v), std::ptr_fun(&f)),
5, Counter());
TEST_CHECK_EQUAL(v.size(), 5);
for (int n = 0 ; n < 5 ; ++n)
@@ -67,6 +67,6 @@ namespace test_cases
TEST_CHECK_EQUAL(v.at(n), -n);
}
}
- } test_translate_insert_iterator;
+ } test_transform_insert_iterator;
}
diff --git a/paludis/version_metadata.cc b/paludis/version_metadata.cc
index a6e7dd2..868b0ea 100644
--- a/paludis/version_metadata.cc
+++ b/paludis/version_metadata.cc
@@ -20,7 +20,7 @@
#include "version_metadata.hh"
#include "create_insert_iterator.hh"
#include "tokeniser.hh"
-#include "translate_insert_iterator.hh"
+#include "transform_insert_iterator.hh"
#include <vector>
using namespace paludis;
@@ -131,7 +131,7 @@ VersionMetadata::begin_provide() const
{
Tokeniser<delim_kind::AnyOfTag, delim_mode::DelimiterTag> tokeniser(" \t\n");
tokeniser.tokenise(get(vmk_provide),
- translate_inserter(
+ transform_inserter(
std::inserter(_implementation->provide, _implementation->provide.begin()),
std::ptr_fun(&make_qualified_package_name)));
}