⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 x23598.html

📁 set for Swarm2.1是圣菲研究院的开发人员对Swarm的特性及其使用描述的最为完备的指南性文档。从这里可以获得最细致的平台说明。
💻 HTML
字号:
<HTML><HEAD><TITLE>Library Header File</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 Interface Conventions"HREF="swarm.library.sgml.appendix.html"><LINKREL="NEXT"TITLE="Object Type Definitions"HREF="x23608.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="swarm.library.sgml.appendix.html">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Appendix B. Library Interface Conventions</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="x23608.html">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="AEN23598">B.2. Library Header File</A></H1><P>For a library that adopts these conventions, a library is not merely acollection of source files that are compiled into a library archiveunder control of a make file. Instead, Objective C source files in thelibrary are processed in a special way to publish their definitionsnot only as header files, but as generated objects available atruntime to make full use of the library. A library processed in thisway is referred to as as a "package." (Note: some of the newer Swarmlibraries, such as objectbase and random, don't undergo this specialprocessing and yet still follow all the library interface conventionsdescribed in this document.)</P><P>The <AHREF="swarm.defobj.sgml.reference.html">defobj</A>library documents the full details of special processing performed ona package. For simply using a library, the key fact to keep in mind isthat the entire public interface to a library is declared in the oneheader file having the same name as the package itself, plus atrailing .h suffix. Additionally, the header file of a librarynormally documents only its public interface, in a way that iscompletely separated from the implementation of the objects itspecifies.</P><P>The separation of implementation means that a library publishes itsinterface entirely without reference to any Objective C classes whichimplement its objects. Even though classes are often thought of asseparating the interface of an object from its implementation, thisseparation is far from complete. Not only do classes typically containmany internal methods not intended for external use, but they alsodefine a particular storage format for an object defined as instancevariables.</P><P>A library instead publishes its interface as a set of public objecttypes. These object types may also be supplemented by global objectconstants called symbols. Both these kinds of definitions normallyappear only in the header file of a library. The remaining sourcefiles in a library normally contain the classes which implement theobject types.</P><P>In a library, the files which implement classes (including classheader files), need not ever be referenced simply to make use of theimplemented capabilities of the library object types. Documentationfor the library is normally expressed entirely in terms of the typesand symbols published in the library header file. If a feature doesnot appear in the library header file, it should not be consideredpart of a supported public interface.</P><P>Individual class header files are required to subclass from existingimplementations, but interfaces for subclassing are an entirelyseparate issue from normal public use of an object library. Classinheritance can be a powerful implementation technique, but extensionof an existing class framework is typically safe only if performed inexplicitly permitted ways. If a library supports subclassing at all,it must carefully state which classes may be subclassed and in whatways. For a library package, this information is supplied outside thelibrary header file. The library header file specifies only theinterfaces by which objects are intended to be used, whetherimplemented by a local class or an external subclass.</P><P>Remaining sections of this document explain the declarations whichappear in a library header file, and end with a suggested structure ofdocumentation to be provided for a library. The libraries of Swarmmostly follow this structure.</P></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="swarm.library.sgml.appendix.html">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="set.html">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="x23608.html">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Library Interface Conventions</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="swarm.library.sgml.appendix.html">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Object Type Definitions</TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -