[sword-devel] Method Name Normalization

Troy A. Griffitts scribe at crosswire.org
Sat Jan 19 09:13:26 MST 2013


In anticipation of a new release, I have a large checkin I'm about to 
commit which will break everything for everyone compiling with -Werror.

We've been normalizing method names toward a clean API interface at 
2.0.  SWORD started 20+ years ago when there was not standard naming 
conventions.  In fact, originally we tried to keep variable names less 
than 8 characters, as, at the time, some compilers stopped 
disambiguating after this.  Besides these, there are a number of 
conventions we used back then for which standards have now become the 
norm: camelCase conventions, standard set/getProperty naming, and the 
like.  We've been slowly moving toward these changes and have been 
deprecating old names for a few years now.  What I'm about to introduces 
standard names for all methods within the SWKey and SWModule classes and 
deprecates the non standard names.

A few not obvious changes:

Headings() has been renamed to setIntros(bool) and bool isIntros()
Headings() -- used to turn on chapter, book, testament, and module 
introductions, has frequently been a point of confusion with the global 
option "Headings" -- used to turn on and off section headings in the 
text.  This new property name will hopefully remove that confusion.

Error() has become popError(), as the functionality has always been to 
return and clear any error code for the object.

The bindings are probably in a state of disarray now.  I've updated the 
omniorb bindings.  I'd appreciated any help with other stuff.

I hope this doesn't cause too much of a headache for everyone.  I hope 
these naming standards raise coherence to the look of our API for newcomers.

Hope you are all at the start of a blessed new year,

Troy





More information about the sword-devel mailing list