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

📄 swarm.objectbase.varprobe.protocol.html

📁 set for Swarm2.1是圣菲研究院的开发人员对Swarm的特性及其使用描述的最为完备的指南性文档。从这里可以获得最细致的平台说明。
💻 HTML
字号:
<HTML><HEAD><TITLE>VarProbe</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="Objectbase Library"HREF="swarm.objectbase.sgml.reference.html"><LINKREL="PREVIOUS"TITLE="SwarmObject"HREF="swarm.objectbase.swarmobject.protocol.html"><LINKREL="NEXT"TITLE="General"HREF="swarm.objectbase.generic.module.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.objectbase.swarmobject.protocol.html">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Reference IV. Objectbase Library</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="swarm.objectbase.generic.module.html">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><H1><ANAME="SWARM.OBJECTBASE.VARPROBE.PROTOCOL">VarProbe</A></H1><DIVCLASS="REFNAMEDIV"><ANAME="AEN12443"></A><H2>Name</H2>VarProbe&nbsp;--&nbsp; A class that allows the user to inspect a given variable in any candidate that is an instance of, or inherits from, a given class.</DIV><DIVCLASS="REFSECT1"><ANAME="AEN12446"></A><H2>Description</H2><P> This is a specialized subclass of the abstract class Probe. It completes the specification of a probe that refers to an instance variable element of an object. </P></DIV><DIVCLASS="REFSECT1"><ANAME="AEN12449"></A><H2>Protocols adopted by VarProbe</H2><P> <AHREF="swarm.objectbase.probe.protocol.html">Probe</A> <AHREF="swarm.defobj.creatable.protocol.html">CREATABLE</A></P></DIV><DIVCLASS="REFSECT1"><ANAME="AEN12454"></A><H2>Methods</H2><DIVCLASS="REFSECT2"><ANAME="AEN12456"></A><H3>Phase: Creating</H3><P></P><UL><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.OBJECTBASE.VARPROBE.METHOD.PC.M835"></A><P></P>- <BCLASS="FUNCPROTOTYPE">setProbedVariable:</B> (const char *)<VARCLASS="PDPARAM">aVariable</VAR> <BR> The setProbedVariable: sets the variable being probed. The aVariable identifier is simply a character string consisting of the identifier of the variable referent. This method must be called during the create phase. <P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.OBJECTBASE.VARPROBE.METHOD.PC.M228"></A><P></P>- <BCLASS="FUNCPROTOTYPE">createEnd</B><BR><P></P></DIV></LI></UL></DIV><DIVCLASS="REFSECT2"><ANAME="AEN12476"></A><H3>Phase: Setting</H3><P></P><UL><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.OBJECTBASE.VARPROBE.METHOD.PS.M807"></A><P></P>- <BCLASS="FUNCPROTOTYPE">setNonInteractive</B><BR> The setNonInteractive method sets a VarProbe to be non-interactive. This ensures that the user will not be able to change the value of a probe, only observe it.  Setting the VarProbe to be non-interactive will not interfere with the drag &#38; drop capability of the objects into the VarProbe field.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.OBJECTBASE.VARPROBE.METHOD.PS.M870"></A><P></P>- <BCLASS="FUNCPROTOTYPE">setStringReturnType:</B> <VARCLASS="PDPARAM">returnType</VAR> <BR> The setStringReturnType: method sets the format that will be used to print the variable.  When the probedVariable is of type unsigned char or char, the method probeAsString will, by default, return a string of the format: "'%c' %d".  This is meant to reflect the commonplace use of an unsigned char as a small int.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.OBJECTBASE.VARPROBE.METHOD.PS.M760"></A><P></P>- <BCLASS="FUNCPROTOTYPE">setFloatFormat:</B> (const char *)<VARCLASS="PDPARAM">format</VAR> <BR> The setFloatFormat: method sets the floating-point format of a GUI display widget when given a sprintf-style formatting string.<P></P></DIV></LI></UL></DIV><DIVCLASS="REFSECT2"><ANAME="AEN12505"></A><H3>Phase: Using</H3><P></P><UL><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.OBJECTBASE.VARPROBE.METHOD.PU.M467"></A><P></P>- (const char *)<BCLASS="FUNCPROTOTYPE">getProbedVariable</B><BR> The getProbedVariable method returns a string matching the identifier of variable being probed.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.OBJECTBASE.VARPROBE.METHOD.PU.M404"></A><P></P>- (BOOL)<BCLASS="FUNCPROTOTYPE">getInteractiveFlag</B><BR> The getInteractiveFlag method returns the interactivity state of the VarProbe.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.OBJECTBASE.VARPROBE.METHOD.PU.M612"></A><P></P>- (void *)<BCLASS="FUNCPROTOTYPE">probeRaw:</B> <VARCLASS="PDPARAM">anObject</VAR> <BR> The probeRaw: method returns a pointer to the probed variable.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.OBJECTBASE.VARPROBE.METHOD.PU.M608"></A><P></P>- (void *)<BCLASS="FUNCPROTOTYPE">probeAsPointer:</B> <VARCLASS="PDPARAM">anObject</VAR> <BR> The probeAsPointer: method returns a pointer to the probed variable based on the probeType.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.OBJECTBASE.VARPROBE.METHOD.PU.M611"></A><P></P>- <BCLASS="FUNCPROTOTYPE">probeObject:</B> <VARCLASS="PDPARAM">anObject</VAR> <BR> A field probed with probeAsObject: must be an object.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.OBJECTBASE.VARPROBE.METHOD.PU.M607"></A><P></P>- (int)<BCLASS="FUNCPROTOTYPE">probeAsInt:</B> <VARCLASS="PDPARAM">anObject</VAR> <BR> The probeAsInt: method returns a pointer to the probed variable as an integer.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.OBJECTBASE.VARPROBE.METHOD.PU.M606"></A><P></P>- (double)<BCLASS="FUNCPROTOTYPE">probeAsDouble:</B> <VARCLASS="PDPARAM">anObject</VAR> <BR> The probeAsDouble: method returns a pointer to the probed variable as a double.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.OBJECTBASE.VARPROBE.METHOD.PU.M609"></A><P></P>- (const char *)<BCLASS="FUNCPROTOTYPE">probeAsString:</B> <VARCLASS="PDPARAM">anObject</VAR> <BCLASS="FUNCPROTOTYPE">Buffer:</B> (char *)<VARCLASS="PDPARAM">buffer</VAR> <BR> The probeAsString:Buffer: method prints the value of the variable into the buffer. The buffer should be pre-allocated.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.OBJECTBASE.VARPROBE.METHOD.PU.M610"></A><P></P>- (const char *)<BCLASS="FUNCPROTOTYPE">probeAsString:</B> <VARCLASS="PDPARAM">anObject</VAR> <BCLASS="FUNCPROTOTYPE">Buffer:</B> (char *)<VARCLASS="PDPARAM">buf</VAR> <BCLASS="FUNCPROTOTYPE">withFullPrecision:</B> (int)<VARCLASS="PDPARAM">precision</VAR> <BR> The probeAsString:Buffer:withFullPrecision: method prints the value of the variable into the buffer.  The buffer should be pre-allocated.  This version of probeAsString is used internally by ObjectSaver to use the "saved as" precision form which may differ from the "displayed" precision.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.OBJECTBASE.VARPROBE.METHOD.PU.M470"></A><P></P>- (unsigned)<BCLASS="FUNCPROTOTYPE">getRank</B><BR> Returns rank of array, or 0 for scalar objects.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.OBJECTBASE.VARPROBE.METHOD.PU.M319"></A><P></P>- (const char *)<BCLASS="FUNCPROTOTYPE">getBaseType</B><BR> In the case of arrays, returns the base type.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.OBJECTBASE.VARPROBE.METHOD.PU.M364"></A><P></P>- (unsigned *)<BCLASS="FUNCPROTOTYPE">getDims</B><BR> Returns a vector equal to length returned by getRank: with the dimensions of the array (major to minor).<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.OBJECTBASE.VARPROBE.METHOD.PU.M557"></A><P></P>- <BCLASS="FUNCPROTOTYPE">iterateAsDouble:</B> <VARCLASS="PDPARAM">anObject</VAR> <BCLASS="FUNCPROTOTYPE">using:</B> (void (*) (unsigned rank, unsigned *vec, double val))<VARCLASS="PDPARAM">func</VAR> <BR> Iterates through the elements in an array, calling the argument function with the rank, position vector, and array element cast as a double.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.OBJECTBASE.VARPROBE.METHOD.PU.M558"></A><P></P>- <BCLASS="FUNCPROTOTYPE">iterateAsInteger:</B> <VARCLASS="PDPARAM">anObject</VAR> <BCLASS="FUNCPROTOTYPE">using:</B> (void (*) (unsigned rank, unsigned *vec, int val))<VARCLASS="PDPARAM">func</VAR> <BR> Iterates through the elements in an array, calling the argument function with the rank, position vector, and array element cast as an integer.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.OBJECTBASE.VARPROBE.METHOD.PU.M722"></A><P></P>- <BCLASS="FUNCPROTOTYPE">setData:</B> <VARCLASS="PDPARAM">anObject</VAR> <BCLASS="FUNCPROTOTYPE">To:</B> (void *)<VARCLASS="PDPARAM">newValue</VAR> <BR> The setData:To: method sets the probedVariable using the pointer to the new value.<P></P></DIV></LI><LI><DIVCLASS="FUNCSYNOPSIS"><ANAME="SWARM.OBJECTBASE.VARPROBE.METHOD.PU.M723"></A><P></P>- (BOOL)<BCLASS="FUNCPROTOTYPE">setData:</B> <VARCLASS="PDPARAM">anObject</VAR> <BCLASS="FUNCPROTOTYPE">ToString:</B> (const char *)<VARCLASS="PDPARAM">s</VAR> <BR> The setData:ToString: sets the probedVariable using a string which the probe reads and converts appropriately. When setting the value of an  unsigned char or a char using this method, the expected format of the string is always "%i" unless CharString was chosen (in which case the format should be "'%c'").<P></P></DIV></LI></UL></DIV></DIV><DIVCLASS="REFSECT1"><ANAME="AEN12661"></A><H2>Globals</H2><P></P><DIVCLASS="VARIABLELIST"><DL><DT><ANAME="SWARM.OBJECTBASE.VARPROBE.GLOBAL.DEFAULTSTRING">id &lt;Symbol&gt; DefaultString </A></DT><DD><P>No description available.</P></DD><DT><ANAME="SWARM.OBJECTBASE.VARPROBE.GLOBAL.CHARSTRING">id &lt;Symbol&gt; CharString </A></DT><DD><P>No description available.</P></DD><DT><ANAME="SWARM.OBJECTBASE.VARPROBE.GLOBAL.INTSTRING">id &lt;Symbol&gt; IntString </A></DT><DD><P>No description available.</P></DD></DL></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.objectbase.swarmobject.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.objectbase.generic.module.html">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">SwarmObject</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="swarm.objectbase.sgml.reference.html">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">General</TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

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