📄 node7.html
字号:
<html><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><!--Converted with jLaTeX2HTML 2002 (1.62) JA patch-1.4patched version by: Kenshi Muto, Debian Project.LaTeX2HTML 2002 (1.62),original version by: Nikos Drakos, CBLU, University of Leeds* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan* with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --><HTML><HEAD><TITLE>3.2 Code Overview</TITLE><META NAME="description" CONTENT="3.2 Code Overview"><META NAME="keywords" CONTENT="everything"><META NAME="resource-type" CONTENT="document"><META NAME="distribution" CONTENT="global"><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><META NAME="Generator" CONTENT="jLaTeX2HTML v2002 JA patch-1.4"><META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"><LINK REL="STYLESHEET" HREF="everything.css" tppabs="http://www.isi.edu/nsnam/ns/doc/everything.css"><LINK REL="next" HREF="node8.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node8.html"><LINK REL="previous" HREF="node6.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node6.html"><LINK REL="up" HREF="node5.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node5.html"><LINK REL="next" HREF="node8.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node8.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html1248" HREF="node8.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node8.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html1242" HREF="node5.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node5.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html1236" HREF="node6.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node6.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html1244" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html"><IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="file:/usr/share/latex2html/icons/contents.png"></A> <A NAME="tex2html1246" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html"><IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="file:/usr/share/latex2html/icons/index.png"></A> <BR><B> Next:</B> <A NAME="tex2html1249" HREF="node8.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node8.html">3.3 Class Tcl</A><B> Up:</B> <A NAME="tex2html1243" HREF="node5.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node5.html">3. OTcl Linkage</A><B> Previous:</B> <A NAME="tex2html1237" HREF="node6.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node6.html">3.1 Concept Overview</A>   <B> <A NAME="tex2html1245" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html1247" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <BR><BR><!--End of Navigation Panel--><H1><A NAME="SECTION02120000000000000000">3.2 Code Overview</A></H1><P>In this document,we use the term ``interpreter''to be synonymous with the OTcl interpreter.The code to interface with the interpreter residesin a separate directory, <TT>tclcl</TT>.The rest of the simulator code resides in the directory, <TT>ns-2</TT>.We will use the notation file to refer to a particular file in the<TT>Tcl</TT> directory.Similarly, we will use the notation, fileto refer to a particular file in the <TT>ns-2</TT> directory.<P>There are a number of classes defined in .We only focus on the six that are used in :The Class TclSectionsec:Tcl contains the methods thatC++ code will use to access the interpreter.The class TclObjectSectionsec:TclObjectis the base class for all simulator objects that are also mirrored in the compiled hierarchy.The class TclClassSectionsec:TclClass definesthe interpreted class hierarchy, and the methods to permit the user to instantiate TclObjects.The class TclCommandSectionsec:TclCommandis used to define simple global interpreter commands.The class EmbeddedTclSectionsec:EmbeddedTclcontains the methods to load higher level builtin commandsthat make configuring simulations easier.Finally, the class InstVarSectionsec:InstVarcontains methods to access C++ member variablesas OTcl instance variables.<P>The procedures and functions described in this chapter can be found inTcl.{cc, h}, Tcl2.cc, tcl-object.tcl, and,tracedvar.{cc, h}.The file tcl2c++.c is used in building , and is mentionedbriefly in this chapter.<P><HR><!--Navigation Panel--><A NAME="tex2html1248" HREF="node8.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node8.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html1242" HREF="node5.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node5.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html1236" HREF="node6.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node6.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html1244" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html"><IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="file:/usr/share/latex2html/icons/contents.png"></A> <A NAME="tex2html1246" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html"><IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="file:/usr/share/latex2html/icons/index.png"></A> <BR><B> Next:</B> <A NAME="tex2html1249" HREF="node8.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node8.html">3.3 Class Tcl</A><B> Up:</B> <A NAME="tex2html1243" HREF="node5.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node5.html">3. OTcl Linkage</A><B> Previous:</B> <A NAME="tex2html1237" HREF="node6.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node6.html">3.1 Concept Overview</A>   <B> <A NAME="tex2html1245" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html1247" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <!--End of Navigation Panel--><ADDRESS>2003-09-23</ADDRESS></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -