diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2021-08-01 11:47:23 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2021-08-01 11:47:23 (GMT) |
commit | 36dbbdbb723b994c072318068ca9c78aac8a2bcf (patch) | |
tree | 3ef46d84fc83d53f05ae6a3b492ac02d64935dce /doc/Class.3 | |
parent | f107311e0a841c8971f748594a6e0bd179a2e436 (diff) | |
download | tcl-36dbbdbb723b994c072318068ca9c78aac8a2bcf.zip tcl-36dbbdbb723b994c072318068ca9c78aac8a2bcf.tar.gz tcl-36dbbdbb723b994c072318068ca9c78aac8a2bcf.tar.bz2 |
Turn code snippets in TIP into a branch.
Diffstat (limited to 'doc/Class.3')
-rw-r--r-- | doc/Class.3 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/Class.3 b/doc/Class.3 index 5f8e061..c89c5f4 100644 --- a/doc/Class.3 +++ b/doc/Class.3 @@ -55,6 +55,14 @@ Tcl_ObjectMapMethodNameProc \fBTcl_ObjectGetMethodNameMapper\fR(\fIobject\fR) .sp \fBTcl_ObjectSetMethodNameMapper\fR(\fIobject\fR, \fImethodNameMapper\fR) +.sp +.VS "TIP 605" +Tcl_Class +\fBTcl_GetClassOfObject\fR(\fIobject\fR) +.sp +Tcl_Obj * +\fBTcl_GetObjectClassName\fR(\fIinterp\fR, \fIobject\fR) +.VE "TIP 605" .SH ARGUMENTS .AS ClientData metadata in/out .AP Tcl_Interp *interp in/out @@ -114,6 +122,13 @@ function. Note that the Tcl_Obj reference returned by \fBTcl_GetObjectName\fR is a shared reference. You can also get whether the object has been marked for deletion with \fBTcl_ObjectDeleted\fR (it returns true if deletion of the object has begun); this can be useful during the processing of methods. +.VS "TIP 605" +The class of an object can be retrieved with \fBTcl_GetClassOfObject\fR, and +the name of the class of an object with \fBTcl_GetObjectClassName\fR; note +that these two \fImay\fR return NULL during deletion of an object (this is +transient, and only occurs when the object is a long way through being +deleted). +.VE "TIP 605" .PP Instances of classes are created using \fBTcl_NewObjectInstance\fR, which creates an object from any class (and which is internally called by both |