15 #include <vsg/core/ConstVisitor.h>
16 #include <vsg/core/Visitor.h>
28 template<
class V,
typename I>
29 V visit(I begin, I end)
32 for (I itr = begin; itr != end; ++itr)
34 (*itr)->accept(visitor);
41 template<
class V,
typename P>
45 if (ptr) ptr->accept(visitor);
51 template<
class V,
typename P>
55 if (ptr) ptr->accept(visitor);
61 template<
class V,
typename C>
62 V visit(
const C& container)
65 for (
const auto&
object : container)
67 object->accept(visitor);
74 template<
class V,
typename C>
78 for (
auto&
object : container)
80 object->accept(visitor);
94 template<
class V,
typename I>
95 V& visit(V& visitor, I begin, I end)
97 for (I itr = begin; itr != end; ++itr)
99 (*itr)->accept(visitor);
108 template<
class V,
typename P>
111 if (ptr) ptr->accept(visitor);
119 template<
class V,
typename P>
120 V& visit(V& visitor, P* ptr)
122 if (ptr) ptr->accept(visitor);
130 template<
class V,
typename C>
131 V& visit(V& visitor,
const C& container)
133 for (
const auto&
object : container)
135 object->accept(visitor);
144 template<
class V,
typename C>
145 V& visit(V& visitor, C& container)
147 for (
auto&
object : container)
149 object->accept(visitor);