|
|
Choosing A Webhost: |
CVS update of carob/src (ParameterStatement.cpp): msg#00199db.carob.cvs
Date: Friday, January 27, 2006 @ 18:33:58 Author: marc Path: /cvsroot/carob/carob/src Modified: ParameterStatement.cpp (1.13 -> 1.14) Templatized setBoolean() CAROB-55 ------------------------+ ParameterStatement.cpp | 21 +++++++++++++++------ 1 files changed, 15 insertions(+), 6 deletions(-) Index: carob/src/ParameterStatement.cpp diff -u carob/src/ParameterStatement.cpp:1.13 carob/src/ParameterStatement.cpp:1.14 --- carob/src/ParameterStatement.cpp:1.13 Fri Jan 27 16:06:42 2006 +++ carob/src/ParameterStatement.cpp Fri Jan 27 18:33:58 2006 @@ -16,7 +16,7 @@ * limitations under the License. * * Initial developer(s): Zsolt Simon - * Contributor(s): Gilles Rayrat + * Contributor(s): Gilles Rayrat, Marc Herbert */ #include "ParameterStatement.hpp" @@ -72,9 +72,6 @@ + TAG_MARKER + L">"; -const std::wstring wsBoolFalse = L"false"; -const std::wstring wsBoolTrue = L"true"; - } using std::wstring; @@ -254,8 +251,8 @@ basic_ostream<wchar_t>& wrapped_stream; public: FPoneShotFilter(basic_ostream<wchar_t>& s) : wrapped_stream(s) { } ; - basic_ostream<wchar_t>& + basic_ostream<wchar_t>& // This is the actual filtering operator operator<< (FP value) { @@ -297,6 +294,18 @@ oneShotFilter(basic_ostream<wchar_t>& s) : FPoneShotFilter<float>(s) { } ; }; +// template specialization for bool +template<class Ch> +class streamSettings<bool, Ch> +{ +public: + void doManip(basic_ostream<Ch>& s) const + { + s.imbue(locC); + s << std::boolalpha; + }; +}; + } // namespace CarobNS @@ -355,7 +364,7 @@ void ParameterStatement::setBoolean(const int parameterIndex, const bool x) throw (DriverException, UnexpectedException) { - set<wstring>(parameterIndex, BOOLEAN_TAG, x ? wsBoolTrue : wsBoolFalse); + set<bool>(parameterIndex, BOOLEAN_TAG, x); } void ParameterStatement::setByte(const int parameterIndex, const java_byte x)
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | CVS update of carob/test/40-Parameter-PreparedStatement (2 files), marc-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
|---|---|
| Next by Date: | CVS update of carob/test/40-Parameter-PreparedStatement (2 files), marc-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Previous by Thread: | CVS update of carob/src (ParameterStatement.cpp), marc-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Next by Thread: | CVS update of carob/src (ParameterStatement.cpp), marc-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home
| advertise | OSDir is
an inevitable website.
|