Date: Thursday, December 1, 2005 @ 19:10:15
Author: gilles
Path: /cvsroot/carob/carob
Modified: contrib/PHP/sample_carob_request.cpp (1.5 -> 1.6)
include/BigDecimal.hpp (1.5 -> 1.6) include/CarobException.hpp
(1.16 -> 1.17) include/Common.hpp (1.13 -> 1.14)
include/Connection.hpp (1.27 -> 1.28)
include/ConnectionParameters.hpp (1.4 -> 1.5)
include/DriverResultSet.hpp (1.13 -> 1.14)
include/DriverSocket.hpp (1.7 -> 1.8) include/Field.hpp (1.5 ->
1.6) include/JavaSocket.hpp (1.10 -> 1.11) include/Request.hpp
(1.6 -> 1.7) include/RequestWithResultSetParameters.hpp (1.5 ->
1.6) include/ResultSetMetaData.hpp (1.1 -> 1.2)
include/SQLDataSerialization.hpp (1.4 -> 1.5)
include/Statement.hpp (1.8 -> 1.9) include/TypeTag.hpp (1.5 ->
1.6) src/BigDecimal.cpp (1.7 -> 1.8) src/CarobException.cpp
(1.10 -> 1.11) src/Common.cpp (1.7 -> 1.8) src/Connection.cpp
(1.30 -> 1.31) src/ConnectionParameters.cpp (1.3 -> 1.4)
src/DriverResultSet.cpp (1.10 -> 1.11) src/DriverSocket.cpp (1.6
-> 1.7) src/Field.cpp (1.5 -> 1.6) src/JavaSocket.cpp (1.15 ->
1.16) src/RequestWithResultSetParameters.cpp (1.4 -> 1.5)
src/ResultSetMetaData.cpp (1.2 -> 1.3)
src/SQLDataSerialization.cpp (1.8 -> 1.9) src/Statement.cpp (1.9
-> 1.10) test/CarobProtector.hpp (1.7 -> 1.8)
test/TestBeginCommitRollback.cpp (1.6 -> 1.7)
test/TestConnect.cpp (1.5 -> 1.6) test/TestExecReadRequest.cpp
(1.11 -> 1.12) test/TestOnValidConnection.cpp (1.2 -> 1.3)
Removed "using namespace std" from .hpp file
Such handy-but-dirty namespace inclusion is very dangerous since other
applications (that include our headers)
may not want to use this namespace.
This removal lead to huge changes:
- in .hpp, every std-related stuff must be specified with std::
- in .cpp, the "using namespace std" must have been added. But for cleanest
code, only needed stuff has been
declared such as "using std::wstring"
--------------------------------------------+
contrib/PHP/sample_carob_request.cpp | 2 -
include/BigDecimal.hpp | 2 -
include/CarobException.hpp | 49 +++++++++++++--------------
include/Common.hpp | 20 +++++++++++
include/Connection.hpp | 8 ++--
include/ConnectionParameters.hpp | 47 ++++++++++++-------------
include/DriverResultSet.hpp | 18 ++++-----
include/DriverSocket.hpp | 6 +--
include/Field.hpp | 25 ++++++-------
include/JavaSocket.hpp | 8 ++--
include/Request.hpp | 18 ++++-----
include/RequestWithResultSetParameters.hpp | 8 ++--
include/ResultSetMetaData.hpp | 14 +++----
include/SQLDataSerialization.hpp | 22 +-----------
include/Statement.hpp | 9 ++--
include/TypeTag.hpp | 2 -
src/BigDecimal.cpp | 7 ++-
src/CarobException.cpp | 2 +
src/Common.cpp | 7 ++-
src/Connection.cpp | 6 ++-
src/ConnectionParameters.cpp | 2 +
src/DriverResultSet.cpp | 5 ++
src/DriverSocket.cpp | 2 +
src/Field.cpp | 2 +
src/JavaSocket.cpp | 6 ++-
src/RequestWithResultSetParameters.cpp | 2 +
src/ResultSetMetaData.cpp | 2 +
src/SQLDataSerialization.cpp | 3 +
src/Statement.cpp | 2 -
test/CarobProtector.hpp | 26 +++++++-------
test/TestBeginCommitRollback.cpp | 2 +
test/TestConnect.cpp | 2 +
test/TestExecReadRequest.cpp | 4 ++
test/TestOnValidConnection.cpp | 2 +
34 files changed, 189 insertions(+), 153 deletions(-)
Index: carob/contrib/PHP/sample_carob_request.cpp
diff -u carob/contrib/PHP/sample_carob_request.cpp:1.5
carob/contrib/PHP/sample_carob_request.cpp:1.6
--- carob/contrib/PHP/sample_carob_request.cpp:1.5 Wed Nov 30 10:18:22 2005
+++ carob/contrib/PHP/sample_carob_request.cpp Thu Dec 1 19:10:15 2005
@@ -157,7 +157,7 @@
wide_oss << L"<TR>" << WTABBING << i << WTABBING << drsPtr->getInt(1)
<< WTABBING << drsPtr->getString(2)
- << WTABBING << drsPtr->getString(3) << endl;
+ << WTABBING << drsPtr->getString(3) << std::endl;
std::string narrow_row;
ws2s(wide_oss.str().c_str(), narrow_row);
Index: carob/include/BigDecimal.hpp
diff -u carob/include/BigDecimal.hpp:1.5 carob/include/BigDecimal.hpp:1.6
--- carob/include/BigDecimal.hpp:1.5 Wed Nov 30 10:18:22 2005
+++ carob/include/BigDecimal.hpp Thu Dec 1 19:10:15 2005
@@ -64,7 +64,7 @@
* Convertion to string. Handy for displaying the number
* FIXME: This is dummy code for now (testing state), correct it
*/
- operator wstring();
+ operator std::wstring();
private:
/** Length of the unscaled value java_byte-array */
Index: carob/include/CarobException.hpp
diff -u carob/include/CarobException.hpp:1.16
carob/include/CarobException.hpp:1.17
--- carob/include/CarobException.hpp:1.16 Wed Nov 30 15:05:33 2005
+++ carob/include/CarobException.hpp Thu Dec 1 19:10:15 2005
@@ -31,7 +31,6 @@
class StackTraceElement;
class CarobException;
class DriverSocket;
-using namespace std;
#ifdef __GLIBC__ // from features.h
#define GLIB_BACKTRACE
@@ -40,13 +39,13 @@
#endif // __GLIBC__
// TODO: convert this to wstring (for uniformity reasons)
-typedef vector<string> BackTrace;
+typedef std::vector<std::string> BackTrace;
// TODO: replace this by a vector of actual objects, so we can
// delete our custom copiers and destructors. No need for
// performance here, cause exceptions are not on the critical path.
-typedef vector<StackTraceElement> StackTrace;
+typedef std::vector<StackTraceElement> StackTrace;
/**
* Mother class of all exceptions send by the driver defining common exception
@@ -66,7 +65,7 @@
/**
* Constructs a simple Exception with a message string
*/
- CarobException(wstring s) : message(s), causePtr(NULL) {};
+ CarobException(std::wstring s) : message(s), causePtr(NULL) {};
/**
* Constructs/reads a new Exception chain from the stream
* @param sock socket from which to deserialize exception
@@ -84,14 +83,14 @@
* @param message the detail message
* @param cause the exception that generated this one
*/
- CarobException(const wstring& message, CarobException* cause);
+ CarobException(const std::wstring& message, CarobException* cause);
/**
* Destructor to clean up stack trace and cause exception
*/
virtual ~CarobException();
/** Gets the exception error message */
- virtual wstring description() const { return message; }
+ virtual std::wstring description() const { return message; }
/** Returns the remote java stack trace */
const StackTrace& getStackTrace() const { return stackTrace; }
@@ -103,17 +102,17 @@
const CarobException* getNext() const { return causePtr; }
/** get the SQLState if any */
- const wstring & getSQLState() const { return SQLState; }
+ const std::wstring & getSQLState() const { return SQLState; }
protected:
/** Error message */
- wstring message;
+ std::wstring message;
/** Stack trace as a vector of traces */
StackTrace stackTrace;
/** pointer to the exception that generated this one */
CarobException* causePtr;
/** SQL error message */
- wstring SQLState;
+ std::wstring SQLState;
/** Vendor-specific error code */
int32_t errorCode;
/** Local stack trace when available */
@@ -137,7 +136,7 @@
* Constructs a UnexpectedException with the given message
* @param s error message of the exception
*/
- UnexpectedException(wstring s) : CarobException(s) {};
+ UnexpectedException(std::wstring s) : CarobException(s) {};
/**
* std::unexpected handler. Throws an Unexpected exception instead of
* terminating the program
@@ -155,7 +154,7 @@
* Constructs a DriverException with the given message
* @param s error message of the exception
*/
- DriverException(wstring s) : CarobException(s) {};
+ DriverException(std::wstring s) : CarobException(s) {};
};
/**
@@ -168,7 +167,7 @@
* Constructs a JavaSocketException with the given message
* @param s error message of the exception
*/
- JavaSocketException(wstring s) : DriverException(s) {};
+ JavaSocketException(std::wstring s) : DriverException(s) {};
};
/**
@@ -181,7 +180,7 @@
* Constructs a ConnectionException with the given message
* @param s error message of the exception
*/
- ConnectionException(wstring s) : JavaSocketException(s) {};
+ ConnectionException(std::wstring s) : JavaSocketException(s) {};
};
/**
@@ -194,7 +193,7 @@
* Constructs a SocketIOException with the given message
* @param s error message of the exception
*/
- SocketIOException(wstring s) : JavaSocketException(s) {};
+ SocketIOException(std::wstring s) : JavaSocketException(s) {};
};
/**
@@ -207,7 +206,7 @@
* Constructs a AuthenticationException with the given message
* @param s error message of the exception
*/
- AuthenticationException(wstring s) : JavaSocketException(s) {};
+ AuthenticationException(std::wstring s) : JavaSocketException(s) {};
};
/**
@@ -220,7 +219,7 @@
* Constructs a ProtocolException with the given message
* @param s error message of the exception
*/
- ProtocolException(wstring s) : DriverException(s) {};
+ ProtocolException(std::wstring s) : DriverException(s) {};
};
/**
@@ -233,7 +232,7 @@
* Constructs a NotImplementedException with the given message
* @param s error message of the exception
*/
- NotImplementedException(wstring s) : DriverException(s) {};
+ NotImplementedException(std::wstring s) : DriverException(s) {};
};
/**
@@ -247,7 +246,7 @@
* Constructs a BackendException with the given message
* @param s error message of the exception
*/
- BackendException(wstring s) : CarobException(s) {};
+ BackendException(std::wstring s) : CarobException(s) {};
/**
* De-serializes a BackendException from the given stream
* @param sock driver socket from which to deserialize exception
@@ -266,7 +265,7 @@
* Constructs a ControllerException with the given message
* @param s error message of the exception
*/
- ControllerException(wstring s) : CarobException(s) {};
+ ControllerException(std::wstring s) : CarobException(s) {};
/**
* De-serializes a ControllerException from the given stream
* @param sock driver socket from which to deserialize exception
@@ -284,7 +283,7 @@
* Constructs a SQLException with the given message
* @param s error message of the exception
*/
- SQLException(wstring s) : CarobException(s) {};
+ SQLException(std::wstring s) : CarobException(s) {};
};
@@ -306,9 +305,9 @@
* Provides a string representation of the element.
* @return all members formated in a single string
*/
- wstring toWString() const
+ std::wstring toWString() const
{
- wostringstream oss;
+ std::wostringstream oss;
oss << L"at " << declaringClass << L"." << methodName << L"(" << fileName
<< L":" << lineNumber << L")";
return oss.str();
}
@@ -316,9 +315,9 @@
// we would like to have const members (and initializer lists)
// but we would then rely on declaration order; plus there is
// a syntax issue with operator>>
- wstring declaringClass;
- wstring methodName;
- wstring fileName;
+ std::wstring declaringClass;
+ std::wstring methodName;
+ std::wstring fileName;
int32_t lineNumber;
};
#endif //_CAROBEXCEPTION_H_
Index: carob/include/Common.hpp
diff -u carob/include/Common.hpp:1.13 carob/include/Common.hpp:1.14
--- carob/include/Common.hpp:1.13 Tue Nov 29 14:23:20 2005
+++ carob/include/Common.hpp Thu Dec 1 19:10:15 2005
@@ -132,5 +132,25 @@
*/
extern std::wstring toWString(const int32_t& i);
+/**
+ * Defines data type that can be found in ResultSets
+ */
+union ResultSetDataType
+{
+ /** for booleans and bits */
+ bool as_bool;
+ /** for bytes */
+ uint8_t as_byte;
+ /** for integers */
+ int32_t as_int;
+ /** for longs */
+ int64_t as_long;
+ /** for floats */
+ float as_float;
+ /** for doubles */
+ double as_double;
+ /** for all other types */
+ void* as_other;
+};
#endif //_COMMON_H_
Index: carob/include/Connection.hpp
diff -u carob/include/Connection.hpp:1.27 carob/include/Connection.hpp:1.28
--- carob/include/Connection.hpp:1.27 Tue Nov 29 15:21:28 2005
+++ carob/include/Connection.hpp Thu Dec 1 19:10:15 2005
@@ -198,7 +198,7 @@
* @return a <code>list</code> of <code>ResultSetOrUpdateCount</code>
elements
* @throws SocketIOException if an error occurs
*/
- list<ResultSetOrUpdateCount> statementExecute(
+ std::list<ResultSetOrUpdateCount> statementExecute(
RequestWithResultSetParameters& request)
throw (SocketIOException,
BackendException,
ControllerException, ProtocolException,
@@ -210,7 +210,7 @@
* @throw DriverSQLException if an error occurs
* @throw SocketIOException if an error occurs on the socket
*/
- void closeRemoteResultSet(wstring cursorName)
+ void closeRemoteResultSet(std::wstring cursorName)
throw (SocketIOException, BackendException,
ControllerException, ProtocolException,
UnexpectedException);
@@ -244,7 +244,7 @@
* @param fetchSize number of rows to fetch
* @throws ControllerException if an error occurs
*/
- void tryFetchNext(const wstring& cursorName, int fetchSize)
+ void tryFetchNext(const std::wstring& cursorName, int fetchSize)
throw (ControllerException, SocketIOException,
ProtocolException, UnexpectedException);
@@ -392,7 +392,7 @@
* @throws SocketIOException stream or protocol error
* @throws CarobException coming from the controller
*/
- wstring receiveStringOrException() throw (SocketIOException,
+ std::wstring receiveStringOrException() throw (SocketIOException,
BackendException,
ControllerException,
ProtocolException,
Index: carob/include/ConnectionParameters.hpp
diff -u carob/include/ConnectionParameters.hpp:1.4
carob/include/ConnectionParameters.hpp:1.5
--- carob/include/ConnectionParameters.hpp:1.4 Fri Oct 28 11:06:21 2005
+++ carob/include/ConnectionParameters.hpp Thu Dec 1 19:10:15 2005
@@ -43,8 +43,6 @@
#define DEFAULT_DB L"myDB"
#define DEFAULT_DEBUG_LEVEL DEBUG_LEVEL_OFF
-using namespace std;
-
/**
* This class contains the parameters for a connection to the controller.
* This connection parameters will be used by the Connection class.
@@ -60,8 +58,9 @@
/**
* Creates instance with set of values
*/
- ConnectionParameters(const wstring&, const in_addr_t&, const wstring&,
- const wstring&, const wstring&, const DebugLevel&);
+ ConnectionParameters(const std::wstring&, const in_addr_t&,
+ const std::wstring&, const std::wstring&, const std::wstring&,
+ const DebugLevel&);
virtual ~ConnectionParameters();
@@ -69,51 +68,51 @@
* Validates database name. If invalid returns false and set param char to
the
* first invalid character.
*/
- bool isValidDatabaseName(const wstring&, wchar_t&) const;
+ bool isValidDatabaseName(const std::wstring&, wchar_t&) const;
/**
* Validates host name. If invalid returns false and set param char to the
* first invalid character.
*/
- bool isValidHostName(const wstring&, wchar_t&) const;
+ bool isValidHostName(const std::wstring&, wchar_t&) const;
/** Gives the host name */
- inline wstring getHostName() const { return hostName; }
+ inline std::wstring getHostName() const { return hostName; }
/** Sets the host name */
- void setHostName(const wstring&);
+ void setHostName(const std::wstring&);
/** Gives the host port */
- inline in_addr_t getHostPort() const { return hostPort; }
+ inline in_addr_t getHostPort() const { return hostPort; }
/** Sets the host port */
- inline void setHostPort(const in_addr_t& p) { hostPort = p; }
+ inline void setHostPort(const in_addr_t& p) { hostPort = p; }
/** Gives the database name */
- inline wstring getDatabaseName() const { return
databaseName; }
+ inline std::wstring getDatabaseName() const { return databaseName; }
/** Sets the database name */
- void setDatabaseName(const wstring&);
+ void setDatabaseName(const std::wstring&);
/** Gives the user name */
- inline wstring getUserName() const { return userName; }
+ inline std::wstring getUserName() const { return userName; }
/** Sets the user name */
- inline void setUserName(const wstring& name) { userName = name; }
+ inline void setUserName(const std::wstring& name) { userName = name;
}
/** Gives the user password */
- inline wstring getUserPass() const { return userPass; }
+ inline std::wstring getUserPass() const { return userPass; }
/** Sets the user password */
- inline void setUserPass(const wstring& pass) { userPass = pass; }
+ inline void setUserPass(const std::wstring& pass) { userPass = pass;
}
/** Gives the debug level */
- inline DebugLevel getDebugLevel() const { return debugLevel;
}
+ inline DebugLevel getDebugLevel() const { return debugLevel; }
/** Sets the debug level */
- inline void setDebugLevel(const DebugLevel& dl) { debugLevel = dl; }
+ inline void setDebugLevel(const DebugLevel& dl) { debugLevel = dl; }
private:
/** String representation of the host name, fully qualified or IP address */
- wstring hostName;
+ std::wstring hostName;
/** Host port as a in_addr_t (unsigned int) */
- in_addr_t hostPort;
+ in_addr_t hostPort;
/** Name of the database */
- wstring databaseName;
+ std::wstring databaseName;
/** User name for database access */
- wstring userName;
+ std::wstring userName;
/** User password for database access */
- wstring userPass;
+ std::wstring userPass;
/** Connection debug level */
- DebugLevel debugLevel;
+ DebugLevel debugLevel;
//TODO: ControllerInfo, ConnectionPolicy
};
Index: carob/include/DriverResultSet.hpp
diff -u carob/include/DriverResultSet.hpp:1.13
carob/include/DriverResultSet.hpp:1.14
--- carob/include/DriverResultSet.hpp:1.13 Wed Nov 30 15:07:05 2005
+++ carob/include/DriverResultSet.hpp Thu Dec 1 19:10:15 2005
@@ -114,7 +114,7 @@
/**
* Cast to wstring. Handy for displaying the result set infos
*/
- operator wstring();
+ operator std::wstring();
/**
* A ResultSet is initially positioned before its first row, the first call
to
* next makes the first row the current row; the second call makes the second
@@ -138,8 +138,8 @@
* @return the column value, null for SQL NULL
* @throw SQLException if a database access error occurs
*/
- wstring getString(int32_t columnIndex) throw
(SQLException,
- UnexpectedException);
+ std::wstring getString(int32_t columnIndex)
+ throw (SQLException, UnexpectedException);
/**
* Get the value of a column in the current row as an int.
*
@@ -215,7 +215,7 @@
/** Number of columns */
int32_t nbOfColumns;
/** The results */
- vector< vector<ResultSetDataType> > data;
+ std::vector< std::vector<ResultSetDataType> > data;
/** Indicates that no data has been read yet */
bool dataIsNull;
/**
@@ -228,19 +228,19 @@
* ...case x: return bit_struct.bx;
* bit_struct would be: typedef struct { bool b0:1; bool b1:1; ...}
*/
- vector< vector<bool> > nulls;
+ std::vector< std::vector<bool> > nulls;
/** Type of columns as defined by the controller */
- vector<TypeTag> columnTypeTags;
+ std::vector<TypeTag> columnTypeTags;
/** True if there is more data to fetch from the controller */
bool hasMoreData;
/** The fetch size */
int32_t fetchSize;
/** ResultSet cursor name */
- wstring cursorName;
+ std::wstring cursorName;
/** The fields */
- vector<Field*> fields;
+ std::vector<Field*> fields;
/** Pointers to column-specific deserializer functions */
- vector<deserializerPtr> deserializers;
+ std::vector<deserializerPtr> deserializers;
/** for wasNull() */
bool wasNullFlag;
//TODO:
Index: carob/include/DriverSocket.hpp
diff -u carob/include/DriverSocket.hpp:1.7 carob/include/DriverSocket.hpp:1.8
--- carob/include/DriverSocket.hpp:1.7 Fri Nov 25 15:44:03 2005
+++ carob/include/DriverSocket.hpp Thu Dec 1 19:10:15 2005
@@ -37,14 +37,14 @@
* @param port port of the host to connect to
* @throws ConnectionException
*/
- DriverSocket(const wstring& host, const in_addr_t port)
+ DriverSocket(const std::wstring& host, const in_addr_t port)
throw (ConnectionException, UnexpectedException);
/**
* Writes a string to the socket according to the controller protocol
* @throws SocketIOException
*/
- const DriverSocket & operator<<(const wstring &) const
+ const DriverSocket & operator<<(const std::wstring &) const
throw (SocketIOException, UnexpectedException);
/**
@@ -58,7 +58,7 @@
* Reads a string from the socket according to the controller protocol
* @throws SocketIOException
*/
- const DriverSocket & operator>>(wstring &) const
+ const DriverSocket & operator>>(std::wstring &) const
throw (SocketIOException, UnexpectedException);
/**
* Writes a 32-bits int to the socket
Index: carob/include/Field.hpp
diff -u carob/include/Field.hpp:1.5 carob/include/Field.hpp:1.6
--- carob/include/Field.hpp:1.5 Fri Nov 25 16:04:47 2005
+++ carob/include/Field.hpp Thu Dec 1 19:10:15 2005
@@ -23,7 +23,6 @@
#define FIELD_H_
#include <string>
-using namespace std;
#include "DriverSocket.hpp"
@@ -49,17 +48,17 @@
* Returns the fieldLabel value.
* @return the fieldLabel
*/
- wstring getFieldLabel() const { return field_label; }
+ std::wstring getFieldLabel() const { return field_label; }
/**
* Gets the field name.
* @return a <code>wstring</code> containing the field name
*/
- wstring getFieldName() const { return field_name; }
+ std::wstring getFieldName() const { return field_name; }
/**
* Gets the full name: "tableName.fieldName"
* @return a <code>String</code> containing the full field name
*/
- wstring getFullName() { return table_name + L"." + field_name; }
+ std::wstring getFullName() { return table_name + L"." + field_name; }
/**
* Get the number of decimal digits.
* @return precision
@@ -82,17 +81,17 @@
* Gets the table name.
* @return table name
*/
- wstring getTableName() { return table_name; }
+ std::wstring getTableName() { return table_name; }
/**
* Retrieves the database-specific type name.
* @return SQL type name
*/
- wstring getTypeName() { return type_name; }
+ std::wstring getTypeName() { return type_name; }
/**
* Returns the Java class used by the mapping.
* Not very meanfull for carob, but keeps java driver code reflexion
*/
- wstring getColumnClassName() { return column_class_name; }
+ std::wstring getColumnClassName() { return column_class_name; }
/**
* Indicates the normal maximum width in characters.
* @return column display size
@@ -152,17 +151,17 @@
* @return full name
* @see #getFullName()
*/
- wstring toString() { return getFullName(); }
+ std::wstring toString() { return getFullName(); }
private:
- wstring table_name;
+ std::wstring table_name;
bool table_name_not_null;
- wstring field_name;
- wstring field_label;
+ std::wstring field_name;
+ std::wstring field_label;
int32_t column_display_size;
int32_t sql_type;
- wstring type_name;
- wstring column_class_name;
+ std::wstring type_name;
+ std::wstring column_class_name;
bool is_auto_increment;
bool is_case_sensitive;
bool is_currency;
Index: carob/include/JavaSocket.hpp
diff -u carob/include/JavaSocket.hpp:1.10 carob/include/JavaSocket.hpp:1.11
--- carob/include/JavaSocket.hpp:1.10 Thu Nov 10 12:12:42 2005
+++ carob/include/JavaSocket.hpp Thu Dec 1 19:10:15 2005
@@ -88,7 +88,7 @@
* @return the number of bytes send
* @throws SocketIOException
*/
- size_t writeJavaUTF(const wstring& str) const
+ size_t writeJavaUTF(const std::wstring& str) const
throw (SocketIOException, UnexpectedException);
/**
* Reads java encoded string from socket.
@@ -96,7 +96,7 @@
* @return the length read in bytes
* @throws SocketIOException
*/
- size_t readJavaUTF(wstring& str) const throw (SocketIOException,
+ size_t readJavaUTF(std::wstring& str) const throw (SocketIOException,
UnexpectedException);
/**
* Writes 32bits-integer to socket
@@ -161,7 +161,7 @@
* @return true if the data could be send successfully
* @throws SocketIOException
*/
- bool sendToSocket( const wstring fctName, const wstring objName,
+ bool sendToSocket(const std::wstring fctName, const std::wstring
objName,
const void* buf, const int len, const int flags)
const throw (SocketIOException, UnexpectedException);
/**
@@ -174,7 +174,7 @@
* @return true if the data could be send successfully
* @throws SocketIOException
*/
- bool receiveFromSocket(wstring fctName, wstring objName,
+ bool receiveFromSocket(std::wstring fctName, std::wstring objName,
void *buf, const int len, const int flags)
const throw (SocketIOException, UnexpectedException);
Index: carob/include/Request.hpp
diff -u carob/include/Request.hpp:1.6 carob/include/Request.hpp:1.7
--- carob/include/Request.hpp:1.6 Fri Nov 25 16:21:31 2005
+++ carob/include/Request.hpp Thu Dec 1 19:10:15 2005
@@ -24,7 +24,6 @@
#include "DriverSocket.hpp"
-using namespace std;
/**
* This class defines a Request object. This basically carries the SQL
statement
* and the SQL template if this is a PreparedStatement.
@@ -37,7 +36,7 @@
*
* @param sql the SQL statement
*/
- Request(wstring sql) :
+ Request(std::wstring sql) :
sql_query(sql),
sql_template_is_null(true),
is_read_only(false),
@@ -75,21 +74,22 @@
* Returns the sqlQuery value.
* @return Returns the sqlQuery.
*/
- wstring getSqlQuery() const { return sql_query; }
+ std::wstring getSqlQuery() const { return sql_query; }
/**
* Sets the sqlTemplate.
*/
- Request& setSqlTemplate(wstring sqlTemplatePrm)
+ Request& setSqlTemplate(std::wstring sqlTemplatePrm)
{ sql_template_is_null = false; sql_template = sqlTemplatePrm; return
*this;}
/**
* Sets the sqlQuery value.
*/
- void setSqlQuery(wstring sqlQueryPrm) { sql_query =
sqlQueryPrm; }
+ void setSqlQuery(std::wstring sqlQueryPrm)
+ { sql_query = sqlQueryPrm; }
/**
* Cast to wstring operator to ease printing (for debug/traces).
* @return sql query as a string
*/
- operator wstring& () { return sql_query; }
+ operator std::wstring& () { return sql_query; }
/**
* Returns the sqlTemplateNull value.
* @return true if the sqlTemplate string is NULL (inconsistent)
@@ -100,7 +100,7 @@
* isSqlTemplateNull() to ensure this value consistency
* @return Returns the sqlTemplate.
*/
- wstring getSqlTemplate() const { return sql_template; }
+ std::wstring getSqlTemplate() const { return sql_template; }
/**
* Returns the isReadOnly value.
* @return true if the connection has been set to read only
@@ -141,12 +141,12 @@
// forbid copies (java style)
Request (const Request&);
/** SQL query (should be set in constructor). TODO: should probably be const
*/
- wstring sql_query;
+ std::wstring sql_query;
/**
* SQL query skeleton as it appears in PreparedStatements.
* sqlTemplateIsNull must be set to true if is not a PreparedStatement
*/
- wstring sql_template;
+ std::wstring sql_template;
/** Whether the sqlTemplate string is NULL */
bool sql_template_is_null;
/** True if the connection has been set to read-only */
Index: carob/include/RequestWithResultSetParameters.hpp
diff -u carob/include/RequestWithResultSetParameters.hpp:1.5
carob/include/RequestWithResultSetParameters.hpp:1.6
--- carob/include/RequestWithResultSetParameters.hpp:1.5 Fri Nov 25
16:21:31 2005
+++ carob/include/RequestWithResultSetParameters.hpp Thu Dec 1 19:10:15 2005
@@ -32,7 +32,7 @@
*
* @param sql the SQL statement
*/
- RequestWithResultSetParameters(wstring sql);
+ RequestWithResultSetParameters(std::wstring sql);
virtual ~RequestWithResultSetParameters();
@@ -57,12 +57,12 @@
* Returns the cursorName value.
* @return Returns the cursorName.
*/
- wstring getCursorName() const { return cursor_name; }
+ std::wstring getCursorName() const { return cursor_name; }
/**
* Sets the cursorName value.
* @param cursorNamePrm cursorName to set.
*/
- void setCursorName(wstring cursorNamePrm)
+ void setCursorName(std::wstring cursorNamePrm)
{ cursor_name = cursorNamePrm; }
/**
* Returns the fetchSize value.
@@ -90,7 +90,7 @@
/** Size to be fetched for the ResultSet */
int fetch_size;
/** Name of the cursor of the ResultSet */
- wstring cursor_name;
+ std::wstring cursor_name;
/** Whether the cursor name is valid */
bool cursor_name_is_null;
Index: carob/include/ResultSetMetaData.hpp
diff -u carob/include/ResultSetMetaData.hpp:1.1
carob/include/ResultSetMetaData.hpp:1.2
--- carob/include/ResultSetMetaData.hpp:1.1 Fri Nov 25 16:04:47 2005
+++ carob/include/ResultSetMetaData.hpp Thu Dec 1 19:10:15 2005
@@ -142,7 +142,7 @@
* @return the suggested column title
* @exception DriverException if a the given column number is out of range
*/
- wstring getColumnLabel(int column) throw (DriverException,
+ std::wstring getColumnLabel(int column) throw (DriverException,
UnexpectedException);
/**
@@ -152,7 +152,7 @@
* @return column name
* @exception DriverException if a the given column number is out of range
*/
- wstring getColumnName(int column) throw (DriverException,
+ std::wstring getColumnName(int column) throw (DriverException,
UnexpectedException);
/**
@@ -162,7 +162,7 @@
* @return schema name or "" if not applicable
* @exception DriverException if a the given column number is out of range
*/
- wstring getSchemaName(int column) throw (DriverException,
+ std::wstring getSchemaName(int column) throw (DriverException,
UnexpectedException);
/**
@@ -192,7 +192,7 @@
* @return table name or "" if not applicable
* @exception DriverException if a the given column number is out of range
*/
- wstring getTableName(int column) throw (DriverException,
+ std::wstring getTableName(int column) throw (DriverException,
UnexpectedException);
/**
@@ -203,7 +203,7 @@
* appears or "" if not applicable
* @exception DriverException if a the given column number is out of range
*/
- wstring getCatalogName(int column) throw (DriverException,
+ std::wstring getCatalogName(int column) throw (DriverException,
UnexpectedException);
/**
@@ -225,7 +225,7 @@
* a user-defined type, then a fully-qualified type name is returned.
* @exception DriverException if a the given column number is out of range
*/
- wstring getColumnTypeName(int column) throw (DriverException,
+ std::wstring getColumnTypeName(int column) throw (DriverException,
UnexpectedException);
/**
@@ -267,7 +267,7 @@
* language.
* @exception DriverException if a the given column number is out of range
*/
- wstring getColumnClassName(int column) throw (DriverException,
+ std::wstring getColumnClassName(int column) throw (DriverException,
UnexpectedException);
private:
Index: carob/include/SQLDataSerialization.hpp
diff -u carob/include/SQLDataSerialization.hpp:1.4
carob/include/SQLDataSerialization.hpp:1.5
--- carob/include/SQLDataSerialization.hpp:1.4 Wed Nov 30 10:18:22 2005
+++ carob/include/SQLDataSerialization.hpp Thu Dec 1 19:10:15 2005
@@ -26,26 +26,8 @@
#include "TypeTag.hpp"
-/**
- * Union to store ResultSets data
- */
-union ResultSetDataType
-{
- /** for booleans and bits */
- bool as_bool;
- /** for bytes */
- uint8_t as_byte;
- /** for integers */
- int32_t as_int;
- /** for longs */
- int64_t as_long;
- /** for floats */
- float as_float;
- /** for doubles */
- double as_double;
- /** for all other types */
- void* as_other;
-};
+//forward this union which is declared in Common.hpp
+union ResultSetDataType;
/** To ease and simplify deserialization function pointers declaration */
typedef ResultSetDataType (*deserializerPtr)(const DriverSocket&);
Index: carob/include/Statement.hpp
diff -u carob/include/Statement.hpp:1.8 carob/include/Statement.hpp:1.9
--- carob/include/Statement.hpp:1.8 Wed Nov 30 15:06:40 2005
+++ carob/include/Statement.hpp Thu Dec 1 19:10:15 2005
@@ -183,7 +183,8 @@
*
* @param name the new cursor name
*/
- void setCursorName(wstring name) { cursorName = name; }
+ void setCursorName(std::wstring name)
+ { cursorName = name; }
/**
* Retrieves the type of the generated <code>ResultSet</code>.
*
@@ -263,9 +264,9 @@
void setReadRequestParameters(
RequestWithResultSetParameters& request);
/** List of updateCount/ResultSet */
- list<ResultSetOrUpdateCount> resultList;
+ std::list<ResultSetOrUpdateCount> resultList;
/** Iterator on the list of results */
- list<ResultSetOrUpdateCount>::const_iterator resultListIterator;
+ std::list<ResultSetOrUpdateCount>::const_iterator resultListIterator;
private:
/** Connection that created us */
Connection* connectionPtr;
@@ -278,7 +279,7 @@
/** Default ResultSet fetch size */
int fetchSize;
/** Cursor name used jointly with fetch size */
- wstring cursorName;
+ std::wstring cursorName;
/** Type of the ResultSet defaults to TYPE_FORWARD_ONLY */
int resultSetType;
/** ResultSet Concurrency defaults to CONCUR_READ_ONLY */
Index: carob/include/TypeTag.hpp
diff -u carob/include/TypeTag.hpp:1.5 carob/include/TypeTag.hpp:1.6
--- carob/include/TypeTag.hpp:1.5 Fri Nov 25 16:04:47 2005
+++ carob/include/TypeTag.hpp Thu Dec 1 19:10:15 2005
@@ -32,8 +32,6 @@
// parsing of the file
#include "TypeConstants.hpp"
-using namespace std;
-
/**
* This class implements protocol type tags with an internal String, but offers
* an interface on top of it in order to be transparently substituted
Index: carob/src/BigDecimal.cpp
diff -u carob/src/BigDecimal.cpp:1.7 carob/src/BigDecimal.cpp:1.8
--- carob/src/BigDecimal.cpp:1.7 Wed Nov 30 10:18:22 2005
+++ carob/src/BigDecimal.cpp Thu Dec 1 19:10:15 2005
@@ -1,4 +1,7 @@
#include "BigDecimal.hpp"
+#include "Common.hpp"
+
+using std::wstring;
BigDecimal::BigDecimal()
{
@@ -106,7 +109,7 @@
{
result[i] = byteArray[b--] & 0xff;
int bytesRemaining = b - keep + 1;
- int bytesToTransfer = min(3, bytesRemaining);
+ int bytesToTransfer = std::min(3, bytesRemaining);
for (int j=8; j <= 8*bytesToTransfer; j += 8)
result[i] |= ((byteArray[b--] & 0xff) << j);
}
@@ -136,7 +139,7 @@
for (int i = intArrayLength-1; i >= 0; i--)
{
result[i] = byteArray[b--] & 0xff;
- int numBytesToTransfer = min(3, b-keep+1);
+ int numBytesToTransfer = std::min(3, b-keep+1);
if (numBytesToTransfer < 0)
numBytesToTransfer = 0;
for (int j=8; j <= 8*numBytesToTransfer; j += 8)
Index: carob/src/CarobException.cpp
diff -u carob/src/CarobException.cpp:1.10 carob/src/CarobException.cpp:1.11
--- carob/src/CarobException.cpp:1.10 Mon Nov 28 16:17:58 2005
+++ carob/src/CarobException.cpp Thu Dec 1 19:10:15 2005
@@ -22,6 +22,8 @@
#include "CarobException.hpp"
#include "DriverSocket.hpp"
+using std::wstring;
+
/** constructs the BackTrace of the current place */
static BackTrace currentBackTrace()
{
Index: carob/src/Common.cpp
diff -u carob/src/Common.cpp:1.7 carob/src/Common.cpp:1.8
--- carob/src/Common.cpp:1.7 Tue Nov 29 14:23:20 2005
+++ carob/src/Common.cpp Thu Dec 1 19:10:15 2005
@@ -28,7 +28,10 @@
LogLevel currentLogLevel = LOG_LEVEL_WARNING;
-using namespace std;
+using std::wstring;
+using std::string;
+using std::wcerr;
+using std::endl;
void setLogLevel(const LogLevel l)
{
@@ -158,7 +161,7 @@
wstring toWString(const int32_t& arg)
{
- wostringstream buffer;
+ std::wostringstream buffer;
buffer << arg;
return buffer.str();
}
Index: carob/src/Connection.cpp
diff -u carob/src/Connection.cpp:1.30 carob/src/Connection.cpp:1.31
--- carob/src/Connection.cpp:1.30 Mon Nov 28 15:56:44 2005
+++ carob/src/Connection.cpp Thu Dec 1 19:10:15 2005
@@ -21,6 +21,8 @@
#include "Connection.hpp"
#include "Statement.hpp"
+using std::wstring;
+
Connection::~Connection()
{
close();
@@ -551,7 +553,7 @@
return controllerResponse;
}
-list<ResultSetOrUpdateCount> Connection::statementExecute(
+std::list<ResultSetOrUpdateCount> Connection::statementExecute(
RequestWithResultSetParameters& request) throw (SocketIOException,
BackendException, ControllerException, ProtocolException,
UnexpectedException)
@@ -559,7 +561,7 @@
wstring fctName(L"Connection::statementExecute");
connectionCS.Enter();
- list<ResultSetOrUpdateCount> results;
+ std::list<ResultSetOrUpdateCount> results;
checkIfConnected();
Index: carob/src/ConnectionParameters.cpp
diff -u carob/src/ConnectionParameters.cpp:1.3
carob/src/ConnectionParameters.cpp:1.4
--- carob/src/ConnectionParameters.cpp:1.3 Thu Nov 3 15:29:02 2005
+++ carob/src/ConnectionParameters.cpp Thu Dec 1 19:10:15 2005
@@ -23,6 +23,8 @@
#include "ConnectionParameters.hpp"
#include "CarobException.hpp"
+using std::wstring;
+
ConnectionParameters::ConnectionParameters() :
hostName(DEFAULT_HOST),
hostPort(DEFAULT_PORT),
Index: carob/src/DriverResultSet.cpp
diff -u carob/src/DriverResultSet.cpp:1.10 carob/src/DriverResultSet.cpp:1.11
--- carob/src/DriverResultSet.cpp:1.10 Wed Nov 30 10:18:22 2005
+++ carob/src/DriverResultSet.cpp Thu Dec 1 19:10:15 2005
@@ -28,6 +28,9 @@
#include "TypeTag.hpp"
#include "Statement.hpp"
+using std::wstring;
+using std::vector;
+
DriverResultSet::~DriverResultSet()
{
for (int32_t i=0; i<nbOfColumns; i++)
@@ -151,7 +154,7 @@
if (wasNullFlag)
return NULL;
- wostringstream buffer;
+ std::wostringstream buffer;
//TODO: big switch on column data type
switch (columnTypeTags[columnIndex - 1])
Index: carob/src/DriverSocket.cpp
diff -u carob/src/DriverSocket.cpp:1.6 carob/src/DriverSocket.cpp:1.7
--- carob/src/DriverSocket.cpp:1.6 Tue Nov 15 17:19:52 2005
+++ carob/src/DriverSocket.cpp Thu Dec 1 19:10:15 2005
@@ -23,6 +23,8 @@
#include "CarobException.hpp"
#include "DriverSocket.hpp"
+using std::wstring;
+
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.5 carob/src/Field.cpp:1.6
--- carob/src/Field.cpp:1.5 Fri Nov 25 16:04:47 2005
+++ carob/src/Field.cpp Thu Dec 1 19:10:15 2005
@@ -21,6 +21,8 @@
#include "Field.hpp"
+using std::wstring;
+
Field::Field(const DriverSocket& sockPtr) throw (SocketIOException,
UnexpectedException)
{
Index: carob/src/JavaSocket.cpp
diff -u carob/src/JavaSocket.cpp:1.15 carob/src/JavaSocket.cpp:1.16
--- carob/src/JavaSocket.cpp:1.15 Tue Nov 29 14:23:20 2005
+++ carob/src/JavaSocket.cpp Thu Dec 1 19:10:15 2005
@@ -26,6 +26,8 @@
#include "Common.hpp"
#include "JavaSocket.hpp"
+using std::wstring;
+
JavaSocket::JavaSocket() :
socketFd(-1),
connected(false)
@@ -101,7 +103,7 @@
sockaddr_in addr;
memset(&addr, 0, sizeof(addr));
// try
- string hostAsString = toString(host);
+ std::string hostAsString = toString(host);
#if 0
// FIXME catch conversion error/exception here
if (!wstringToString(hostAsString, host))
@@ -249,7 +251,7 @@
if (receiveFromSocket(fctName, L"UTF string", utfStr, lenRec, 0))
{
// FIXME: we don't support inline zeros. We should get rid of c_str
- string received((const char*)utfStr);
+ std::string received((const char*)utfStr);
// FIXME: don't use this locale converter cause received is ALWAYS UTF-8!
// this is correct:
Index: carob/src/RequestWithResultSetParameters.cpp
diff -u carob/src/RequestWithResultSetParameters.cpp:1.4
carob/src/RequestWithResultSetParameters.cpp:1.5
--- carob/src/RequestWithResultSetParameters.cpp:1.4 Fri Nov 25 16:21:31 2005
+++ carob/src/RequestWithResultSetParameters.cpp Thu Dec 1 19:10:15 2005
@@ -1,5 +1,7 @@
#include "RequestWithResultSetParameters.hpp"
+using std::wstring;
+
RequestWithResultSetParameters::RequestWithResultSetParameters(wstring sql) :
Request(sql),
max_rows(0),
Index: carob/src/ResultSetMetaData.cpp
diff -u carob/src/ResultSetMetaData.cpp:1.2 carob/src/ResultSetMetaData.cpp:1.3
--- carob/src/ResultSetMetaData.cpp:1.2 Mon Nov 28 13:51:37 2005
+++ carob/src/ResultSetMetaData.cpp Thu Dec 1 19:10:15 2005
@@ -20,6 +20,8 @@
*/
#include "ResultSetMetaData.hpp"
+using std::wstring;
+
ResultSetMetaData::ResultSetMetaData(DriverResultSet* rs)
throw (DriverException, UnexpectedException)
{
Index: carob/src/SQLDataSerialization.cpp
diff -u carob/src/SQLDataSerialization.cpp:1.8
carob/src/SQLDataSerialization.cpp:1.9
--- carob/src/SQLDataSerialization.cpp:1.8 Wed Nov 30 10:18:22 2005
+++ carob/src/SQLDataSerialization.cpp Thu Dec 1 19:10:15 2005
@@ -23,8 +23,11 @@
#include "BigDecimal.hpp"
#include "CarobException.hpp"
+#include "Common.hpp"
#include "SQLDataSerialization.hpp"
+using std::wstring;
+
ResultSetDataType stringDeserializer(const DriverSocket& input)
throw (SocketIOException, UnexpectedException)
{
Index: carob/src/Statement.cpp
diff -u carob/src/Statement.cpp:1.9 carob/src/Statement.cpp:1.10
--- carob/src/Statement.cpp:1.9 Wed Nov 30 15:06:40 2005
+++ carob/src/Statement.cpp Thu Dec 1 19:10:15 2005
@@ -3,7 +3,7 @@
#include "Connection.hpp"
#include "Statement.hpp"
-using namespace std;
+using std::wstring;
Statement::Statement(Connection* c) :
connectionPtr(c),
Index: carob/test/CarobProtector.hpp
diff -u carob/test/CarobProtector.hpp:1.7 carob/test/CarobProtector.hpp:1.8
--- carob/test/CarobProtector.hpp:1.7 Mon Nov 28 19:48:29 2005
+++ carob/test/CarobProtector.hpp Thu Dec 1 19:10:15 2005
@@ -26,24 +26,24 @@
#include <cppunit/Message.h>
-static const wstring BEPREFIX(L"BackendException: ");
-static const wstring COPREFIX(L"ControllerException: ");
-static const wstring CAPREFIX(L"CarobException: ");
-static const wstring UEPREFIX(L"UnexpectedException: ");
-static const wstring NEXTPREFIX(L" next CarobException : ");
+static const std::wstring BEPREFIX(L"BackendException: ");
+static const std::wstring COPREFIX(L"ControllerException: ");
+static const std::wstring CAPREFIX(L"CarobException: ");
+static const std::wstring UEPREFIX(L"UnexpectedException: ");
+static const std::wstring NEXTPREFIX(L" next CarobException : ");
-static void cerrStackTrace(const wstring& prefix, const CarobException& cex)
+static void cerrStackTrace(const std::wstring& prefix, const CarobException&
cex)
{
- wcerr << prefix << "SQL state: " << cex.getSQLState() << endl;
- wcerr << prefix << "remote stack: " << endl;
+ 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++)
std::wcerr << prefix << s->toWString() << std::endl;;
}
-static void cerrBackTrace(const wstring& prefix, const CarobException& cex)
+static void cerrBackTrace(const std::wstring& prefix, const CarobException&
cex)
{
const BackTrace& stvect = cex.getBackTrace();
for (BackTrace::const_iterator btframe = stvect.begin(); btframe !=
stvect.end(); btframe++) {
@@ -51,7 +51,7 @@
}
}
-static void cerrCarobExceptionChain(const wstring& prefix, const
CarobException& ce)
+static void cerrCarobExceptionChain(const std::wstring& prefix, const
CarobException& ce)
{
cerrBackTrace(prefix, ce);
cerrStackTrace(prefix, ce);
@@ -59,7 +59,7 @@
const CarobException* nextex_p = &ce;
while ((nextex_p = nextex_p->getNext()) != NULL) {
- wcerr << " Next CarobException" << endl;
+ std::wcerr << " Next CarobException" << std::endl;
cerrStackTrace(NEXTPREFIX, *nextex_p);
}
}
@@ -72,9 +72,9 @@
{
void reportCppUnitError(const CppUnit::ProtectorContext &context,
- const string& prefix, const CarobException& ce)
+ const std::string& prefix, const CarobException& ce)
{
- wstring sqlState = ce.getSQLState();
+ std::wstring sqlState = ce.getSQLState();
reportError( context, CppUnit::Message(prefix
+ toString(ce.description())
+ toString(sqlState)));
Index: carob/test/TestBeginCommitRollback.cpp
diff -u carob/test/TestBeginCommitRollback.cpp:1.6
carob/test/TestBeginCommitRollback.cpp:1.7
--- carob/test/TestBeginCommitRollback.cpp:1.6 Fri Nov 25 17:29:10 2005
+++ carob/test/TestBeginCommitRollback.cpp Thu Dec 1 19:10:15 2005
@@ -23,6 +23,8 @@
#include "TestBeginCommitRollback.hpp"
#include "Request.hpp"
+using std::wstring;
+
void TestBeginCommitRollback::testReadRequestAndCommit()
{
wstring fctName(L"TestBeginCommitRollback::testReadRequestAndCommit");
Index: carob/test/TestConnect.cpp
diff -u carob/test/TestConnect.cpp:1.5 carob/test/TestConnect.cpp:1.6
--- carob/test/TestConnect.cpp:1.5 Fri Nov 25 17:29:10 2005
+++ carob/test/TestConnect.cpp Thu Dec 1 19:10:15 2005
@@ -25,6 +25,8 @@
#include "CarobException.hpp"
#include "TestConnect.hpp"
+using std::wstring;
+
void TestConnect::setUp()
{
connectionPoolPtr = &ConnectionPool::getInstance();
Index: carob/test/TestExecReadRequest.cpp
diff -u carob/test/TestExecReadRequest.cpp:1.11
carob/test/TestExecReadRequest.cpp:1.12
--- carob/test/TestExecReadRequest.cpp:1.11 Wed Nov 30 10:18:22 2005
+++ carob/test/TestExecReadRequest.cpp Thu Dec 1 19:10:15 2005
@@ -27,6 +27,10 @@
#include "TestExecReadRequest.hpp"
#include "RequestWithResultSetParameters.hpp"
+using std::wstring;
+using std::wcerr;
+using std::endl;
+
void TestExecReadRequest::testReadBadRequest()
{
wstring fctName(L"TestExecReadRequest::testReadBadRequest");
Index: carob/test/TestOnValidConnection.cpp
diff -u carob/test/TestOnValidConnection.cpp:1.2
carob/test/TestOnValidConnection.cpp:1.3
--- carob/test/TestOnValidConnection.cpp:1.2 Fri Nov 25 17:29:10 2005
+++ carob/test/TestOnValidConnection.cpp Thu Dec 1 19:10:15 2005
@@ -25,6 +25,8 @@
#include "CarobException.hpp"
#include "TestOnValidConnection.hpp"
+using std::wstring;
+
void TestOnValidConnection::setUp()
{
wstring fctName(L"TestExecReadRequest::setUp");
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits