00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef incC_REF
00019 #define incC_REF
00020
00021
00022 #include <string>
00023 #include "c_base.hpp"
00024 #include "../../common/ref_object.hpp"
00025 #include "../ref_object.hpp"
00026
00027 namespace reflect_test {
00028
00029 class c_ref :
00030 public c_base,
00031 public ph::common::ref_object_helper,
00032 public ph::reflect::ref_object_helper
00033
00034
00035
00036 {
00037 public:
00038 c_ref(ph::common::object_base *outer, const std::string &name) :
00039 c_base(outer, name)
00040 {};
00041
00042
00043 virtual bool accept(ph::common::member_visitor *v)
00044 {
00045 if (!c_base::accept(v))
00046 return false;
00047 return true;
00048 }
00049 virtual bool accept(ph::common::const_member_visitor *v) const
00050 {
00051 if (!c_base::accept(v))
00052 return false;
00053 return true;
00054 }
00055 virtual bool accept(ph::common::object_visitor *v)
00056 {
00057 if (!c_base::accept(v))
00058 return false;
00059 return helper_accept(this, _obj, v);
00060 }
00061 virtual bool accept(ph::common::const_object_visitor *v) const
00062 {
00063 if (!c_base::accept(v))
00064 return false;
00065 return helper_accept(this, _obj, v);
00066 }
00067
00068
00069 virtual bool add(ph::common::object_base *obj, bool own)
00070 { return helper_add(this, obj, own, owned()); }
00071 virtual bool remove(ph::common::object_base *obj)
00072 { return helper_remove(obj); }
00073 virtual bool singleton() const
00074 { return helper_singleton(); }
00075 virtual int count() const
00076 { return helper_count(); }
00077
00078
00079 virtual void delete_object()
00080 { helper_delete_object(owned()); }
00081 };
00082
00083 };
00084
00085 #endif // incC_REF