[Debtags-commits] [svn] r1737 - in tagcoll/2.0: . tagcoll
tagcoll/coll tagcoll/stream
Enrico Zini
enrico at costa.debian.org
Tue May 9 00:59:41 UTC 2006
Author: enrico
Date: Tue May 9 00:59:38 2006
New Revision: 1737
Added:
tagcoll/2.0/tagcoll/coll/simple.cc
tagcoll/2.0/tagcoll/coll/simple.h
Removed:
tagcoll/2.0/tagcoll/InputMerger.cc
tagcoll/2.0/tagcoll/InputMerger.h
Modified:
tagcoll/2.0/ (props changed)
tagcoll/2.0/tagcoll/DerivedTags.cc
tagcoll/2.0/tagcoll/Expression.cc
tagcoll/2.0/tagcoll/Implications.cc
tagcoll/2.0/tagcoll/Implications.h
tagcoll/2.0/tagcoll/Makefile.am
tagcoll/2.0/tagcoll/PatchCollection.cc
tagcoll/2.0/tagcoll/Patches.cc
tagcoll/2.0/tagcoll/stream/expression.cc
tagcoll/2.0/tagcoll/stream/filters.cc
tagcoll/2.0/tagcoll/stream/substitutions.cc
tagcoll/2.0/tagcoll/test-utils.cc
tagcoll/2.0/tagcoll/test-utils.tcc
Log:
r2624 at viaza: enrico | 2006-05-08 13:35:49 -0500
Moved and renamed InputMerger as coll::Simple
Modified: tagcoll/2.0/tagcoll/DerivedTags.cc
==============================================================================
--- tagcoll/2.0/tagcoll/DerivedTags.cc (original)
+++ tagcoll/2.0/tagcoll/DerivedTags.cc Tue May 9 00:59:38 2006
@@ -37,7 +37,7 @@
#ifdef COMPILE_TESTSUITE
#include <tests/test-utils.h>
-#include <tagcoll/InputMerger.h>
+#include <tagcoll/coll/simple.h>
namespace wibble {
@@ -64,7 +64,7 @@
"c: milk\n"
"d: coffee, milk, sugar, sweet_cappuccino\n"
);
- coll::InputMerger<string, string> result;
+ coll::Simple<string, string> result;
DerivedTags derivations;
derivations.add("cappuccino", Expression("coffee && milk && !sugar"));
@@ -72,7 +72,7 @@
parseCollection(input_coll, addDerived(derivations, inserter(result)));
- coll::InputMerger<string, string> reference;
+ coll::Simple<string, string> reference;
parseCollection(output_coll, inserter(reference));
ensure_coll_equals(reference, result);
@@ -93,7 +93,7 @@
"c: milk\n"
"d: coffee, milk, sugar\n"
);
- coll::InputMerger<string, string> result;
+ coll::Simple<string, string> result;
DerivedTags derivations;
derivations.add("cappuccino", Expression("coffee && milk && !sugar"));
@@ -101,7 +101,7 @@
parseCollection(input_coll, removeDerived(derivations, inserter(result)));
- coll::InputMerger<string, string> reference;
+ coll::Simple<string, string> reference;
parseCollection(output_coll, inserter(reference));
ensure_coll_equals(reference, result);
Modified: tagcoll/2.0/tagcoll/Expression.cc
==============================================================================
--- tagcoll/2.0/tagcoll/Expression.cc (original)
+++ tagcoll/2.0/tagcoll/Expression.cc Tue May 9 00:59:38 2006
@@ -207,8 +207,6 @@
#include <tests/test-utils.h>
-#include <tagcoll/InputMerger.h>
-
namespace wibble {
namespace tut {
using namespace tagcoll;
Modified: tagcoll/2.0/tagcoll/Implications.cc
==============================================================================
--- tagcoll/2.0/tagcoll/Implications.cc (original)
+++ tagcoll/2.0/tagcoll/Implications.cc Tue May 9 00:59:38 2006
@@ -121,7 +121,7 @@
#include <tests/test-utils.h>
-#include <tagcoll/InputMerger.h>
+#include <tagcoll/coll/simple.h>
namespace wibble {
namespace tut {
@@ -152,13 +152,13 @@
"c: coffee, milk, sugar, awake, sweet, bitter\n"
"d: sugar, sweet\n"
);
- coll::InputMerger<string, string> result;
+ coll::Simple<string, string> result;
Implications<string> implications;
parseCollection(input_impl, inserter(implications));
parseCollection(input_coll, addImplied(implications, inserter(result)));
- coll::InputMerger<string, string> reference;
+ coll::Simple<string, string> reference;
parseCollection(output_coll, inserter(reference));
ensure_coll_equals(reference, result);
@@ -184,13 +184,13 @@
"c: coffee, milk, sugar\n"
"d: sugar\n"
);
- coll::InputMerger<string, string> result;
+ coll::Simple<string, string> result;
Implications<string> implications;
parseCollection(input_impl, inserter(implications));
parseCollection(input_coll, removeImplied(implications, inserter(result)));
- coll::InputMerger<string, string> reference;
+ coll::Simple<string, string> reference;
parseCollection(output_coll, inserter(reference));
ensure_coll_equals(reference, result);
Modified: tagcoll/2.0/tagcoll/Implications.h
==============================================================================
--- tagcoll/2.0/tagcoll/Implications.h (original)
+++ tagcoll/2.0/tagcoll/Implications.h Tue May 9 00:59:38 2006
@@ -25,7 +25,7 @@
#include <wibble/operators.h>
#include <wibble/mixin.h>
-#include <tagcoll/InputMerger.h>
+#include <tagcoll/coll/simple.h>
#include <map>
namespace tagcoll
@@ -35,7 +35,7 @@
* List of explicit implications that can be applied to a tagged collection.
*/
template <class TAG>
-class Implications : public coll::InputMerger<TAG, TAG>
+class Implications : public coll::Simple<TAG, TAG>
{
protected:
/// Get the set of all tags seen when walking through all parent lists
Modified: tagcoll/2.0/tagcoll/Makefile.am
==============================================================================
--- tagcoll/2.0/tagcoll/Makefile.am (original)
+++ tagcoll/2.0/tagcoll/Makefile.am Tue May 9 00:59:38 2006
@@ -16,12 +16,12 @@
stream/filters.h \
stream/expression.h \
stream/substitutions.h \
- Consumer.h \
coll/base.h \
+ coll/simple.h \
+ coll/simple.cc \
+ Consumer.h \
Patches.h \
Patches.tcc \
- InputMerger.h \
- InputMerger.cc \
PatchCollection.h \
PatchCollection.cc \
\
@@ -63,9 +63,9 @@
stream/filters.cc \
stream/expression.cc \
stream/substitutions.cc \
+ coll/simple.cc \
Consumer.cc \
Patches.cc \
- InputMerger.cc \
PatchCollection.cc \
\
Serializer.cc \
Modified: tagcoll/2.0/tagcoll/PatchCollection.cc
==============================================================================
--- tagcoll/2.0/tagcoll/PatchCollection.cc (original)
+++ tagcoll/2.0/tagcoll/PatchCollection.cc Tue May 9 00:59:38 2006
@@ -204,7 +204,7 @@
#ifdef COMPILE_TESTSUITE
#include <tests/test-utils.h>
-#include <tagcoll/InputMerger.h>
+#include <tagcoll/coll/simple.h>
namespace wibble {
namespace tut {
@@ -218,10 +218,10 @@
template<> template<>
void to::test<1>()
{
- // Use an InputMerger as the embedded collection
- coll::InputMerger<string, string> startcoll;
+ // Use a coll::Simple as the embedded collection
+ coll::Simple<string, string> startcoll;
- coll::PatchCollection< coll::InputMerger<string, string> > coll(startcoll);
+ coll::PatchCollection< coll::Simple<string, string> > coll(startcoll);
output_test_collection(inserter(coll));
test_readonly_collection(coll);
@@ -230,10 +230,10 @@
template<> template<>
void to::test<2>()
{
- // Use an InputMerger as the embedded collection
- coll::InputMerger<string, string> startcoll;
+ // Use a coll::Simple as the embedded collection
+ coll::Simple<string, string> startcoll;
- coll::PatchCollection< coll::InputMerger<string, string> > coll(startcoll);
+ coll::PatchCollection< coll::Simple<string, string> > coll(startcoll);
test_collection(coll);
}
Modified: tagcoll/2.0/tagcoll/Patches.cc
==============================================================================
--- tagcoll/2.0/tagcoll/Patches.cc (original)
+++ tagcoll/2.0/tagcoll/Patches.cc Tue May 9 00:59:38 2006
@@ -28,7 +28,7 @@
#ifdef COMPILE_TESTSUITE
#include <tests/test-utils.h>
-#include <tagcoll/InputMerger.h>
+#include <tagcoll/coll/simple.h>
namespace wibble {
namespace tut {
@@ -56,7 +56,7 @@
"c: \n"
"d: c::D, c::d, e::F\n"
);
- coll::InputMerger<string, string> result;
+ coll::Simple<string, string> result;
PatchList<string, string> patches;
std::set<string> added;
@@ -76,7 +76,7 @@
parseCollection(input_coll, patcher(patches, inserter(result)));
- coll::InputMerger<string, string> reference;
+ coll::Simple<string, string> reference;
parseCollection(output_coll, inserter(reference));
ensure_coll_equals(reference, result);
Modified: tagcoll/2.0/tagcoll/stream/expression.cc
==============================================================================
--- tagcoll/2.0/tagcoll/stream/expression.cc (original)
+++ tagcoll/2.0/tagcoll/stream/expression.cc Tue May 9 00:59:38 2006
@@ -23,7 +23,7 @@
#ifdef COMPILE_TESTSUITE
#include <tests/test-utils.h>
-#include <tagcoll/InputMerger.h>
+#include <tagcoll/coll/simple.h>
namespace wibble {
namespace tut {
@@ -31,7 +31,6 @@
using namespace tagcoll;
using namespace tagcoll::stream;
using namespace tagcoll::tests;
-using namespace tagcoll::coll;
struct tagcoll_stream_expression_shar {
};
@@ -50,11 +49,11 @@
"a: b, c\n"
"d: c::D, e::F, f::g\n"
);
- InputMerger<string, string> result;
+ coll::Simple<string, string> result;
parseCollection(input_coll, filterItemsByExpression(
"(*::D && e::F) || c", inserter(result)));
- InputMerger<string, string> reference;
+ coll::Simple<string, string> reference;
parseCollection(output_coll, inserter(reference));
ensure_coll_equals(reference, result);
@@ -74,11 +73,11 @@
"b: *::D\n"
"d: c::D, e::F\n"
);
- InputMerger<string, string> result;
+ coll::Simple<string, string> result;
parseCollection(input_coll, filterTagsByExpression(
"*::D || e::F || c", ExpressionFilter::PLAIN, inserter(result)));
- InputMerger<string, string> reference;
+ coll::Simple<string, string> reference;
parseCollection(output_coll, inserter(reference));
ensure_coll_equals(reference, result);
Modified: tagcoll/2.0/tagcoll/stream/filters.cc
==============================================================================
--- tagcoll/2.0/tagcoll/stream/filters.cc (original)
+++ tagcoll/2.0/tagcoll/stream/filters.cc Tue May 9 00:59:38 2006
@@ -25,7 +25,7 @@
#include <tests/test-utils.h>
#include <tagcoll/stream/sink.h>
-#include <tagcoll/InputMerger.h>
+#include <tagcoll/coll/simple.h>
namespace wibble {
namespace tut {
@@ -33,7 +33,6 @@
using namespace tagcoll;
using namespace tagcoll::stream;
using namespace tagcoll::tests;
-using namespace tagcoll::coll;
struct tagcoll_stream_filters_shar {
};
@@ -51,10 +50,10 @@
"b: c::D, e::F, f::g\n"
"c: c::D, e, f::g\n"
);
- InputMerger<string, string> result;
+ coll::Simple<string, string> result;
parseCollection(input_coll, untaggedRemover(inserter(result)));
- InputMerger<string, string> reference;
+ coll::Simple<string, string> reference;
parseCollection(output_coll, inserter(reference));
ensure_coll_equals(reference, result);
@@ -71,10 +70,10 @@
std::string output_coll(
"a: \n"
);
- InputMerger<string, string> result;
+ coll::Simple<string, string> result;
parseCollection(input_coll, untaggedRemover(inserter(result), true));
- InputMerger<string, string> reference;
+ coll::Simple<string, string> reference;
parseCollection(output_coll, inserter(reference));
ensure_coll_equals(reference, result);
@@ -93,10 +92,10 @@
"b: c::D, e::F, f::g\n"
"c: c::D, f::g\n"
);
- InputMerger<string, string> result;
+ coll::Simple<string, string> result;
parseCollection(input_coll, unfacetedRemover(inserter(result)));
- InputMerger<string, string> reference;
+ coll::Simple<string, string> reference;
parseCollection(output_coll, inserter(reference));
ensure_coll_equals(reference, result);
@@ -115,10 +114,10 @@
"b: c---D, e---F, f---g\n"
"c: c---D, f---g\n"
);
- InputMerger<string, string> result;
+ coll::Simple<string, string> result;
parseCollection(input_coll, unfacetedRemover(inserter(result), "---"));
- InputMerger<string, string> reference;
+ coll::Simple<string, string> reference;
parseCollection(output_coll, inserter(reference));
ensure_coll_equals(reference, result);
@@ -137,10 +136,10 @@
"b:\n"
"c: \n"
);
- InputMerger<string, string> result;
+ coll::Simple<string, string> result;
parseCollection(input_coll, itemsOnly(inserter(result)));
- InputMerger<string, string> reference;
+ coll::Simple<string, string> reference;
parseCollection(output_coll, inserter(reference));
ensure_coll_equals(reference, result);
@@ -160,10 +159,10 @@
"3: c\n"
"z: b\n"
);
- InputMerger<string, string> result;
+ coll::Simple<string, string> result;
parseCollection(input_coll, reverser(string("z"), inserter(result)));
- InputMerger<string, string> reference;
+ coll::Simple<string, string> reference;
parseCollection(output_coll, inserter(reference));
ensure_coll_equals(reference, result);
Modified: tagcoll/2.0/tagcoll/stream/substitutions.cc
==============================================================================
--- tagcoll/2.0/tagcoll/stream/substitutions.cc (original)
+++ tagcoll/2.0/tagcoll/stream/substitutions.cc Tue May 9 00:59:38 2006
@@ -23,7 +23,7 @@
#ifdef COMPILE_TESTSUITE
#include <tests/test-utils.h>
-#include <tagcoll/InputMerger.h>
+#include <tagcoll/coll/simple.h>
namespace wibble {
namespace tut {
@@ -31,7 +31,6 @@
using namespace tagcoll;
using namespace tagcoll::stream;
using namespace tagcoll::tests;
-using namespace tagcoll::coll;
struct tagcoll_stream_substitutions_shar {
};
@@ -56,13 +55,13 @@
"c: \n"
"d: c::D, f::g\n"
);
- InputMerger<string, string> result;
+ coll::Simple<string, string> result;
Substitutions<string> changes;
parseCollection(input_subst, changes.inserter());
parseCollection(input_coll, substitute(changes, inserter(result)));
- InputMerger<string, string> reference;
+ coll::Simple<string, string> reference;
parseCollection(output_coll, inserter(reference));
ensure_coll_equals(reference, result);
Modified: tagcoll/2.0/tagcoll/test-utils.cc
==============================================================================
--- tagcoll/2.0/tagcoll/test-utils.cc (original)
+++ tagcoll/2.0/tagcoll/test-utils.cc Tue May 9 00:59:38 2006
@@ -23,7 +23,6 @@
#include <tests/test-utils.h>
#include <tagcoll/StringParserInput.h>
#include <tagcoll/TextFormat.h>
-#include <tagcoll/InputMerger.h>
#include <tagcoll/Patches.h>
#include <wibble/operators.h>
Modified: tagcoll/2.0/tagcoll/test-utils.tcc
==============================================================================
--- tagcoll/2.0/tagcoll/test-utils.tcc (original)
+++ tagcoll/2.0/tagcoll/test-utils.tcc Tue May 9 00:59:38 2006
@@ -25,7 +25,7 @@
#include <tests/test-utils.h>
#include <tagcoll/Patches.h>
-#include <tagcoll/InputMerger.h>
+#include <tagcoll/coll/simple.h>
#include <wibble/operators.h>
namespace tagcoll {
@@ -291,7 +291,7 @@
// TODO: virtual std::set<ITEM> getRelatedItems(const std::set<TAG>& tags, int maxdistance = 1) const
// void output(Consumer<ITEM, TAG>& consumer) const
- coll::InputMerger<string, string> coll1;
+ coll::Simple<string, string> coll1;
tc.output(inserter(coll1));
inner_ensure_coll_equals(tc, coll1);
More information about the Debtags-commits
mailing list