00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "bar.hpp"
00019 #include "../member.hpp"
00020 #include "../member_visitor.hpp"
00021 #include "../object_visitor.hpp"
00022
00023 using namespace ph::reflect;
00024 using namespace reflect_test;
00025
00026 bool bar::accept(ph::common::member_visitor *v)
00027 {
00028 if (!base::accept(v))
00029 return false;
00030 pod_member<int> _x(&x);
00031 if (!v->visit(this, "x", &_x))
00032 return false;
00033 pod_member<double> _y(&y);
00034 if (!v->visit(this, "y", &_y))
00035 return false;
00036 pod_member<int> _z(&z);
00037 if (!v->visit(this, "z", &_z))
00038 return false;
00039 return true;
00040 }
00041
00042 bool bar::accept(ph::common::const_member_visitor *v) const
00043 {
00044 if (!base::accept(v))
00045 return false;
00046 const_pod_member<int> _x(&x);
00047 if (!v->visit(this, "x", &_x))
00048 return false;
00049 const_pod_member<double> _y(&y);
00050 if (!v->visit(this, "y", &_y))
00051 return false;
00052 const_pod_member<int> _z(&z);
00053 if (!v->visit(this, "z", &_z))
00054 return false;
00055 return true;
00056 }
00057
00058 bool bar::accept(ph::common::object_visitor *v)
00059 {
00060 if (!base::accept(v))
00061 return false;
00062 if (!v->visit(this))
00063 return false;
00064 return true;
00065 }
00066
00067 bool bar::accept(ph::common::const_object_visitor *v) const
00068 {
00069 if (!base::accept(v))
00070 return false;
00071 if (!v->visit(this))
00072 return false;
00073 return true;
00074 }