Copyright (c) 2004 Gordon D. Carrie. All rights reserved.
Licensed under the Open Software License version 2.1
Please address questions and feedback to user0@tkgeomap.org
@(#) $Id: mapLnArr.3,v 1.7 2004/09/22 21:57:50 tkgeomap Exp $
.so man.macros
#include <mapLines.h> MapLnArr MapLnArrCreate(unsigned nLinesMax); void MapLnArrSetAlloc(MapLnArr mapLnArr, unsigned nLinesMax); void MapLnArrDestroy(MapLnArr mapLnArr); void MapLnArrSet(MapLnArr mapLnArr, GeoLnArr geoLnArr, GeoProj proj, Rotation rxn); void MapLnArrSetDescr(MapLnArr mapLnArr, CONST char *descr); char *MapLnArrGetDescr(MapLnArr mapLnArr); void MapLnArrAddLine(MapLn mapLn, MapLnArr mapLnArr); void MapLnArrPutLine(MapLn mapLn, MapLnArr mapLnArr); MapLn MapLnArrGetLine(MapLnArr mapLnArr, unsigned n);
MapLnArrCreate creates and initializes a maplinearray with storage for up to nLinesMax maplines. It returns the new maplinearray, or NULL if it fails. When no longer needed, the array should be destroyed with a call to MapLnArrDestroy.
MapLnArrSetAlloc sets the internal allocation for mapLnArr so that it can hold up to nLinesMax maplines.
MapLnArrDestroy destroys mapLnArr, provided its user count is zero. Returns true if successful. Returns false if mapLnArr is in use.
MapLnArrSet stores the geolinearray geoLnArr, projection proj, and rotation rxn which presumably produced mapLnArr.
MapLnArrSetDescr sets the descriptor for mapLnArr to descr.
MapLnArrGetDescr returns the descriptor for mapLnArr. The return value should not be modified by the caller.
MapLnArrAddLine adds a copy of mapLn to the end of mapLnArr. It automatically increases mapLnArr's allocation if necessary.
MapLnArrPutLine adds mapLn to the end of mapLnArr. It automatically increases mapLnArr's allocation if necessary. mapLn becomes the property of mapLnArr and should not be subsequently modified by the user.
MapLnArrGetLine get the mapline with index n from mapLnArr. The first mapline in a maplinearray has index 0. It returns NULL if n is out of bounds.