[GRASS-dev] [GRASS GIS] #2422: Functions from Segment lib have no prefix

GRASS GIS trac at osgeo.org
Tue Sep 16 12:44:52 PDT 2014


#2422: Functions from Segment lib have no prefix
-------------------------------------+--------------------------------------
 Reporter:  martinl                  |       Owner:  grass-dev@…              
     Type:  task                     |      Status:  new                      
 Priority:  blocker                  |   Milestone:  7.0.0                    
Component:  LibRaster                |     Version:  unspecified              
 Keywords:  segmentlib, api, prefix  |    Platform:  Unspecified              
      Cpu:  Unspecified              |  
-------------------------------------+--------------------------------------

Comment(by mmetz):

 Replying to [ticket:2422 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 [comment:2 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.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2422#comment:4>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list