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