| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Now that we know how to create classes, access slots, and define methods, it might be useful to verify that everything is doing ok. To help with this a plethora of predicates have been created.
find-class will have the same effect.
nil is returned if errorp is
nil.
nil if class is a class type.
nil if obj is an object.
nil if obj-or-class contains slot in its class.
nil if OBJECT's SLOT is bound.
Setting a slot's value makes it bound. Calling slot-makeunbound will
make a slot unbound.
OBJECT can be an instance or a class.
(class-option eieio-default-superclass :documentation) |
Will fetch the documentation string for eieio-default-superclass.
object-print to get
and object's print form, as this allows the object to add extra display
information into the symbol.
object-class
object-class except this is a macro, and no
type-checking is performed.
nil if
it is a superclass.
class-parent except it is a macro and no type checking
is performed.
class-children, but with no checks.
t if obj's class is the same as class.
same-class-p except this is a macro and no type checking
is performed.
t if obj inherits anything from class. This
is different from same-class-p because it checks for inheritance.
t if child is a subclass of class.
t if method-symbol is a generic function, as
opposed to a regular emacs list function.
It is also important to note, that for every created class, a two
predicates are created for it. Thus in our example, the function
data-object-p is created, and return t if passed an object
of the appropriate type. Also, the function data-object-child-p
is created which returns t if the object passed to it is of a
type which inherits from data-object.
| [ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by XEmacs shared group account on December, 19 2009
using texi2html 1.65.