src/core/pointer.h
changeset 2932 db96af55f46e
parent 2929 ac861a001a2a
child 2947 b0fec3381418
equal deleted inserted replaced
2931:5bee690ea6b6 2932:db96af55f46e
    74 template <typename T, typename U>
    74 template <typename T, typename U>
    75 Ptr<const AttributeAccessor>
    75 Ptr<const AttributeAccessor>
    76 MakePointerAccessor (Ptr<U> (T::*getter) (void) const,
    76 MakePointerAccessor (Ptr<U> (T::*getter) (void) const,
    77 		     void (T::*setter) (Ptr<U>));
    77 		     void (T::*setter) (Ptr<U>));
    78 
    78 
    79 class PointerChecker : public AttributeChecker {};
    79 class PointerChecker : public AttributeChecker 
       
    80 {
       
    81 public:
       
    82   virtual TypeId GetPointeeTypeId (void) const = 0;
       
    83 };
    80 template <typename T>
    84 template <typename T>
    81 Ptr<AttributeChecker> MakePointerChecker (void);
    85 Ptr<AttributeChecker> MakePointerChecker (void);
    82 
    86 
    83 } // namespace ns3
    87 } // namespace ns3
    84 
    88 
   119     return "";
   123     return "";
   120   }
   124   }
   121   virtual Attribute Create (void) const {
   125   virtual Attribute Create (void) const {
   122     return Attribute::Create<PointerValue> ();
   126     return Attribute::Create<PointerValue> ();
   123   }
   127   }
       
   128   virtual TypeId GetPointeeTypeId (void) const {
       
   129     return T::GetTypeId ();
       
   130   }
   124 };
   131 };
   125 
   132 
   126 /********************************************************
   133 /********************************************************
   127  *              The Accessor associated to 
   134  *              The Accessor associated to 
   128  *               PointerValue
   135  *               PointerValue