有谁发一下acutBuildList的函数定义,说明
有谁发一下acutBuildList的函数定义,说明,谢谢 <p><font face="Verdana" color="#61b713"><font color="#000000">下面是</font><strong>liub1979</strong><font color="#000000">说的,包含了数据个数确定和不确定时的用法:</font></font></p><p>当数据个数确定时,用acutBuildList也很方便</p><p> struct resbuf *pointlist;<br/> ads_point pt;</p><p>for(int i=1; i < n; i++){</p><p>pt=XXX;</p><p>pointlist= acutBuildList(RTRESBUF, pointlist, RTPOINT, pt, 0);</p><p>}</p> <p class="signature">struct resbuf *</p><p class="signature">acutBuildList(</p><p class="signatureIn">int rtype,</p><p class="signatureInEnd">... unnamed);</p><table class="argumentList"><tbody><tr valign="baseline"><td class="argumentName">rtype</td><td class="argumentDescription">Description to come</td></tr><tr valign="baseline"><td class="argumentName">unnamed</td><td class="argumentDescription">Description to come</td></tr></tbody></table><p>Creates a linked list of result buffers.</p><p>Builds a result-buffer list from individual data items by allocating result buffers, assigning them the values specified by the acutBuildList() arguments, and linking the buffers together. The acutBuildList() function has a variable-length argument list. Most arguments to acutBuildList() are treated as pairs. The first of each pair identifies the type of the argument that follows, and the second contains the actual data. The exceptions are RTLB, RTLE, RTDOTE, and the -3 that is used to indicate the start of xdata. The type code (rtype) arguments must be result type codes as defined in adscodes.h (for example, RTPOINT), or valid Drawing Interchange Format (DXF) group codes (for example, 10). In lists that employ DXF codes, group 0 must be represented by the result type code RTDXF0. The final argument in the list must be a single argument whose value is 0 or RTNONE.</p><p>Warning Entity definitions begin with a 0 group that describes the type of the entity. Because lists passed to acutBuildList() can be terminated with 0 or NULL (as well as RTNONE), this creates a conflict. The special result type code RTDXF0 resolves this conflict. Construct the 0 group in DXF lists passed to acutBuildList() with RTDXF0. If you attempt to substitute a literal 0 for RTDXF0, acutBuildList() truncates the list. The RTDXF0 code should only be used with the rtype parameter, use a real zero (0) with the remaining parameters.</p><p>An ARX application is responsible for releasing the memory it allocates. Release each list created by acutBuildList() by a matching call to <a href="mk:@MSITStore:C:\arx%202002\docs\arxref.chm::/Globals/AcUt/acutRelRb.htm">acutRelRb()</a>.</p><p>If acutBuildList() succeeds, it returns a pointer to the newly created list. If 0, RTNONE, or NULL is the only argument passed to acutBuildList(), or if it fails because it lacks memory or includes incorrect arguments, it returns a null pointer.</p><h2>Include File</h2>acutads.h <p>其中int rtype 定义如下: (列举常用的)</p><p> AcDb:: kDxfXdAsciiString = 1000,<br/> kDxfRegAppName = 1001,<br/> kDxfXdControlString = 1002,<br/> kDxfXdLayerName = 1003,<br/> kDxfXdBinaryChunk = 1004,<br/> kDxfXdHandle = 1005,</p><p> kDxfXdXCoord = 1010,<br/> kDxfXdYCoord = 1020,<br/> kDxfXdZCoord = 1030,</p><p> kDxfXdWorldXCoord = 1011,<br/> kDxfXdWorldYCoord = 1021,<br/> kDxfXdWorldZCoord = 1031,</p><p> kDxfXdWorldXDisp = 1012,<br/> kDxfXdWorldYDisp = 1022,<br/> kDxfXdWorldZDisp = 1032,</p><p> kDxfXdWorldXDir = 1013,<br/> kDxfXdWorldYDir = 1023,<br/> kDxfXdWorldZDir = 1033,</p><p> kDxfXdReal = 1040,<br/> kDxfXdDist = 1041,<br/> kDxfXdScale = 1042,</p><p> kDxfXdInteger16 = 1070,<br/> kDxfXdInteger32 = 1071 </p>
页:
[1]