Date: Friday, December 2, 2005 @ 12:11:09
  Author: gilles
    Path: /cvsroot/carob/carob

Modified: contrib/PHP/sample_carob_request.cpp (1.6 -> 1.7)
          include/BigDecimal.hpp (1.6 -> 1.7) include/CarobException.hpp
          (1.18 -> 1.19) include/Common.hpp (1.14 -> 1.15)
          include/Connection.hpp (1.28 -> 1.29)
          include/ConnectionParameters.hpp (1.5 -> 1.6)
          include/ConnectionPool.hpp (1.3 -> 1.4)
          include/CriticalSection.hpp (1.2 -> 1.3)
          include/DriverResultSet.hpp (1.15 -> 1.16)
          include/DriverSocket.hpp (1.8 -> 1.9) include/Field.hpp (1.7 ->
          1.8) include/JavaSocket.hpp (1.12 -> 1.13) include/Request.hpp
          (1.7 -> 1.8) include/RequestWithResultSetParameters.hpp (1.6 ->
          1.7) include/ResultSetMetaData.hpp (1.2 -> 1.3)
          include/SQLDataSerialization.hpp (1.5 -> 1.6)
          include/Statement.hpp (1.9 -> 1.10) include/TypeConstants.hpp
          (1.1 -> 1.2) include/TypeTag.hpp (1.6 -> 1.7) src/BigDecimal.cpp
          (1.8 -> 1.9) src/CarobException.cpp (1.11 -> 1.12)
          src/Common.cpp (1.8 -> 1.9) src/Connection.cpp (1.32 -> 1.33)
          src/ConnectionParameters.cpp (1.4 -> 1.5) src/ConnectionPool.cpp
          (1.3 -> 1.4) src/DriverResultSet.cpp (1.11 -> 1.12)
          src/DriverSocket.cpp (1.7 -> 1.8) src/Field.cpp (1.6 -> 1.7)
          src/JavaSocket.cpp (1.17 -> 1.18) src/Request.cpp (1.4 -> 1.5)
          src/RequestWithResultSetParameters.cpp (1.5 -> 1.6)
          src/ResultSetMetaData.cpp (1.3 -> 1.4)
          src/SQLDataSerialization.cpp (1.9 -> 1.10) src/Statement.cpp
          (1.11 -> 1.12) test/CarobProtector.hpp (1.8 -> 1.9)
          test/CarobTestLauncher.cpp (1.6 -> 1.7)
          test/TestBeginCommitRollback.cpp (1.7 -> 1.8)
          test/TestConnect.cpp (1.6 -> 1.7) test/TestConnect.hpp (1.3 ->
          1.4) test/TestExecReadRequest.cpp (1.12 -> 1.13)
          test/TestExecWriteRequest.cpp (1.12 -> 1.13)
          test/TestOnValidConnection.cpp (1.3 -> 1.4)
          test/TestOnValidConnection.hpp (1.2 -> 1.3)
          test/TestStatement.cpp (1.10 -> 1.11)

Added namespace CarobNS for all classes
Client application must now declare "using namespace CarobNS;"


--------------------------------------------+
 contrib/PHP/sample_carob_request.cpp       |    2 +
 include/BigDecimal.hpp                     |    3 +
 include/CarobException.hpp                 |    3 +
 include/Common.hpp                         |    3 +
 include/Connection.hpp                     |    8 +++-
 include/ConnectionParameters.hpp           |    3 +
 include/ConnectionPool.hpp                 |    3 +
 include/CriticalSection.hpp                |    3 +
 include/DriverResultSet.hpp                |    3 +
 include/DriverSocket.hpp                   |    3 +
 include/Field.hpp                          |    4 ++
 include/JavaSocket.hpp                     |    3 +
 include/Request.hpp                        |    3 +
 include/RequestWithResultSetParameters.hpp |    4 ++
 include/ResultSetMetaData.hpp              |    4 +-
 include/SQLDataSerialization.hpp           |    3 +
 include/Statement.hpp                      |    3 +
 include/TypeConstants.hpp                  |    5 +++
 include/TypeTag.hpp                        |    3 +
 src/BigDecimal.cpp                         |    2 +
 src/CarobException.cpp                     |    2 +
 src/Common.cpp                             |   44 +++++++++++++--------------
 src/Connection.cpp                         |    2 +
 src/ConnectionParameters.cpp               |    2 +
 src/ConnectionPool.cpp                     |    2 +
 src/DriverResultSet.cpp                    |    2 +
 src/DriverSocket.cpp                       |    2 +
 src/Field.cpp                              |    2 +
 src/JavaSocket.cpp                         |    2 +
 src/Request.cpp                            |    2 +
 src/RequestWithResultSetParameters.cpp     |    2 +
 src/ResultSetMetaData.cpp                  |    2 +
 src/SQLDataSerialization.cpp               |    2 +
 src/Statement.cpp                          |    2 +
 test/CarobProtector.hpp                    |   33 +++++++++++---------
 test/CarobTestLauncher.cpp                 |    2 +
 test/TestBeginCommitRollback.cpp           |    2 +
 test/TestConnect.cpp                       |    2 +
 test/TestConnect.hpp                       |    4 +-
 test/TestExecReadRequest.cpp               |    2 +
 test/TestExecWriteRequest.cpp              |    2 +
 test/TestOnValidConnection.cpp             |    2 +
 test/TestOnValidConnection.hpp             |    2 -
 test/TestStatement.cpp                     |    2 +
 44 files changed, 147 insertions(+), 44 deletions(-)


Index: carob/contrib/PHP/sample_carob_request.cpp
diff -u carob/contrib/PHP/sample_carob_request.cpp:1.6 
carob/contrib/PHP/sample_carob_request.cpp:1.7
--- carob/contrib/PHP/sample_carob_request.cpp:1.6      Thu Dec  1 19:10:15 2005
+++ carob/contrib/PHP/sample_carob_request.cpp  Fri Dec  2 12:11:09 2005
@@ -29,6 +29,8 @@
 #include "../../include/ConnectionPool.hpp"
 #include "../../include/DriverResultSet.hpp"
 
+using namespace CarobNS;
+
 #define STRINGIFY(a)    #a
 #define STRINGIFY2(a)   STRINGIFY(a)
 #define LINESTR         STRINGIFY2(__LINE__)
Index: carob/include/BigDecimal.hpp
diff -u carob/include/BigDecimal.hpp:1.6 carob/include/BigDecimal.hpp:1.7
--- carob/include/BigDecimal.hpp:1.6    Thu Dec  1 19:10:15 2005
+++ carob/include/BigDecimal.hpp        Fri Dec  2 12:11:09 2005
@@ -26,6 +26,8 @@
 #include "DriverSocket.hpp"
 #include "SQLDataSerialization.hpp"
 
+namespace CarobNS {
+
 /**
  * Java math.BigDecimal equivalent class for storing immutable, 
  * arbitrary-precision signed decimal numbers. A BigDecimal consists of an 
@@ -107,4 +109,5 @@
 
 };
 
+} //namespace CarobNS
 #endif /*BIGDECIMAL_H_*/
Index: carob/include/CarobException.hpp
diff -u carob/include/CarobException.hpp:1.18 
carob/include/CarobException.hpp:1.19
--- carob/include/CarobException.hpp:1.18       Thu Dec  1 19:21:59 2005
+++ carob/include/CarobException.hpp    Fri Dec  2 12:11:09 2005
@@ -34,6 +34,8 @@
 
 #include "Common.hpp"
 
+namespace CarobNS {
+
 class StackTraceElement;
 class CarobException;
 class DriverSocket;
@@ -321,6 +323,7 @@
   std::wstring  fileName;
   int32_t       lineNumber;
 };
+} //namespace CarobNS
 #endif //_CAROBEXCEPTION_H_
 
 
Index: carob/include/Common.hpp
diff -u carob/include/Common.hpp:1.14 carob/include/Common.hpp:1.15
--- carob/include/Common.hpp:1.14       Thu Dec  1 19:10:15 2005
+++ carob/include/Common.hpp    Fri Dec  2 12:11:09 2005
@@ -24,6 +24,8 @@
 
 #include <string>
 
+namespace CarobNS {
+
 // Uncomment to get definition of uint8_t (needed with gcc<3.4 for instance)
 // #include <stdint.h>
 // or you can try this one:
@@ -153,4 +155,5 @@
   void*   as_other;
 };
 
+} //namespace CarobNS
 #endif //_COMMON_H_
Index: carob/include/Connection.hpp
diff -u carob/include/Connection.hpp:1.28 carob/include/Connection.hpp:1.29
--- carob/include/Connection.hpp:1.28   Thu Dec  1 19:10:15 2005
+++ carob/include/Connection.hpp        Fri Dec  2 12:11:09 2005
@@ -31,6 +31,8 @@
 #include "DriverSocket.hpp"
 #include "RequestWithResultSetParameters.hpp"
 
+namespace CarobNS {
+
 /** "Controller Ready" magic number. */
 #define ControllerPrompt                        0x1FA1501F
 /** Command prefix sent before each command */
@@ -61,7 +63,7 @@
 #define SetAutoCommit                           35
 //#define ConnectionGetCatalog                    36
 //#define ConnectionGetCatalogs                   37
-//#define ConnectionSetC(AbstractWriteRequestatalog                    38
+//#define ConnectionSetCatalog                    38
 //#define SetTransactionIsolation                 39
 //#define GetVirtualDatabaseName                  50
 //#define GetControllerVersionNumber              51
@@ -112,7 +114,7 @@
         * @throws IOException on socket error
         * @throws DriverSQLException on protocol corruption
         */
-       static void        sendCommand(const DriverSocket& socket, int32_t 
command)
+       static void       sendCommand(const DriverSocket& socket, int32_t 
command)
                         throw (SocketIOException, ProtocolException,
                         UnexpectedException);
   /**
@@ -421,5 +423,5 @@
                           ProtocolException, NotImplementedException,
                           UnexpectedException);
 };
-
+} //namespace CarobNS
 #endif //_CONNECTION_H_
Index: carob/include/ConnectionParameters.hpp
diff -u carob/include/ConnectionParameters.hpp:1.5 
carob/include/ConnectionParameters.hpp:1.6
--- carob/include/ConnectionParameters.hpp:1.5  Thu Dec  1 19:10:15 2005
+++ carob/include/ConnectionParameters.hpp      Fri Dec  2 12:11:09 2005
@@ -25,6 +25,8 @@
 #include <string>
 #include <netinet/in.h> //for in_addr_t
 
+namespace CarobNS {
+
 enum DebugLevel
 {
   DEBUG_LEVEL_OFF,
@@ -117,4 +119,5 @@
   //TODO: ControllerInfo, ConnectionPolicy
 };
 
+} //namespace CarobNS
 #endif /*CONNECTIONPARAMETERS_H_*/
Index: carob/include/ConnectionPool.hpp
diff -u carob/include/ConnectionPool.hpp:1.3 
carob/include/ConnectionPool.hpp:1.4
--- carob/include/ConnectionPool.hpp:1.3        Fri Nov  4 10:40:21 2005
+++ carob/include/ConnectionPool.hpp    Fri Dec  2 12:11:09 2005
@@ -24,6 +24,8 @@
 
 #include "Connection.hpp"
 
+namespace CarobNS {
+
 /**
  * Singleton class to provide connections to controller.
  * TODO: implement real connection management. For now, connection are created
@@ -62,4 +64,5 @@
   ConnectionPool& operator= (const ConnectionPool&);
 };
 
+} //namespace CarobNS
 #endif /*CONNECTIONPOOL_H_*/
Index: carob/include/CriticalSection.hpp
diff -u carob/include/CriticalSection.hpp:1.2 
carob/include/CriticalSection.hpp:1.3
--- carob/include/CriticalSection.hpp:1.2       Thu Oct 27 14:42:44 2005
+++ carob/include/CriticalSection.hpp   Fri Dec  2 12:11:09 2005
@@ -66,6 +66,8 @@
   #include <pthread.h>
 #endif //WIN32
 
+namespace CarobNS {
+
 /**
  * Implements a critical section for unix systems (Posix compliant) with mutex.
  * Just declare the critical section object and use Enter() and Leave()
@@ -138,4 +140,5 @@
   void      operator=(CriticalSection &cs) {}
 };
 
+} //namespace CarobNS
 #endif //_CRITICALSECTION_H_
Index: carob/include/DriverResultSet.hpp
diff -u carob/include/DriverResultSet.hpp:1.15 
carob/include/DriverResultSet.hpp:1.16
--- carob/include/DriverResultSet.hpp:1.15      Fri Dec  2 10:06:56 2005
+++ carob/include/DriverResultSet.hpp   Fri Dec  2 12:11:09 2005
@@ -28,6 +28,8 @@
 #include "Field.hpp"
 #include "SQLDataSerialization.hpp"
 
+namespace CarobNS {
+
 /**
  * The constant indicating the type for a <code>ResultSet</code> object
  * whose cursor may move only forward.
@@ -303,4 +305,5 @@
   };
 } ResultSetOrUpdateCount;
 
+} //namespace CarobNS
 #endif /*DRIVERRESULTSET_H_*/
Index: carob/include/DriverSocket.hpp
diff -u carob/include/DriverSocket.hpp:1.8 carob/include/DriverSocket.hpp:1.9
--- carob/include/DriverSocket.hpp:1.8  Thu Dec  1 19:10:15 2005
+++ carob/include/DriverSocket.hpp      Fri Dec  2 12:11:09 2005
@@ -24,6 +24,8 @@
 
 #include "JavaSocket.hpp"
 
+namespace CarobNS {
+
 /**
  * Higher level class for socket.
  * Defines handy methods to read/write to/from a controller following
@@ -99,4 +101,5 @@
 
 };
 
+} //namespace CarobNS
 #endif //_DRIVERSOCKET_H_
Index: carob/include/Field.hpp
diff -u carob/include/Field.hpp:1.7 carob/include/Field.hpp:1.8
--- carob/include/Field.hpp:1.7 Fri Dec  2 10:05:03 2005
+++ carob/include/Field.hpp     Fri Dec  2 12:11:09 2005
@@ -26,6 +26,8 @@
 
 #include "DriverSocket.hpp"
 
+namespace CarobNS {
+
 /**
  * Field is our private implementation of <code>ResultSetMetaData</code>,
  * holding the information for one column.
@@ -175,4 +177,6 @@
   int32_t             scale;
 };
 typedef Field  *FieldPtr;
+
+} //namespace CarobNS
 #endif /*FIELD_H_*/
Index: carob/include/JavaSocket.hpp
diff -u carob/include/JavaSocket.hpp:1.12 carob/include/JavaSocket.hpp:1.13
--- carob/include/JavaSocket.hpp:1.12   Thu Dec  1 19:31:15 2005
+++ carob/include/JavaSocket.hpp        Fri Dec  2 12:11:09 2005
@@ -28,6 +28,8 @@
 #include "CarobException.hpp"
 
 
+namespace CarobNS {
+
 /**
  * Generic socket wrapper class to exchange data with Java world.
  * This class can read and write basic Java types over a socket. It 
@@ -187,4 +189,5 @@
   bool          connected;
 };
 
+} //namespace CarobNS
 #endif /*SOCKET_H_*/
Index: carob/include/Request.hpp
diff -u carob/include/Request.hpp:1.7 carob/include/Request.hpp:1.8
--- carob/include/Request.hpp:1.7       Thu Dec  1 19:10:15 2005
+++ carob/include/Request.hpp   Fri Dec  2 12:11:09 2005
@@ -24,6 +24,8 @@
 
 #include "DriverSocket.hpp"
 
+namespace CarobNS {
+
 /**
  * This class defines a Request object. This basically carries the SQL 
statement
  * and the SQL template if this is a PreparedStatement.
@@ -172,4 +174,5 @@
   bool              escape_processing;
 };
 
+} //namespace CarobNS
 #endif /*REQUEST_HPP_*/
Index: carob/include/RequestWithResultSetParameters.hpp
diff -u carob/include/RequestWithResultSetParameters.hpp:1.6 
carob/include/RequestWithResultSetParameters.hpp:1.7
--- carob/include/RequestWithResultSetParameters.hpp:1.6        Thu Dec  1 
19:10:15 2005
+++ carob/include/RequestWithResultSetParameters.hpp    Fri Dec  2 12:11:09 2005
@@ -24,6 +24,8 @@
 
 #include "Request.hpp"
 
+namespace CarobNS {
+
 class RequestWithResultSetParameters : public Request
 {
 public:
@@ -95,5 +97,7 @@
   bool              cursor_name_is_null;
 
 };
+
+} //namespace CarobNS
 #endif /*REQUESTWITHRESULTSETPARAMETERS_HPP_*/
 
Index: carob/include/ResultSetMetaData.hpp
diff -u carob/include/ResultSetMetaData.hpp:1.2 
carob/include/ResultSetMetaData.hpp:1.3
--- carob/include/ResultSetMetaData.hpp:1.2     Thu Dec  1 19:10:15 2005
+++ carob/include/ResultSetMetaData.hpp Fri Dec  2 12:11:09 2005
@@ -25,6 +25,8 @@
 #include "CarobException.hpp"
 #include "DriverResultSet.hpp"
 
+namespace CarobNS {
+
 //Nullability constants
 /**
  * The constant indicating that a
@@ -284,5 +286,5 @@
     UnexpectedException);
 };
 
-
+} //namespace CarobNS
 #endif /*RESULTSETMETADATA_HPP_*/
Index: carob/include/SQLDataSerialization.hpp
diff -u carob/include/SQLDataSerialization.hpp:1.5 
carob/include/SQLDataSerialization.hpp:1.6
--- carob/include/SQLDataSerialization.hpp:1.5  Thu Dec  1 19:10:15 2005
+++ carob/include/SQLDataSerialization.hpp      Fri Dec  2 12:11:09 2005
@@ -26,6 +26,8 @@
 
 #include "TypeTag.hpp"
 
+namespace CarobNS {
+
 //forward this union which is declared in Common.hpp
 union ResultSetDataType;
 
@@ -49,4 +51,5 @@
       throw (NotImplementedException, UnexpectedException);
 };
 
+} //namespace CarobNS
 #endif /*SQLDATASERIALIZATION_H_*/
Index: carob/include/Statement.hpp
diff -u carob/include/Statement.hpp:1.9 carob/include/Statement.hpp:1.10
--- carob/include/Statement.hpp:1.9     Thu Dec  1 19:10:15 2005
+++ carob/include/Statement.hpp Fri Dec  2 12:11:09 2005
@@ -27,6 +27,8 @@
 #include "DriverResultSet.hpp"
 #include "RequestWithResultSetParameters.hpp"
 
+namespace CarobNS {
+
 /** 
  * The constant indicating that the current <code>ResultSet</code> object 
  * should be closed when calling <code>getMoreResults</code>.
@@ -295,4 +297,5 @@
   bool                    isClosed() { return (connectionPtr == NULL); }
 };
 
+} //namespace CarobNS
 #endif /*STATEMENT_HPP_*/
Index: carob/include/TypeConstants.hpp
diff -u carob/include/TypeConstants.hpp:1.1 carob/include/TypeConstants.hpp:1.2
--- carob/include/TypeConstants.hpp:1.1 Fri Nov 25 16:04:47 2005
+++ carob/include/TypeConstants.hpp     Fri Dec  2 12:11:09 2005
@@ -18,6 +18,9 @@
  * Initial developer(s): Gilles Rayrat
  * Contributor(s): 
  */
+
+namespace CarobNS {
+
 //Type Tag Constants
 #define TT_TYPE_ERROR         -1
 #define TT_STRING             0
@@ -79,3 +82,5 @@
 #define SQLT_REF              2006
 #define SQLT_DATALINK         70
 #define SQLT_BOOLEAN          16
+
+} //namespace CarobNS
Index: carob/include/TypeTag.hpp
diff -u carob/include/TypeTag.hpp:1.6 carob/include/TypeTag.hpp:1.7
--- carob/include/TypeTag.hpp:1.6       Thu Dec  1 19:10:15 2005
+++ carob/include/TypeTag.hpp   Fri Dec  2 12:11:09 2005
@@ -32,6 +32,8 @@
 // parsing of the file
 #include "TypeConstants.hpp"
 
+namespace CarobNS {
+
 /**
  * This class implements protocol type tags with an internal String, but offers
  * an interface on top of it in order to be transparently substituted
@@ -83,4 +85,5 @@
   int32_t                 typeNumber;
 };
 
+} //namespace CarobNS
 #endif /*TYPETAG_H_*/
Index: carob/src/BigDecimal.cpp
diff -u carob/src/BigDecimal.cpp:1.8 carob/src/BigDecimal.cpp:1.9
--- carob/src/BigDecimal.cpp:1.8        Thu Dec  1 19:10:15 2005
+++ carob/src/BigDecimal.cpp    Fri Dec  2 12:11:09 2005
@@ -3,6 +3,8 @@
 
 using std::wstring;
 
+using namespace CarobNS;
+
 BigDecimal::BigDecimal()
 {
   byteArrayLength = 0;
Index: carob/src/CarobException.cpp
diff -u carob/src/CarobException.cpp:1.11 carob/src/CarobException.cpp:1.12
--- carob/src/CarobException.cpp:1.11   Thu Dec  1 19:10:15 2005
+++ carob/src/CarobException.cpp        Fri Dec  2 12:11:09 2005
@@ -24,6 +24,8 @@
 
 using std::wstring;
 
+using namespace CarobNS;
+
 /** constructs the BackTrace of the current place */
 static BackTrace currentBackTrace()
 {
Index: carob/src/Common.cpp
diff -u carob/src/Common.cpp:1.8 carob/src/Common.cpp:1.9
--- carob/src/Common.cpp:1.8    Thu Dec  1 19:10:15 2005
+++ carob/src/Common.cpp        Fri Dec  2 12:11:09 2005
@@ -26,69 +26,69 @@
 
 #include "Common.hpp"
 
-LogLevel currentLogLevel = LOG_LEVEL_WARNING;
+CarobNS::LogLevel CarobNS::currentLogLevel = LOG_LEVEL_WARNING;
 
 using std::wstring;
 using std::string;
 using std::wcerr;
 using std::endl;
 
-void setLogLevel(const LogLevel l)
+void CarobNS::setLogLevel(const LogLevel l)
 {
-  currentLogLevel = l;
+  CarobNS::currentLogLevel = l;
 }
 
-void logVerbose(const wstring fctName, const wstring s)
+void CarobNS::logVerbose(const wstring fctName, const wstring s)
 {
   wcerr<<VERBOSE_PRE<<L'('<<fctName<<L") "<<s<<endl;
 }
 
-void logInfo(const wstring fctName, const wstring s)
+void CarobNS::logInfo(const wstring fctName, const wstring s)
 {
   wcerr<<INFO_PRE<<L'('<<fctName<<L") "<<s<<endl;
 }
 
-void logDebug(const wstring fctName, const wstring s)
+void CarobNS::logDebug(const wstring fctName, const wstring s)
 {
   wcerr<<DEBUG_PRE<<L'('<<fctName<<L") "<<s<<endl;
 }
 
-void logWarning(const wstring fctName, const wstring s)
+void CarobNS::logWarning(const wstring fctName, const wstring s)
 {
   wcerr<<WARNING_PRE<<L'('<<fctName<<L") "<<s<<endl;
 }
 
-void logError(const wstring fctName, const wstring s)
+void CarobNS::logError(const wstring fctName, const wstring s)
 {
   wcerr<<ERROR_PRE<<L'('<<fctName<<L") "<<s<<endl;
 }
 
-bool isVerboseEnabled()
+bool CarobNS::isVerboseEnabled()
 {
-  return currentLogLevel <= LOG_LEVEL_VERBOSE;
+  return CarobNS::currentLogLevel <= LOG_LEVEL_VERBOSE;
 }
 
-bool isInfoEnabled()
+bool CarobNS::isInfoEnabled()
 {
-  return currentLogLevel <= LOG_LEVEL_INFO;
+  return CarobNS::currentLogLevel <= LOG_LEVEL_INFO;
 }
 
-bool isDebugEnabled()
+bool CarobNS::isDebugEnabled()
 {
-  return currentLogLevel <= LOG_LEVEL_DEBUG;
+  return CarobNS::currentLogLevel <= LOG_LEVEL_DEBUG;
 }
 
-bool isWarningEnabled()
+bool CarobNS::isWarningEnabled()
 {
-  return currentLogLevel <= LOG_LEVEL_WARNING;
+  return CarobNS::currentLogLevel <= LOG_LEVEL_WARNING;
 }
 
-bool isErrorEnabled()
+bool CarobNS::isErrorEnabled()
 {
-  return currentLogLevel <= LOG_LEVEL_ERROR;
+  return CarobNS::currentLogLevel <= LOG_LEVEL_ERROR;
 }
 
-wstring trim(const wstring& source, 
+wstring CarobNS::trim(const wstring& source, 
              const wchar_t* delims)
 {
   wstring result(source);
@@ -104,7 +104,7 @@
   return result;
 }
 
-wstring fromString(const string& in)
+wstring CarobNS::fromString(const string& in)
 {
   bool ret = true;
   const char* inarray = in.c_str();
@@ -132,7 +132,7 @@
   // return ret; FIXME throws instead
 }
 
-string toString(const wstring& in)
+string CarobNS::toString(const wstring& in)
 {
   bool ret = true;
   const wchar_t* inwarray = in.c_str();
@@ -159,7 +159,7 @@
   // return ret; FIXME throws instead
 }
 
-wstring toWString(const int32_t& arg)
+wstring CarobNS::toWString(const int32_t& arg)
 {
   std::wostringstream buffer;
   buffer << arg;  
Index: carob/src/Connection.cpp
diff -u carob/src/Connection.cpp:1.32 carob/src/Connection.cpp:1.33
--- carob/src/Connection.cpp:1.32       Fri Dec  2 10:06:55 2005
+++ carob/src/Connection.cpp    Fri Dec  2 12:11:09 2005
@@ -23,6 +23,8 @@
 
 using std::wstring;
 
+using namespace CarobNS;
+
 Connection::~Connection()
 {
   close();
Index: carob/src/ConnectionParameters.cpp
diff -u carob/src/ConnectionParameters.cpp:1.4 
carob/src/ConnectionParameters.cpp:1.5
--- carob/src/ConnectionParameters.cpp:1.4      Thu Dec  1 19:10:15 2005
+++ carob/src/ConnectionParameters.cpp  Fri Dec  2 12:11:09 2005
@@ -25,6 +25,8 @@
 
 using std::wstring;
 
+using namespace CarobNS;
+
 ConnectionParameters::ConnectionParameters() :
 hostName(DEFAULT_HOST),
 hostPort(DEFAULT_PORT),
Index: carob/src/ConnectionPool.cpp
diff -u carob/src/ConnectionPool.cpp:1.3 carob/src/ConnectionPool.cpp:1.4
--- carob/src/ConnectionPool.cpp:1.3    Fri Nov  4 10:40:20 2005
+++ carob/src/ConnectionPool.cpp        Fri Dec  2 12:11:09 2005
@@ -21,6 +21,8 @@
 
 #include "ConnectionPool.hpp"
 
+using namespace CarobNS;
+
 ConnectionPool& ConnectionPool::getInstance()
 {
   static ConnectionPool singleton;
Index: carob/src/DriverResultSet.cpp
diff -u carob/src/DriverResultSet.cpp:1.11 carob/src/DriverResultSet.cpp:1.12
--- carob/src/DriverResultSet.cpp:1.11  Thu Dec  1 19:10:15 2005
+++ carob/src/DriverResultSet.cpp       Fri Dec  2 12:11:09 2005
@@ -31,6 +31,8 @@
 using std::wstring;
 using std::vector;
 
+using namespace CarobNS;
+
 DriverResultSet::~DriverResultSet()
 {
   for (int32_t i=0; i<nbOfColumns; i++)
Index: carob/src/DriverSocket.cpp
diff -u carob/src/DriverSocket.cpp:1.7 carob/src/DriverSocket.cpp:1.8
--- carob/src/DriverSocket.cpp:1.7      Thu Dec  1 19:10:15 2005
+++ carob/src/DriverSocket.cpp  Fri Dec  2 12:11:09 2005
@@ -25,6 +25,8 @@
 
 using std::wstring;
 
+using namespace CarobNS;
+
 DriverSocket::DriverSocket(const wstring& host, const in_addr_t port)
     throw (ConnectionException, UnexpectedException) : JavaSocket()
 {
Index: carob/src/Field.cpp
diff -u carob/src/Field.cpp:1.6 carob/src/Field.cpp:1.7
--- carob/src/Field.cpp:1.6     Thu Dec  1 19:10:15 2005
+++ carob/src/Field.cpp Fri Dec  2 12:11:09 2005
@@ -23,6 +23,8 @@
 
 using std::wstring;
 
+using namespace CarobNS;
+
 Field::Field(const DriverSocket& sockPtr) throw (SocketIOException,
     UnexpectedException)
 {
Index: carob/src/JavaSocket.cpp
diff -u carob/src/JavaSocket.cpp:1.17 carob/src/JavaSocket.cpp:1.18
--- carob/src/JavaSocket.cpp:1.17       Thu Dec  1 19:31:15 2005
+++ carob/src/JavaSocket.cpp    Fri Dec  2 12:11:09 2005
@@ -28,6 +28,8 @@
 
 using std::wstring;
 
+using namespace CarobNS;
+
 JavaSocket::JavaSocket() : 
 socketFd(-1),
 connected(false)
Index: carob/src/Request.cpp
diff -u carob/src/Request.cpp:1.4 carob/src/Request.cpp:1.5
--- carob/src/Request.cpp:1.4   Fri Nov 25 16:21:31 2005
+++ carob/src/Request.cpp       Fri Dec  2 12:11:09 2005
@@ -1,5 +1,7 @@
 #include "Request.hpp"
 
+using namespace CarobNS;
+
 Request::~Request()
 {
 }
Index: carob/src/RequestWithResultSetParameters.cpp
diff -u carob/src/RequestWithResultSetParameters.cpp:1.5 
carob/src/RequestWithResultSetParameters.cpp:1.6
--- carob/src/RequestWithResultSetParameters.cpp:1.5    Thu Dec  1 19:10:15 2005
+++ carob/src/RequestWithResultSetParameters.cpp        Fri Dec  2 12:11:09 2005
@@ -2,6 +2,8 @@
 
 using std::wstring;
 
+using namespace CarobNS;
+
 RequestWithResultSetParameters::RequestWithResultSetParameters(wstring sql) :
 Request(sql),
 max_rows(0),
Index: carob/src/ResultSetMetaData.cpp
diff -u carob/src/ResultSetMetaData.cpp:1.3 carob/src/ResultSetMetaData.cpp:1.4
--- carob/src/ResultSetMetaData.cpp:1.3 Thu Dec  1 19:10:15 2005
+++ carob/src/ResultSetMetaData.cpp     Fri Dec  2 12:11:09 2005
@@ -22,6 +22,8 @@
 
 using std::wstring;
 
+using namespace CarobNS;
+
 ResultSetMetaData::ResultSetMetaData(DriverResultSet* rs)
     throw (DriverException, UnexpectedException)
 {
Index: carob/src/SQLDataSerialization.cpp
diff -u carob/src/SQLDataSerialization.cpp:1.9 
carob/src/SQLDataSerialization.cpp:1.10
--- carob/src/SQLDataSerialization.cpp:1.9      Thu Dec  1 19:10:15 2005
+++ carob/src/SQLDataSerialization.cpp  Fri Dec  2 12:11:09 2005
@@ -28,6 +28,8 @@
 
 using std::wstring;
 
+using namespace CarobNS;
+
 ResultSetDataType stringDeserializer(const DriverSocket& input)
     throw (SocketIOException, UnexpectedException)
 {
Index: carob/src/Statement.cpp
diff -u carob/src/Statement.cpp:1.11 carob/src/Statement.cpp:1.12
--- carob/src/Statement.cpp:1.11        Fri Dec  2 10:06:55 2005
+++ carob/src/Statement.cpp     Fri Dec  2 12:11:09 2005
@@ -5,6 +5,8 @@
 
 using std::wstring;
 
+using namespace CarobNS;
+
 Statement::Statement(Connection* c) :
 connectionPtr(c),
 resultPtr(NULL),
Index: carob/test/CarobProtector.hpp
diff -u carob/test/CarobProtector.hpp:1.8 carob/test/CarobProtector.hpp:1.9
--- carob/test/CarobProtector.hpp:1.8   Thu Dec  1 19:10:15 2005
+++ carob/test/CarobProtector.hpp       Fri Dec  2 12:11:09 2005
@@ -33,30 +33,33 @@
 static const std::wstring NEXTPREFIX(L" next CarobException : ");
 
 
-static void cerrStackTrace(const std::wstring& prefix, const CarobException& 
cex)
+static void cerrStackTrace(const std::wstring& prefix,
+    const CarobNS::CarobException& cex)
 {
   std::wcerr << prefix << "SQL state: " << cex.getSQLState() << std::endl;
   std::wcerr << prefix << "remote stack: " << std::endl;
-  const StackTrace& st = cex.getStackTrace();
-  for (StackTrace::const_iterator s = st.begin(); s != st.end(); s++)
+  const CarobNS::StackTrace& st = cex.getStackTrace();
+  for (CarobNS::StackTrace::const_iterator s = st.begin(); s != st.end(); s++)
     std::wcerr << prefix << s->toWString() << std::endl;;
 }
 
 
-static void cerrBackTrace(const std::wstring& prefix, const CarobException& 
cex)
+static void cerrBackTrace(const std::wstring& prefix,
+    const CarobNS::CarobException& cex)
 {
-  const BackTrace& stvect = cex.getBackTrace();
-  for (BackTrace::const_iterator btframe = stvect.begin(); btframe != 
stvect.end(); btframe++) {
+  const CarobNS::BackTrace& stvect = cex.getBackTrace();
+  for (CarobNS::BackTrace::const_iterator btframe = stvect.begin(); btframe != 
stvect.end(); btframe++) {
     std::wcerr << BEPREFIX; std::cerr << *btframe << std::endl;
   }
 }
 
-static void cerrCarobExceptionChain(const std::wstring& prefix, const 
CarobException& ce)
+static void cerrCarobExceptionChain(const std::wstring& prefix,
+    const CarobNS::CarobException& ce)
 {
   cerrBackTrace(prefix, ce);
   cerrStackTrace(prefix, ce);
 
-  const CarobException* nextex_p = &ce;
+  const CarobNS::CarobException* nextex_p = &ce;
   
   while ((nextex_p = nextex_p->getNext()) != NULL) {
     std::wcerr << "           Next CarobException" << std::endl;
@@ -72,12 +75,12 @@
 {
 
   void reportCppUnitError(const CppUnit::ProtectorContext &context,
-                          const std::string& prefix, const CarobException& ce)
+                          const std::string& prefix, const 
CarobNS::CarobException& ce)
   {
     std::wstring sqlState = ce.getSQLState();
     reportError( context, CppUnit::Message(prefix
-                                           + toString(ce.description())
-                                           + toString(sqlState)));
+                                           + 
CarobNS::toString(ce.description())
+                                           + CarobNS::toString(sqlState)));
   }
   
   bool protect( const CppUnit::Functor &functor,
@@ -86,21 +89,21 @@
     try {
       return functor();
     }
-    catch (const BackendException& be)
+    catch (const CarobNS::BackendException& be)
     {
       // log
       cerrCarobExceptionChain(BEPREFIX, be);
       // CPPunit report
       reportCppUnitError(context, "BackendException:", be);
     }
-    catch (const ControllerException& ce)
+    catch (const CarobNS::ControllerException& ce)
     {
       // log
       cerrCarobExceptionChain(COPREFIX, ce);
       // CPPunit report
       reportCppUnitError(context, "ControllerException:", ce);
     }
-    catch (const UnexpectedException& ue)
+    catch (const CarobNS::UnexpectedException& ue)
     {
       // log
       cerrCarobExceptionChain(UEPREFIX, ue);
@@ -108,7 +111,7 @@
       reportCppUnitError(context, "UnexpectedException:", ue);
     }
     // catch all other CarobExceptions
-    catch (const CarobException& ce)
+    catch (const CarobNS::CarobException& ce)
     {
       // log
       cerrCarobExceptionChain(CAPREFIX, ce);
Index: carob/test/CarobTestLauncher.cpp
diff -u carob/test/CarobTestLauncher.cpp:1.6 
carob/test/CarobTestLauncher.cpp:1.7
--- carob/test/CarobTestLauncher.cpp:1.6        Fri Nov 25 16:22:34 2005
+++ carob/test/CarobTestLauncher.cpp    Fri Dec  2 12:11:09 2005
@@ -36,6 +36,8 @@
 #include "TestExecWriteRequest.hpp"
 #include "TestStatement.hpp"
 
+using namespace CarobNS;
+
 int main (int argc, char **argv)
 {
   setLogLevel(LOG_LEVEL_INFO);
Index: carob/test/TestBeginCommitRollback.cpp
diff -u carob/test/TestBeginCommitRollback.cpp:1.7 
carob/test/TestBeginCommitRollback.cpp:1.8
--- carob/test/TestBeginCommitRollback.cpp:1.7  Thu Dec  1 19:10:15 2005
+++ carob/test/TestBeginCommitRollback.cpp      Fri Dec  2 12:11:09 2005
@@ -25,6 +25,8 @@
 
 using std::wstring;
 
+using namespace CarobNS;
+
 void TestBeginCommitRollback::testReadRequestAndCommit()
 {
   wstring fctName(L"TestBeginCommitRollback::testReadRequestAndCommit");
Index: carob/test/TestConnect.cpp
diff -u carob/test/TestConnect.cpp:1.6 carob/test/TestConnect.cpp:1.7
--- carob/test/TestConnect.cpp:1.6      Thu Dec  1 19:10:15 2005
+++ carob/test/TestConnect.cpp  Fri Dec  2 12:11:09 2005
@@ -27,6 +27,8 @@
 
 using std::wstring;
 
+using namespace CarobNS;
+
 void TestConnect::setUp()
 {
   connectionPoolPtr = &ConnectionPool::getInstance();
Index: carob/test/TestConnect.hpp
diff -u carob/test/TestConnect.hpp:1.3 carob/test/TestConnect.hpp:1.4
--- carob/test/TestConnect.hpp:1.3      Fri Nov  4 11:00:49 2005
+++ carob/test/TestConnect.hpp  Fri Dec  2 12:11:09 2005
@@ -63,8 +63,8 @@
   void testConnectGood();
 
 private:
-  ConnectionPool*   connectionPoolPtr;
-  Connection*       connectionPtr;
+  CarobNS::ConnectionPool*   connectionPoolPtr;
+  CarobNS::Connection*       connectionPtr;
 };
 
 #endif /*TESTCONNECT_H_*/
Index: carob/test/TestExecReadRequest.cpp
diff -u carob/test/TestExecReadRequest.cpp:1.12 
carob/test/TestExecReadRequest.cpp:1.13
--- carob/test/TestExecReadRequest.cpp:1.12     Thu Dec  1 19:10:15 2005
+++ carob/test/TestExecReadRequest.cpp  Fri Dec  2 12:11:09 2005
@@ -31,6 +31,8 @@
 using std::wcerr;
 using std::endl;
 
+using namespace CarobNS;
+
 void TestExecReadRequest::testReadBadRequest()
 {
   wstring fctName(L"TestExecReadRequest::testReadBadRequest");
Index: carob/test/TestExecWriteRequest.cpp
diff -u carob/test/TestExecWriteRequest.cpp:1.12 
carob/test/TestExecWriteRequest.cpp:1.13
--- carob/test/TestExecWriteRequest.cpp:1.12    Thu Dec  1 19:13:04 2005
+++ carob/test/TestExecWriteRequest.cpp Fri Dec  2 12:11:09 2005
@@ -28,6 +28,8 @@
 
 using std::wstring;
 
+using namespace CarobNS;
+
 void TestExecWriteRequest::testWriteBadRequest()
 {
   wstring fctName(L"TestExecWriteRequest::testWriteBadRequest");
Index: carob/test/TestOnValidConnection.cpp
diff -u carob/test/TestOnValidConnection.cpp:1.3 
carob/test/TestOnValidConnection.cpp:1.4
--- carob/test/TestOnValidConnection.cpp:1.3    Thu Dec  1 19:10:15 2005
+++ carob/test/TestOnValidConnection.cpp        Fri Dec  2 12:11:09 2005
@@ -27,6 +27,8 @@
 
 using std::wstring;
 
+using namespace CarobNS;
+
 void TestOnValidConnection::setUp()
 {
   wstring fctName(L"TestExecReadRequest::setUp");
Index: carob/test/TestOnValidConnection.hpp
diff -u carob/test/TestOnValidConnection.hpp:1.2 
carob/test/TestOnValidConnection.hpp:1.3
--- carob/test/TestOnValidConnection.hpp:1.2    Thu Nov 10 12:12:42 2005
+++ carob/test/TestOnValidConnection.hpp        Fri Dec  2 12:11:09 2005
@@ -48,7 +48,7 @@
 
 protected:
   /** Valid connection on which data transferts are to be done */
-  Connection*       connectionPtr;
+  CarobNS::Connection*       connectionPtr;
 };
 
 #endif /*TESTONVALIDCONNECTION_H_*/
Index: carob/test/TestStatement.cpp
diff -u carob/test/TestStatement.cpp:1.10 carob/test/TestStatement.cpp:1.11
--- carob/test/TestStatement.cpp:1.10   Thu Dec  1 19:13:04 2005
+++ carob/test/TestStatement.cpp        Fri Dec  2 12:11:09 2005
@@ -33,6 +33,8 @@
 using std::wcerr;
 using std::endl;
 
+using namespace CarobNS;
+
 //EXECUTE QUERY
 void TestStatement::testExecuteQueryBadRequest()
 {

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

Reply via email to