Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals
reflect » test

reflect/test/c_base.hpp

Go to the documentation of this file.
00001 //
00002 // Copyright (c) 2003
00003 // Paul Hamilton; pHamtec P/L
00004 //
00005 // Permission to use, copy, modify, distribute and sell this software
00006 // and its documentation for any purpose is hereby granted without fee, 
00007 // provided that the above copyright notice appears in all copies and 
00008 // that both the copyright notice and this permission notice appear in 
00009 // supporting documentation. No representations are made about the 
00010 // suitability of this software for any purpose. It is provided "as is" 
00011 // without express or implied warranty.
00012 //
00013 // c_base.hpp
00014 //
00015 // 4-Jul-2003 phamilton Created
00016 //
00017 
00018 #ifndef incC_BASE
00019 #define incC_BASE
00020 
00021 // forwards
00022 #include "../../common/object.hpp"
00023 #include "../../common/visitable_object.hpp"
00024 #include "../../common/deletable_object.hpp"
00025 #include "../../common/outerable_object.hpp"
00026 #include "../../common/composition_object.hpp"
00027 #include "../../common/composite_object.hpp"
00028 
00029 namespace reflect_test {
00030 
00031 class c_base :
00032 public ph::common::object_base,
00033 public ph::common::visitable_object_base,
00034 public ph::common::deletable_object_base,
00035 public ph::common::outerable_object_base,
00036 ph::common::outerable_helper,
00037 public ph::common::comparable_object_base,
00038 public ph::common::composite_object_base,
00039 public ph::common::composite_object_helper
00040 {
00041 public:
00042 c_base(ph::common::object_base *outer, const std::string &name) :
00043 ph::common::outerable_helper(outer), _name(name)
00044 {};
00045 
00046 // ph::common::object_base overrides
00047 virtual ph::common::deletable_object_base *deletable() 
00048 { return this; }
00049 virtual ph::common::outerable_object_base *outerable() 
00050 { return this; }
00051 virtual const ph::common::outerable_object_base *outerable() const 
00052 { return this; }
00053 virtual const ph::common::comparable_object_base *comparable() const 
00054 { return this; }
00055 virtual const ph::common::composition_object_base *composition() const 
00056 { return this; }
00057 virtual ph::common::composition_object_base *composition() 
00058 { return this; }
00059 virtual const visitable_object_base *visitable() const 
00060 { return this; }
00061 virtual visitable_object_base *visitable() 
00062 { return this; }
00063 
00064 // ph::common::outerable_object_base overides
00065 virtual ph::common::object_base *outer() const { return outer_helper(); }
00066 virtual void outer(ph::common::object_base *outer) { outer_helper(outer); }
00067 
00068 // ph::common::comparable_object_base overrides.
00069 virtual bool equal(const ph::common::object_base *obj) const
00070 { return helper_equal(obj, outer(), _name); }
00071 
00072 // object_base overrides
00073 virtual bool accept(ph::common::member_visitor *v);
00074 virtual bool accept(ph::common::const_member_visitor *v) const;
00075 virtual bool accept(ph::common::object_visitor *v)
00076 { return true; }
00077 virtual bool accept(ph::common::const_object_visitor *v) const
00078 { return true; }
00079 
00080 private:
00081 std::string _name;
00082 };
00083 
00084 };
00085 
00086 #endif // incC_BASE

Generated on Wed Apr 5 22:03:22 2006 for cppxmlobj by doxygen 1.4.3

AltStyle によって変換されたページ (->オリジナル) /