📄 swarm.simtools.outfile.protocol.html
字号:
<HTML><HEAD><TITLE>OutFile [Deprecated]</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="Simtools Library"HREF="swarm.simtools.sgml.reference.html"><LINKREL="PREVIOUS"TITLE="ObjectSaver [Deprecated]"HREF="swarm.simtools.objectsaver.protocol.html"><LINKREL="NEXT"TITLE="QSort"HREF="swarm.simtools.qsort.protocol.html"></HEAD><BODYCLASS="REFENTRY"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.simtools.objectsaver.protocol.html">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Reference VI. Simtools Library</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="swarm.simtools.qsort.protocol.html">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><H1><ANAME="SWARM.SIMTOOLS.OUTFILE.PROTOCOL">OutFile [Deprecated]</A></H1><DIVCLASS="REFNAMEDIV"><ANAME="AEN16136"></A><H2>Name</H2>OutFile -- A class to perform file output.</DIV><DIVCLASS="REFSECT1"><ANAME="AEN16139"></A><H2>Description</H2><P><ICLASS="EMPHASIS">Deprecated: Warning: the error return behavior of these methods is fragile, only end of file is reported as an error. It is probably not wise to use use this inteface unless your text processing needs are very simple.</I></P><P> This class is intended to simplify output file-I/O in Swarm. It essentially deals with the detailed file opening and closing routines thus alleviating the need for C file I/O procedure calls. </P></DIV><DIVCLASS="REFSECT1"><ANAME="AEN16144"></A><H2>Protocols adopted by OutFile</H2><P> <AHREF="swarm.objectbase.swarmobject.protocol.html">SwarmObject</A> <AHREF="swarm.defobj.creatable.protocol.html">CREATABLE</A></P></DIV><DIVCLASS="REFSECT1"><ANAME="AEN16149"></A><H2>Methods</H2><DIVCLASS="REFSECT2"><ANAME="AEN16151"></A><H3>Phase: Creating</H3><P></P><UL><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.SIMTOOLS.OUTFILE.METHOD.PC.M36"></A><P></P>+ <BCLASS="FUNCPROTOTYPE">create:</B> (id <Zone>)<VARCLASS="PDPARAM">aZone</VAR> <BCLASS="FUNCPROTOTYPE">setName:</B> (const char *)<VARCLASS="PDPARAM">theName</VAR> <BR> The create:setName: method opens a file named theName and creates an Outfile object.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.SIMTOOLS.OUTFILE.METHOD.PC.M49"></A><P></P>+ <BCLASS="FUNCPROTOTYPE">create:</B> (id <Zone>)<VARCLASS="PDPARAM">aZone</VAR> <BCLASS="FUNCPROTOTYPE">withName:</B> (const char *)<VARCLASS="PDPARAM">theName</VAR> <BR> for backward compatibility<P></P></DIV></LI></UL></DIV><DIVCLASS="REFSECT2"><ANAME="AEN16176"></A><H3>Phase: Using</H3><P></P><UL><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.SIMTOOLS.OUTFILE.METHOD.PU.M624"></A><P></P>- <BCLASS="FUNCPROTOTYPE">putString:</B> (const char *)<VARCLASS="PDPARAM">aString</VAR> <BR> The putString: method takes an instance of type string and writes it into the open file.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.SIMTOOLS.OUTFILE.METHOD.PU.M618"></A><P></P>- <BCLASS="FUNCPROTOTYPE">putInt:</B> (int)<VARCLASS="PDPARAM">anInt</VAR> <BR> The putInt: method takes an instance of type int and writes it into the open file.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.SIMTOOLS.OUTFILE.METHOD.PU.M626"></A><P></P>- <BCLASS="FUNCPROTOTYPE">putUnsigned:</B> (unsigned)<VARCLASS="PDPARAM">anUnsigned</VAR> <BR> The putUnsigned: method takes an instance of type unsigned and writes it into the open file.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.SIMTOOLS.OUTFILE.METHOD.PU.M619"></A><P></P>- <BCLASS="FUNCPROTOTYPE">putLong:</B> (long)<VARCLASS="PDPARAM">aLong</VAR> <BR> The putLong: method takes an instance of type long and writes it into the open file.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.SIMTOOLS.OUTFILE.METHOD.PU.M627"></A><P></P>- <BCLASS="FUNCPROTOTYPE">putUnsignedLong:</B> (unsigned long)<VARCLASS="PDPARAM">anUnsLong</VAR> <BR> The putUnsignedLong: method takes an instance of type unsigned long and writes it into the open file.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.SIMTOOLS.OUTFILE.METHOD.PU.M616"></A><P></P>- <BCLASS="FUNCPROTOTYPE">putDouble:</B> (double)<VARCLASS="PDPARAM">aDouble</VAR> <BR> The putDouble: method takes an instance of type double and writes it into the open file.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.SIMTOOLS.OUTFILE.METHOD.PU.M617"></A><P></P>- <BCLASS="FUNCPROTOTYPE">putFloat:</B> (float)<VARCLASS="PDPARAM">aFloat</VAR> <BR> The putFloat: method takes an instance of type float and writes it into the open file.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.SIMTOOLS.OUTFILE.METHOD.PU.M614"></A><P></P>- <BCLASS="FUNCPROTOTYPE">putChar:</B> (char)<VARCLASS="PDPARAM">aChar</VAR> <BR> The putChar: method takes an instance of type char and writes it into the open file.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.SIMTOOLS.OUTFILE.METHOD.PU.M620"></A><P></P>- <BCLASS="FUNCPROTOTYPE">putNewLine</B><BR> The putNewline method writes a newline into the open file.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.SIMTOOLS.OUTFILE.METHOD.PU.M625"></A><P></P>- <BCLASS="FUNCPROTOTYPE">putTab</B><BR> The putTab method writes a tab into the open file.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.SIMTOOLS.OUTFILE.METHOD.PU.M264"></A><P></P>- (void)<BCLASS="FUNCPROTOTYPE">drop</B><BR> The drop method closes the open file. This method must be called to close the file.<P></P></DIV></LI></UL></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="swarm.simtools.objectsaver.protocol.html">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="set.html">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="swarm.simtools.qsort.protocol.html">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">ObjectSaver [Deprecated]</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="swarm.simtools.sgml.reference.html">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">QSort</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -