From: Sandro Santilli Date: Tue, 30 Jun 2015 22:27:56 +0000 (+0000) Subject: Move function documentation from implementation file to header file X-Git-Tag: 2.2.0rc1~269 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b4be9e4c73e8918b9d2ee15002210ff8491eeac;p=postgis Move function documentation from implementation file to header file git-svn-id: http://svn.osgeo.org/postgis/trunk@13770 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/liblwgeom.h.in b/liblwgeom/liblwgeom.h.in index c1dcbedb3..4de63fc4e 100644 --- a/liblwgeom/liblwgeom.h.in +++ b/liblwgeom/liblwgeom.h.in @@ -906,9 +906,34 @@ extern int ptarray_insert_point(POINTARRAY *pa, const POINT4D *p, int where); */ extern int ptarray_remove_point(POINTARRAY *pa, int where); +/** + * @brief Add a point in a pointarray. + * + * @param pa the source POINTARRAY + * @param p the point to add + * @param pdims number of ordinates in p (2..4) + * @param where to insert the point. 0 prepends, pa->npoints appends + * + * @returns a newly constructed POINTARRAY using a newly allocated buffer + * for the actual points, or NULL on error. + */ extern POINTARRAY *ptarray_addPoint(const POINTARRAY *pa, uint8_t *p, size_t pdims, uint32_t where); + +/** + * @brief Remove a point from a pointarray. + * @param which - is the offset (starting at 0) + * @return #POINTARRAY is newly allocated + */ extern POINTARRAY *ptarray_removePoint(POINTARRAY *pa, uint32_t where); + +/** + * @brief Merge two given POINTARRAY and returns a pointer + * on the new aggregate one. + * Warning: this function free the two inputs POINTARRAY + * @return #POINTARRAY is newly allocated + */ extern POINTARRAY *ptarray_merge(POINTARRAY *pa1, POINTARRAY *pa2); + extern int ptarray_is_closed(const POINTARRAY *pa); extern int ptarray_is_closed_2d(const POINTARRAY *pa); extern int ptarray_is_closed_3d(const POINTARRAY *pa); diff --git a/liblwgeom/ptarray.c b/liblwgeom/ptarray.c index 1058d4acf..4de791861 100644 --- a/liblwgeom/ptarray.c +++ b/liblwgeom/ptarray.c @@ -489,19 +489,6 @@ ptarray_same(const POINTARRAY *pa1, const POINTARRAY *pa2) return LW_TRUE; } - - -/** - * @brief Add a point in a pointarray. - * - * @param pa the source POINTARRAY - * @param p the point to add - * @param pdims number of ordinates in p (2..4) - * @param where to insert the point. 0 prepends, pa->npoints appends - * - * @returns a newly constructed POINTARRAY using a newly allocated buffer - * for the actual points, or NULL on error. - */ POINTARRAY * ptarray_addPoint(const POINTARRAY *pa, uint8_t *p, size_t pdims, uint32_t where) { @@ -555,12 +542,6 @@ ptarray_addPoint(const POINTARRAY *pa, uint8_t *p, size_t pdims, uint32_t where) return ret; } - -/** - * @brief Remove a point from a pointarray. - * @param which - is the offset (starting at 0) - * @return #POINTARRAY is newly allocated - */ POINTARRAY * ptarray_removePoint(POINTARRAY *pa, uint32_t which) { @@ -602,13 +583,6 @@ ptarray_removePoint(POINTARRAY *pa, uint32_t which) return ret; } - -/** - * @brief Merge two given POINTARRAY and returns a pointer - * on the new aggregate one. - * Warning: this function free the two inputs POINTARRAY - * @return #POINTARRAY is newly allocated - */ POINTARRAY * ptarray_merge(POINTARRAY *pa1, POINTARRAY *pa2) {