Skip to content

Make Visitable Repository and Factory

Gerd Hirsch edited this page Mar 10, 2018 · 6 revisions

This is the definition of the Repository and the Factory of the NonVisitableExample.

class NonVisitable;
using typelist = VisitorFramework::Typelist< NonVisitable, int, double>;

//CAR = CyclicAcyclicRepository
namespace CAR = VisitorFramework::Cyclic;
using Repository = CAR::Repository
<
    VisitorFramework::StdOutLoggingPolicy,
    BaseKind::Default,
    typelist
>;
using Factory = VisitorFramework::VisitableFactory<Repository>;

using Visitable = std::shared_ptr<Repository::Visitable>;
using Visitables = std::vector<Visitable>;