summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2009-07-19 11:46:52 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2009-07-19 11:46:52 (GMT)
commitd63bf48fae3c37de04f6f82c8bde59587e1ed2aa (patch)
treea8a19f6d92c70e4d6476438a0e2ce346f2fc7fff /doc
parent87edf9c39870a062040ef47d131ee19dfc4161d8 (diff)
downloadtcl-d63bf48fae3c37de04f6f82c8bde59587e1ed2aa.zip
tcl-d63bf48fae3c37de04f6f82c8bde59587e1ed2aa.tar.gz
tcl-d63bf48fae3c37de04f6f82c8bde59587e1ed2aa.tar.bz2
Expose function to efficiently return current name of an object.
Diffstat (limited to 'doc')
-rw-r--r--doc/Class.312
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/Class.3 b/doc/Class.3
index e7b0881..5792b17 100644
--- a/doc/Class.3
+++ b/doc/Class.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: Class.3,v 1.3 2009/07/12 14:57:56 dkf Exp $
+'\" RCS: @(#) $Id: Class.3,v 1.4 2009/07/19 11:46:53 dkf Exp $
'\"
.so man.macros
.TH Tcl_Class 3 0.1 TclOO "TclOO Library Functions"
@@ -25,6 +25,9 @@ Tcl_Object
Tcl_Class
\fBTcl_GetObjectAsClass\fR(\fIobject\fR)
.sp
+Tcl_Obj *
+\fBTcl_GetObjectName\fR(\fIinterp, object\fR)
+.sp
Tcl_Command
\fBTcl_GetObjectCommand\fR(\fIobject\fR)
.sp
@@ -103,8 +106,11 @@ found. The correct way to look up a class by name is to look up the object
with that name, and then to use \fBTcl_GetObjectAsClass\fR.
.PP
Every object has its own command and namespace associated with it. The command
-may be retrieved using the \fBTcl_GetObjectCommand\fR function, and the
-namespace may be retrieved using the \fBTcl_GetObjectNamespace\fR function.
+may be retrieved using the \fBTcl_GetObjectCommand\fR function, the name of
+the object (and hence the name of the command) with \fBTcl_GetObjectName\fR,
+and the namespace may be retrieved using the \fBTcl_GetObjectNamespace\fR
+function. Note that the Tcl_Obj reference returned by \fBTcl_GetObjectName\fR
+is a shared reference.
.PP
Instances of classes are created using \fBTcl_NewObjectInstance\fR, which
takes creates an object from any class (and which is internally called by both