allow access to the pointee's TypeId.
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Wed Apr 09 14:28:16 2008 -0700 (22 months ago)
changeset 2932db96af55f46e
parent 2931 5bee690ea6b6
child 2933 c7983cfa2cb3
allow access to the pointee's TypeId.
src/core/pointer.h
     1.1 --- a/src/core/pointer.h	Wed Apr 09 13:05:20 2008 -0700
     1.2 +++ b/src/core/pointer.h	Wed Apr 09 14:28:16 2008 -0700
     1.3 @@ -76,7 +76,11 @@
     1.4  MakePointerAccessor (Ptr<U> (T::*getter) (void) const,
     1.5  		     void (T::*setter) (Ptr<U>));
     1.6  
     1.7 -class PointerChecker : public AttributeChecker {};
     1.8 +class PointerChecker : public AttributeChecker 
     1.9 +{
    1.10 +public:
    1.11 +  virtual TypeId GetPointeeTypeId (void) const = 0;
    1.12 +};
    1.13  template <typename T>
    1.14  Ptr<AttributeChecker> MakePointerChecker (void);
    1.15  
    1.16 @@ -121,6 +125,9 @@
    1.17    virtual Attribute Create (void) const {
    1.18      return Attribute::Create<PointerValue> ();
    1.19    }
    1.20 +  virtual TypeId GetPointeeTypeId (void) const {
    1.21 +    return T::GetTypeId ();
    1.22 +  }
    1.23  };
    1.24  
    1.25  /********************************************************