Date: Thursday, November 24, 2005 @ 15:55:23
  Author: marc
    Path: /cvsroot/carob/carob

Modified: include/Request.hpp (1.2 -> 1.3)
          include/RequestWithResultSetParameters.hpp (1.1 -> 1.2)
          src/Request.cpp (1.2 -> 1.3)

moved Request(wstring) constructor to Request.hpp to put default values into 
the light. Forbid copy-constructing of Request.


--------------------------------------------+
 include/Request.hpp                        |   17 ++++++++++++++---
 include/RequestWithResultSetParameters.hpp |    3 +--
 src/Request.cpp                            |   10 ----------
 3 files changed, 15 insertions(+), 15 deletions(-)


Index: carob/include/Request.hpp
diff -u carob/include/Request.hpp:1.2 carob/include/Request.hpp:1.3
--- carob/include/Request.hpp:1.2       Wed Nov 23 18:51:45 2005
+++ carob/include/Request.hpp   Thu Nov 24 15:55:23 2005
@@ -16,7 +16,7 @@
  * limitations under the License.
  *
  * Initial developer(s): Gilles Rayrat
- * Contributor(s): 
+ * Contributor(s): Marc Herbert
  */
 
 #ifndef REQUEST_HPP_
@@ -43,8 +43,17 @@
    * @param timeoutInSeconds Timeout for this request in seconds, value 0 means
    *          no timeout
    */
-  Request(wstring sql);
-       virtual ~Request();
+  Request(wstring sql) :
+    sqlQuery(sql),
+    sqlTemplateIsNull(true),
+    isReadOnly(false),
+    isAutoCommit(true),
+    timeoutInSeconds(0),
+    escapeProcessing(true)
+  {
+  }
+
+  virtual ~Request();
   /**
    * Serializes the request on the output stream by sending only the needed
    * parameters to reconstruct it on the controller.
@@ -135,6 +144,8 @@
 protected:
 
 private:
+  // forbid copies (java style)
+  Request (const Request&);
   /** SQL query (should be set in constructor). TODO: should probably be const 
*/
   wstring           sqlQuery;
   /**
Index: carob/include/RequestWithResultSetParameters.hpp
diff -u carob/include/RequestWithResultSetParameters.hpp:1.1 
carob/include/RequestWithResultSetParameters.hpp:1.2
--- carob/include/RequestWithResultSetParameters.hpp:1.1        Wed Nov 23 
15:13:02 2005
+++ carob/include/RequestWithResultSetParameters.hpp    Thu Nov 24 15:55:23 2005
@@ -38,8 +38,7 @@
    * @param timeoutInSeconds Timeout for this request in seconds, value 0 means
    *          no timeout
    */
-       RequestWithResultSetParameters(wstring sql, bool nullSqlTemplate,
-      wstring sqlTemplate, bool escapeProcessing, int timeoutInSeconds);
+  RequestWithResultSetParameters(wstring sql);
 
        virtual ~RequestWithResultSetParameters();
 
Index: carob/src/Request.cpp
diff -u carob/src/Request.cpp:1.2 carob/src/Request.cpp:1.3
--- carob/src/Request.cpp:1.2   Wed Nov 23 18:51:45 2005
+++ carob/src/Request.cpp       Thu Nov 24 15:55:23 2005
@@ -1,15 +1,5 @@
 #include "Request.hpp"
 
-Request::Request(wstring sql) :
-sqlQuery(sql),
-sqlTemplateIsNull(true),
-isReadOnly(false),
-isAutoCommit(true),
-timeoutInSeconds(0),
-escapeProcessing(true)
-{
-}
-
 Request::~Request()
 {
 }

_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits

Reply via email to