[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/cygnal ACT/Handle.hpp ACT/Makefile.am Asp...
From: |
Eric Hughes |
Subject: |
[Gnash-commit] gnash/cygnal ACT/Handle.hpp ACT/Makefile.am Asp... |
Date: |
Wed, 03 Oct 2007 15:29:18 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Eric Hughes <eh9> 07/10/03 15:29:18
Modified files:
cygnal/ACT : Handle.hpp Makefile.am
cygnal : Aspect.hpp ChangeLog mainpage.doxygen.txt
cygnal/HTTP : HTTP_Parse.cpp URI.cpp
cygnal/Net : Change_Log.txt Net.cpp Net.hpp Old_Device.hpp
socket_device.cpp
cygnal/Net/unit_tests: Test_socket_device.cpp
cygnal/unit_tests: Change_Log.txt Permutation.hpp main.cpp
Log message:
More std::exception( string ) changes.
More documentation.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/ACT/Handle.hpp?cvsroot=gnash&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/ACT/Makefile.am?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/Aspect.hpp?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/ChangeLog?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/mainpage.doxygen.txt?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/HTTP/HTTP_Parse.cpp?cvsroot=gnash&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/HTTP/URI.cpp?cvsroot=gnash&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/Net/Change_Log.txt?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/Net/Net.cpp?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/Net/Net.hpp?cvsroot=gnash&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/Net/Old_Device.hpp?cvsroot=gnash&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/Net/socket_device.cpp?cvsroot=gnash&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/Net/unit_tests/Test_socket_device.cpp?cvsroot=gnash&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/unit_tests/Change_Log.txt?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/unit_tests/Permutation.hpp?cvsroot=gnash&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/unit_tests/main.cpp?cvsroot=gnash&r1=1.2&r2=1.3
Patches:
Index: ACT/Handle.hpp
===================================================================
RCS file: /sources/gnash/gnash/cygnal/ACT/Handle.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- ACT/Handle.hpp 1 Oct 2007 15:49:40 -0000 1.6
+++ ACT/Handle.hpp 3 Oct 2007 15:29:16 -0000 1.7
@@ -265,10 +265,16 @@
/// The aspect type as actually used.
typedef Aspect< T, Handled > aspect_type ;
- /// The aspect class is a friend
- friend class Aspect< T, Handled > ;
- // Was:
+ // This declaration had been the following:
// friend class aspect_type ;
+ // This syntax isn't normative C++, so it had to go.
+ // The problem is, though, that there's some compiler
defect in MSVC8 that actually accepts the friend declaration
+ // with the non-normative syntax, but not the
normative one.
+
+ /// The aspect class is a friend.
+ /// The aspect is a template parameter, so we know nothing of
aspect structure.
+ /// Hence we use a class friend here.
+ friend class Aspect< T, Handled > ;
private:
/// Type declaration of the class registry
@@ -306,6 +312,11 @@
/// and add a \c const accessor function returning
a reference.
aspect_type aspect ;
+ /// The aspect class is a friend.
+ /// The aspect is a template parameter, so we know nothing of
aspect structure.
+ /// Hence we use a class friend here.
+ friend class Aspect< T, Handled > ;
+
public:
/// Default constructor takes as parameter the \c this pointer
of a derived object.
Handled( T * that, aspect_type aspect = aspect_type() )
Index: ACT/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/cygnal/ACT/Makefile.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- ACT/Makefile.am 14 Jul 2007 19:19:50 -0000 1.1
+++ ACT/Makefile.am 3 Oct 2007 15:29:16 -0000 1.2
@@ -15,10 +15,12 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
+# $Id: Makefile.am,v 1.2 2007/10/03 15:29:16 eh9 Exp $
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = #dejagnu
+#----------------------------------------
+# Makefile.am for Cygnal/ACT
+#----------------------------------------
+SUBDIRS = . test_support unit_tests
AM_CPPFLAGS = # -Wall
Index: Aspect.hpp
===================================================================
RCS file: /sources/gnash/gnash/cygnal/Aspect.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- Aspect.hpp 10 Jul 2007 14:09:11 -0000 1.1
+++ Aspect.hpp 3 Oct 2007 15:29:16 -0000 1.2
@@ -65,7 +65,7 @@
typedef Owner owner_type ;
/// For the null aspect set_owner does nothing.
- inline void set_owner( Owner * x ) {}
+ inline void set_owner( Owner * ) {}
} ;
//--------------------------------------------------
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/cygnal/ChangeLog,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- ChangeLog 5 Sep 2007 16:53:34 -0000 1.2
+++ ChangeLog 3 Oct 2007 15:29:16 -0000 1.3
@@ -1,7 +1,14 @@
2009-09-05 Markus Gothe
-
* cygnal.cpp: Added a #ifdef ENABLE_NLS.
+2007-08-24 Eric Hughes <address@hidden>
+ * ACT/test_support/Supplied_Service.cpp, ACT/unit_tests/Test_ACT.cpp,
IO/Stream_Consumer.cpp,
+ IO/test_support/String_Device.cpp, IO/unit_tests/Test_Buffer.cpp,
Net/Net.cpp, Net/Old_Device.hpp,
+ Net/socket_device.cpp, Net/unit_tests/Test_socket_device.cpp,
HTTP/HTTP_Parse.cpp, HTTP/URI.cpp,
+ unit_tests/Permutation.hpp:
+ Eliminated std::exception constructors with string arguments,
+ replacing with std::runtime_error or std::logic error as
appropriate.
+
2007-07-14 Rob Savoye <address@hidden>
* ACT/Makefile.am: New Makefile.
* HTTP/Makefile.am: New Makefile.
Index: mainpage.doxygen.txt
===================================================================
RCS file: /sources/gnash/gnash/cygnal/mainpage.doxygen.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- mainpage.doxygen.txt 10 Jul 2007 14:09:12 -0000 1.1
+++ mainpage.doxygen.txt 3 Oct 2007 15:29:17 -0000 1.2
@@ -12,7 +12,7 @@
- \ref ACT.
Asynchronous Computation Task.
The multitasking foundation of the system.
- - IO.
+ - \ref IO.
Input/Output.
ACT-enabled I/O infrastructure.
Provides scattered buffering and the conversion of asynchronous
block I/O into an asynchronous stream abstraction.
Index: HTTP/HTTP_Parse.cpp
===================================================================
RCS file: /sources/gnash/gnash/cygnal/HTTP/HTTP_Parse.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- HTTP/HTTP_Parse.cpp 10 Jul 2007 14:09:09 -0000 1.3
+++ HTTP/HTTP_Parse.cpp 3 Oct 2007 15:29:17 -0000 1.4
@@ -20,6 +20,7 @@
*/
#include "HTTP_Parse.hpp"
+#include <stdexcept>
using namespace ACT ;
namespace cygnal { namespace HTTP {
@@ -239,7 +240,7 @@
// Assert there's
lookahead for us.
// But we cannot handle
it yet.
- throw std::exception(
"Implementation Defect: Cannot handle lookahead not in current segment." ) ;
+ throw std::logic_error(
"Implementation Defect: Cannot handle lookahead not in current segment." ) ;
} else {
// Assert next segment
is empty.
Index: HTTP/URI.cpp
===================================================================
RCS file: /sources/gnash/gnash/cygnal/HTTP/URI.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- HTTP/URI.cpp 19 Jul 2007 02:10:37 -0000 1.4
+++ HTTP/URI.cpp 3 Oct 2007 15:29:17 -0000 1.5
@@ -20,6 +20,7 @@
*/
#include "URI.hpp"
+#include <stdexcept>
namespace cygnal {
URI_Scanner::
@@ -461,7 +462,7 @@
return set_completed() ;
}
label_percent_encoding_not_implemented:
- throw std::exception( "% encoding not yet implemented" ) ;
+ throw std::logic_error( "% encoding not yet implemented" ) ;
}
} // end namespace cygnal
Index: Net/Change_Log.txt
===================================================================
RCS file: /sources/gnash/gnash/cygnal/Net/Change_Log.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- Net/Change_Log.txt 10 Jul 2007 14:09:11 -0000 1.1
+++ Net/Change_Log.txt 3 Oct 2007 15:29:17 -0000 1.2
@@ -1,5 +1,8 @@
Change Log for GNU Cygnal, Module Net
=====================================
+2007-08-28 Eric Hughes <address@hidden>
+ * Net.hpp: Added portability documentation.
+
2007-07-06 Eric Hughes <address@hidden>
* socket_device.cpp: Stubbed out obsolete reaction to EINTR.
Index: Net/Net.cpp
===================================================================
RCS file: /sources/gnash/gnash/cygnal/Net/Net.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- Net/Net.cpp 1 Jul 2007 10:53:55 -0000 1.2
+++ Net/Net.cpp 3 Oct 2007 15:29:17 -0000 1.3
@@ -22,6 +22,7 @@
#include "../libbase/log.h"
#include <errno.h>
+#include <stdexcept>
#ifndef HAVE_WINSOCK_H
# define close_socket close
@@ -83,7 +84,7 @@
WSADATA wsaData ;
wVersionRequested = MAKEWORD( 1, 1 ) ; //
Require Windows Sockets 1.1
if ( WSAStartup( wVersionRequested, & wsaData ) != 0 ) {
- throw exception( "Could not initialize winsock"
) ;
+ throw std::runtime_error( "Could not initialize
winsock" ) ;
}
}
++ call_count ;
@@ -464,12 +465,12 @@
int x = connect( the_handle, remote.struct_ptr(),
remote.struct_size() ) ;
if ( x < 0 ) {
if ( last_error() == EINTR ) {
- throw exception( "EINTR not handled yet" ) ;
+ throw std::runtime_error( "EINTR not handled
yet" ) ;
}
// Assert connect failed.
/// \todo Distinguish between implementation/system
failures, e.g. not-a-socket,
/// and operational failures, e.g. host-not-available
- throw exception( "Did not connect" ) ;
+ throw std::runtime_error( "Did not connect" ) ;
}
}
Index: Net/Net.hpp
===================================================================
RCS file: /sources/gnash/gnash/cygnal/Net/Net.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- Net/Net.hpp 10 Jul 2007 14:09:11 -0000 1.3
+++ Net/Net.hpp 3 Oct 2007 15:29:17 -0000 1.4
@@ -33,6 +33,16 @@
# include <arpa/inet.h>
typedef int socket_t ;
#else
+ /* Note:
+ * It is impossible under VC8 to compile this module with
language extensions turned off.
+ * This is a known defect in the Microsoft environment.
+ * The system headers, which winsock.h includes, use
MS-specific language extensions.
+ * The compiler has no way of turning them temporarily on.
+ * The only work-around is to turn extensions on as a
whole.
+ * Warning:
+ * If you are developing with this module primarily under
Visual C++, you will want a second compilation environment available.
+ * MS-specific extensions can creep into code easily,
particularly because some of them are anticipations of future standards.
+ */
# include <winsock2.h>
# include <fcntl.h>
# include <sys/stat.h>
Index: Net/Old_Device.hpp
===================================================================
RCS file: /sources/gnash/gnash/cygnal/Net/Old_Device.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- Net/Old_Device.hpp 10 Jul 2007 14:09:11 -0000 1.3
+++ Net/Old_Device.hpp 3 Oct 2007 15:29:17 -0000 1.4
@@ -72,6 +72,7 @@
#include "ACT/ACT.hpp"
#include "IO/Buffer.hpp"
+#include <stdexcept>
namespace IO {
@@ -165,7 +166,7 @@
/// The NEW reset
/// To be made pure-virtual later.
- virtual void reset() { throw std::exception( "new reset() not
implemented in child class" ) ; }
+ virtual void reset() { throw std::logic_error( "new reset() not
implemented in child class" ) ; }
} ;
Index: Net/socket_device.cpp
===================================================================
RCS file: /sources/gnash/gnash/cygnal/Net/socket_device.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- Net/socket_device.cpp 10 Jul 2007 14:09:11 -0000 1.3
+++ Net/socket_device.cpp 3 Oct 2007 15:29:17 -0000 1.4
@@ -1,4 +1,3 @@
-//
// Copyright (C) 2007 Free Software Foundation, Inc.
//
// This program is free software; you can redistribute it and/or modify
@@ -19,6 +18,7 @@
#include "socket_device.hpp"
#include "errno.h"
+#include <stdexcept>
namespace Net {
//--------------------------------------------------
@@ -148,7 +148,7 @@
socket_device_nonblocking::
consume_up_to( char * )
{
- throw std::exception(
"socket_device_nonblocking::consume_up_to() not implemented" ) ;
+ throw std::logic_error(
"socket_device_nonblocking::consume_up_to() not implemented" ) ;
}
bool
@@ -162,7 +162,7 @@
socket_device_nonblocking::
characters_available( size_t n )
{
- throw std::exception(
"socket_device_nonblocking::characters_available() not implemented" ) ;
+ throw std::logic_error(
"socket_device_nonblocking::characters_available() not implemented" ) ;
}
IO::contiguous_buffer<>
Index: Net/unit_tests/Test_socket_device.cpp
===================================================================
RCS file: /sources/gnash/gnash/cygnal/Net/unit_tests/Test_socket_device.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- Net/unit_tests/Test_socket_device.cpp 10 Jul 2007 14:09:11 -0000
1.3
+++ Net/unit_tests/Test_socket_device.cpp 3 Oct 2007 15:29:17 -0000
1.4
@@ -22,6 +22,7 @@
#include <boost/test/auto_unit_test.hpp>
#include <boost/iostreams/stream.hpp>
#include <boost/thread/thread.hpp>
+#include <stdexcept>
#include "../socket_device.hpp"
@@ -57,7 +58,7 @@
return Net::socket_receptor( server_socket ) ;
} catch (...) {
BOOST_FAIL( "Unexpected exception while creating server socket"
) ;
- throw std::exception( "Huh?" ) ; // present to avoid
warning "not all paths return a value"
+ throw std::logic_error( "Reached a not-reachable statement." )
; // present to avoid warning "not all paths return a value"
}
}
Index: unit_tests/Change_Log.txt
===================================================================
RCS file: /sources/gnash/gnash/cygnal/unit_tests/Change_Log.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- unit_tests/Change_Log.txt 21 Jul 2007 17:51:21 -0000 1.1
+++ unit_tests/Change_Log.txt 3 Oct 2007 15:29:17 -0000 1.2
@@ -1,5 +1,8 @@
Change Log for GNU Cygnal, Module ACT
=====================================
+2007-08-28 Eric Hughes <address@hidden>
+ * main.cpp: Use cygnal_test.hpp in this file, replacing the boost
header that migrated there.
+
2007-07-21 Eric Hughes <address@hidden>
* cygnal_test.hpp: New file with all ordinary inclusions. Includes
MSVC warning suppression.
\ No newline at end of file
Index: unit_tests/Permutation.hpp
===================================================================
RCS file: /sources/gnash/gnash/cygnal/unit_tests/Permutation.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- unit_tests/Permutation.hpp 21 Jul 2007 17:51:21 -0000 1.4
+++ unit_tests/Permutation.hpp 3 Oct 2007 15:29:17 -0000 1.5
@@ -30,6 +30,7 @@
#include <vector>
#include <string>
#include <sstream>
+#include <stdexcept>
#include <boost/function.hpp>
#include <boost/bind.hpp>
@@ -104,7 +105,7 @@
if ( x.at_end ) {
return at_end ;
}
- throw std::exception( "Can only compare against end-iterators
in the present implementation." ) ;
+ throw std::logic_error( "Can only compare against end-iterators
in the present implementation." ) ;
}
/** \class test_function
Index: unit_tests/main.cpp
===================================================================
RCS file: /sources/gnash/gnash/cygnal/unit_tests/main.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- unit_tests/main.cpp 1 Jul 2007 10:53:56 -0000 1.2
+++ unit_tests/main.cpp 3 Oct 2007 15:29:17 -0000 1.3
@@ -21,5 +21,5 @@
/// \file main.cpp
#define BOOST_AUTO_TEST_MAIN
-#include <boost/test/auto_unit_test.hpp>
+#include "unit_tests/cygnal_test.hpp"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash/cygnal ACT/Handle.hpp ACT/Makefile.am Asp...,
Eric Hughes <=