#2422 closed task (fixed)
Functions from Segment lib have no prefix
Reported by: | martinl | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | 7.0.0 |
Component: | LibRaster | Version: | unspecified |
Keywords: | segmentlib, api, prefix | Cc: | |
CPU: | Unspecified | Platform: | Unspecified |
Description
In contrast to other GRASS libs, Segment lib (1) doesn't use any prefix. I would suggest to change eg.
segment_open()
to
Rast_segment_open()
Any option? Marked as blocker since it's API change.
Change History (8)
follow-up: 2 comment:1 by , 10 years ago
follow-ups: 3 4 comment:2 by , 10 years ago
Replying to martinl:
Segment_segment_open()inspired by Row Input/Output Library, http://grass.osgeo.org/programming7/rowiolib.html
I meant
Segment_open()
comment:3 by , 10 years ago
Replying to martinl:
Replying to martinl:
inspired by Row Input/Output Library, http://grass.osgeo.org/programming7/rowiolib.html
from this point of view, we could rename function in this library to eg.
Rowio_get() -> Rast_rowio_get()
and
segment_open() -> Rast_segment_open()
follow-up: 5 comment:4 by , 10 years ago
Replying to martinl:
In contrast to other GRASS libs, Segment lib (1) doesn't use any prefix.
The prefix used by the segment lib is "segment_".
I would suggest to change eg.
segment_open()
to
Replying to martinl:
Segment_open()
So you mean to change the first letter of the prefix to upper case?
E.g. "Rast_segment_open" does not make sense to me because the segment library is standalone and not part of the raster library.
Currently library functions for each library have their own prefix (that happened also when splitting gis lib in gis lib and raster lib). This convention makes work for developers easier and I would suggest to keep it. Thus e.g. "Rowio_get()" is just fine, no need to mask it as a raster lib function, it is a rowio lib function.
comment:5 by , 10 years ago
Replying to mmetz:
> Segment_open()
So you mean to change the first letter of the prefix to upper case?
yes, it's consistent with prefixes from other GRASS libs which are upper-case. If no objection I will do this change within the next days.
follow-up: 7 comment:6 by , 10 years ago
I have updated trunk accordingly in r62324.
TODO: backport if all is ok and update Addons.
comment:7 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to martinl:
Or
inspired by Row Input/Output Library, http://grass.osgeo.org/programming7/rowiolib.html