Share

acutBuildList

C++

struct resbuf * acutBuildList(
    int rtype, 
    ...
);

File

acutads.h

Description

Builds a a linked list of result buffers 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.

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.

An ARX application is responsible for releasing the memory it allocates. Release each list created by acutBuildList() by a matching call to acutRelRb().

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.

Parameters

Parameters Description
rtype First argument in the pair, representing the type of the data in the second argument /*variable_arg_list*/ : Second argument in the pair, containing the data

Was this information helpful?