Branch: Tag:

2013-11-16

2013-11-16 12:47:55 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Builtin.Setter: Improved the documentation somwwhat.

4434:   /*! @class Setter    *!    *! Internal class for implementing setters. +  *! +  *! This class is used by @[_get_setter()]. +  *! +  *! @seealso +  *! @[_get_setter()]    */   PIKECLASS Setter   {    PIKEVAR object o    flags ID_PROTECTED|ID_PRIVATE|ID_LOCAL;    CVAR int f; -  +  +  /*! @decl void `()(mixed val) +  *! +  *! Set the variable for the setter to @[val]. +  *! +  *! This is the function returned by @[_get_setter()]. +  */    PIKEFUN void `()(mixed val)    flags ID_PROTECTED;    {
4468:    }   }    + /*! @endclass +  */ +    PMOD_EXPORT struct object *get_setter(struct object *o, int f)   {    struct object *res = clone_object(Setter_program, 0);
4477:    return res;   }    - /*! @decl function(mixed_void) _get_setter(object o, string s) + /*! @decl function(mixed_void) _get_setter(object o, string varname)    *! -  *! Get a setter for the variable named @[s] in object @[o]. +  *! Get a setter for the variable named @[varname] in object @[o].    *! -  +  *! @returns +  *! Returns a @[Setter()->`()()] for the variable if it exists, +  *! and @expr{UNDEFINED@} otherwise. +  *!    *! @seealso    *! @[object_variablep()]    */
4505:    stack_pop_n_elems_keep_top(args);   }    - /*! @endclass -  */ -  +    /*! @class Null    *!    *! This class is used to implement the low-level aspects of @[Val.Null].