From e316a66b0bfba2ff8b746324544b028cdf9292c0 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 31 Jul 2007 14:39:46 +0000 Subject: src/qpid/framing/Visitor.h: - Removed depdency on Handler, Visitor is a separate pattern. - QPID_VISITOR macro to generate visitor classes replaces use of mpl (Default limits on mpl::vector (20) is too low, concenred about compile time problems if raised to 150. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@561345 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/tests/Visitor.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'cpp/src/tests/Visitor.cpp') diff --git a/cpp/src/tests/Visitor.cpp b/cpp/src/tests/Visitor.cpp index f491624cf8..0cb3cf15bb 100644 --- a/cpp/src/tests/Visitor.cpp +++ b/cpp/src/tests/Visitor.cpp @@ -29,19 +29,19 @@ struct DummyA; struct DummyB; struct DummyC; -typedef HandlerVisitor > DummyVisitor; +QPID_VISITOR(DummyVisitor, (DummyA)(DummyB)(DummyC)); -struct DummyFrame : public AbstractVisitable {}; +struct DummyFrame : public VisitableRoot {}; -struct DummyA : public ConcreteVisitable {}; -struct DummyB : public ConcreteVisitable {}; -struct DummyC : public ConcreteVisitable {}; +struct DummyA : public Visitable {}; +struct DummyB : public Visitable {}; +struct DummyC : public Visitable {}; struct TestDummyVisitor : public DummyVisitor { boost::tuple dummies; - void handle(DummyA& a) { dummies.get<0>() = &a; } - void handle(DummyB& b) { dummies.get<1>() = &b; } - void handle(DummyC& c) { dummies.get<2>() = &c; } + void visit(DummyA& a) { dummies.get<0>() = &a; } + void visit(DummyB& b) { dummies.get<1>() = &b; } + void visit(DummyC& c) { dummies.get<2>() = &c; } }; BOOST_AUTO_TEST_CASE(Visitor_accept) { -- cgit v1.2.1