|
◆ CheckItem()
void Arg::CheckItem |
( |
SdsCodeType |
code, |
|
|
StatusType * |
status, |
|
|
long |
ndims = -1 , |
|
|
long * |
dims = 0 |
|
) |
| |
|
inline |
Check an item has a required structure.
A common requirement for the user of the SDS library is to check that a specified SDS item has the right format - type code, number of dimensions and dimensions. This utility function implements such a check.
- See also
- ArgCheckItem()
- Parameters
-
code | SDS Code we expect. The normal SDS code values, or ARG_STRING, in which case we mean SDS_CHAR but the ndims value is bumped by 1 automatically.
If specified as -1, then the code is ignored. |
status | Inherited status. |
ndims | The expected number of dimensions. 0 to SDS_C_MAXARRAYDIMS (7) or a maximum one less then this if code=ARG_STIRNG. If specified as -1, then don't check ndims. |
dims | The expected dimensions. Only used if ndims>0 or code=ARG_STRING. Only ndims values are used (or ndims+1 if code=ARG_STRING).
If the value is negative or zero, the value is ignored, otherwise they must match. Note - long, not the unsigned long that SDS dimension arrays noramlly are. A null pointer can be supplied, which is equivalent of an array of -1 values. |
|