src/core/pointer.h
changeset 2950 9e20fb862cd8
parent 2947 b0fec3381418
child 2965 4b28e9740e3b
equal deleted inserted replaced
2949:a42da8051124 2950:9e20fb862cd8
   220       (object->*m_memberVariable) = value;
   220       (object->*m_memberVariable) = value;
   221     }
   221     }
   222     virtual Ptr<U> DoGet (const T *object) const {
   222     virtual Ptr<U> DoGet (const T *object) const {
   223       return object->*m_memberVariable;
   223       return object->*m_memberVariable;
   224     }
   224     }
       
   225     virtual bool HasGetter (void) const {
       
   226       return true;
       
   227     }
       
   228     virtual bool HasSetter (void) const {
       
   229       return true;
       
   230     }
   225   } *spec = new MemberVariable ();
   231   } *spec = new MemberVariable ();
   226   spec->m_memberVariable = memberVariable;
   232   spec->m_memberVariable = memberVariable;
   227   return Ptr<const AttributeAccessor> (spec, false);
   233   return Ptr<const AttributeAccessor> (spec, false);
   228 }
   234 }
   229 
   235 
   239     }
   245     }
   240     virtual Ptr<U> DoGet (const T *object) const {
   246     virtual Ptr<U> DoGet (const T *object) const {
   241       return 0;
   247       return 0;
   242       //return (object->*m_getter) ();
   248       //return (object->*m_getter) ();
   243     }
   249     }
       
   250     virtual bool HasGetter (void) const {
       
   251       return false;
       
   252     }
       
   253     virtual bool HasSetter (void) const {
       
   254       return true;
       
   255     }
   244   } *spec = new MemberMethod ();
   256   } *spec = new MemberMethod ();
   245   spec->m_setter = setter;
   257   spec->m_setter = setter;
   246   return Ptr<const AttributeAccessor> (spec, false);
   258   return Ptr<const AttributeAccessor> (spec, false);
   247 }
   259 }
   248 
   260 
   256     virtual void DoSet (T *object, Ptr<U> value) const {
   268     virtual void DoSet (T *object, Ptr<U> value) const {
   257       //(object->*m_setter) (value);
   269       //(object->*m_setter) (value);
   258     }
   270     }
   259     virtual Ptr<U> DoGet (const T *object) const {
   271     virtual Ptr<U> DoGet (const T *object) const {
   260       return (object->*m_getter) ();
   272       return (object->*m_getter) ();
       
   273     }
       
   274     virtual bool HasGetter (void) const {
       
   275       return true;
       
   276     }
       
   277     virtual bool HasSetter (void) const {
       
   278       return false;
   261     }
   279     }
   262   } *spec = new MemberMethod ();
   280   } *spec = new MemberMethod ();
   263   spec->m_getter = getter;
   281   spec->m_getter = getter;
   264   return Ptr<const AttributeAccessor> (spec, false);
   282   return Ptr<const AttributeAccessor> (spec, false);
   265 }
   283 }
   283       (object->*m_setter) (value);
   301       (object->*m_setter) (value);
   284     }
   302     }
   285     virtual Ptr<U> DoGet (const T *object) const {
   303     virtual Ptr<U> DoGet (const T *object) const {
   286       return (object->*m_getter) ();
   304       return (object->*m_getter) ();
   287     }
   305     }
       
   306     virtual bool HasGetter (void) const {
       
   307       return true;
       
   308     }
       
   309     virtual bool HasSetter (void) const {
       
   310       return true;
       
   311     }
   288   } *spec = new MemberMethod ();
   312   } *spec = new MemberMethod ();
   289   spec->m_setter = setter;
   313   spec->m_setter = setter;
   290   spec->m_getter = getter;
   314   spec->m_getter = getter;
   291   return Ptr<const AttributeAccessor> (spec, false);
   315   return Ptr<const AttributeAccessor> (spec, false);
   292 }
   316 }