📄 x23603.html
字号:
<HTML><HEAD><TITLE>Object Type Definitions</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.53"><LINKREL="HOME"TITLE="Documentation Set for Swarm 2.1.1"HREF="set.html"><LINKREL="UP"TITLE="Library Interface Conventions"HREF="swarm.library.sgml.appendix.html"><LINKREL="PREVIOUS"TITLE="Library Header File"HREF="x23593.html"><LINKREL="NEXT"TITLE="GridTurtle example"HREF="x23609.html"></HEAD><BODYCLASS="SECT1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">Documentation Set for Swarm 2.1.1</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="x23593.html">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Appendix B. Library Interface Conventions</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="x23609.html">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="AEN23603">B.3. Object Type Definitions</A></H1><P>The interfaces to objects defined by a library are specified byobject type definitions. An object type defines only a set of messageswhich may be sent to an object over various phases of its lifetime. Anobject type makes no commitment to the classes that might be used toimplement the object.</P><P>Multiple classes may all implement the same messages belonging to atype. The independence of types and classes means that differentclasses can provide alternate implementations of the same objecttype. For example, a particular implementing class might be selectedto optimize the implementation for a particular case.</P><P>Object types are similar to protocols defined by Objective C,and the declarations appearing in a library header file are a minoradaptation of Objective C protocol syntax. A key difference fromprotocols is that object types are published as real external objectsthat may be used at runtime to create instances of a type. A furtherdifference is that the object types of the <AHREF="swarm.defobj.sgml.reference.html">defobj library</A> are divided into separateinterfaces that define distinct phases of an object's lifecycle.</P></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="x23593.html">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="set.html">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="x23609.html">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Library Header File</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="swarm.library.sgml.appendix.html">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">GridTurtle example</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -