allow access to the pointee's TypeId.
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Wed, 09 Apr 2008 14:28:16 -0700
changeset 2932 db96af55f46e
parent 2931 5bee690ea6b6
child 2933 c7983cfa2cb3
allow access to the pointee's TypeId.
src/core/pointer.h
--- a/src/core/pointer.h	Wed Apr 09 13:05:20 2008 -0700
+++ b/src/core/pointer.h	Wed Apr 09 14:28:16 2008 -0700
@@ -76,7 +76,11 @@
 MakePointerAccessor (Ptr<U> (T::*getter) (void) const,
 		     void (T::*setter) (Ptr<U>));
 
-class PointerChecker : public AttributeChecker {};
+class PointerChecker : public AttributeChecker 
+{
+public:
+  virtual TypeId GetPointeeTypeId (void) const = 0;
+};
 template <typename T>
 Ptr<AttributeChecker> MakePointerChecker (void);
 
@@ -121,6 +125,9 @@
   virtual Attribute Create (void) const {
     return Attribute::Create<PointerValue> ();
   }
+  virtual TypeId GetPointeeTypeId (void) const {
+    return T::GetTypeId ();
+  }
 };
 
 /********************************************************