Author: mysqlpp
Date: Sun Dec  2 19:54:11 2007
New Revision: 1949

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1949&view=rev
Log:
Redesigned option-setting mechanism (yes, again).

Instead of many set_option() overload methods on Connection (plus
parallel ones on DBDriver) taking an option enum value and an optional
argument, it now takes a pointer to an abstract Option object.  There
is a subclass for each option we support, and each one deals with
options, and implements a set() method which DBDriver calls to apply
the option.

This leaves Connection with one trivial set_option() method, DBDriver
with a smaller set of simple set_option() overloads, and a passel of
cookie-cutter Option subclass implementations.  SLOC went up as a result
of the latter even though a lot of large case statements got the axe,
but because it's cookie-cutter code, it imposes no mental overhead.

Biggest benefit is that it does away with the "bad argument type"
error.  It just can't happen now.

Modified:
    trunk/Wishlist
    trunk/examples/multiquery.cpp
    trunk/lib/connection.cpp
    trunk/lib/connection.h
    trunk/lib/dbdriver.cpp
    trunk/lib/dbdriver.h
    trunk/lib/exceptions.h
    trunk/lib/optionlist.cpp
    trunk/lib/optionlist.h

[This mail would be too long, it was shortened to contain the URLs only.]

Modified: trunk/Wishlist
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/Wishlist?rev=1949&r1=1948&r2=1949&view=diff

Modified: trunk/examples/multiquery.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/examples/multiquery.cpp?rev=1949&r1=1948&r2=1949&view=diff

Modified: trunk/lib/connection.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/connection.cpp?rev=1949&r1=1948&r2=1949&view=diff

Modified: trunk/lib/connection.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/connection.h?rev=1949&r1=1948&r2=1949&view=diff

Modified: trunk/lib/dbdriver.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/dbdriver.cpp?rev=1949&r1=1948&r2=1949&view=diff

Modified: trunk/lib/dbdriver.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/dbdriver.h?rev=1949&r1=1948&r2=1949&view=diff

Modified: trunk/lib/exceptions.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/exceptions.h?rev=1949&r1=1948&r2=1949&view=diff

Modified: trunk/lib/optionlist.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/optionlist.cpp?rev=1949&r1=1948&r2=1949&view=diff

Modified: trunk/lib/optionlist.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/optionlist.h?rev=1949&r1=1948&r2=1949&view=diff


_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits

Reply via email to