|
From: <arn...@us...> - 2008-03-26 13:39:44
|
Revision: 1055
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1055&view=rev
Author: arnetheduck
Date: 2008-03-26 06:39:40 -0700 (Wed, 26 Mar 2008)
Log Message:
-----------
Remove some boost stuff that's no longer needed
Modified Paths:
--------------
dcplusplus/trunk/.bzrignore
dcplusplus/trunk/SConstruct
dcplusplus/trunk/smartwin/SmartUtil/DateTime.cpp
dcplusplus/trunk/smartwin/SmartUtil/DateTime.h
dcplusplus/trunk/smartwin/include/smartwin/Application.h
dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetMenu.h
dcplusplus/trunk/smartwin/source/Application.cpp
dcplusplus/trunk/win32/AspectUserCommand.h
dcplusplus/trunk/win32/SConscript
Removed Paths:
-------------
dcplusplus/trunk/boost/SConscript
dcplusplus/trunk/boost/boost/graph/
dcplusplus/trunk/boost/boost/mpl/
dcplusplus/trunk/boost/boost/numeric/
dcplusplus/trunk/boost/boost/preprocessor/
dcplusplus/trunk/boost/boost/spirit/
dcplusplus/trunk/boost/boost/test/
dcplusplus/trunk/boost/boost/xpressive/
dcplusplus/trunk/boost/libs/
Property Changed:
----------------
dcplusplus/trunk/
Property changes on: dcplusplus/trunk
___________________________________________________________________
Name: bzr:revision-info
- timestamp: 2008-03-23 23:12:49.148000002 +0100
committer: zouzou123gen
properties:
branch-nick: bzr
+ timestamp: 2008-03-24 15:06:23.664999962 +0100
committer: Jacek Sieka <arn...@gm...>
properties:
branch-nick: dcplusplus
Name: bzr:revision-id:v3-trunk1
- 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn
1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn
1029 zouzou123gen-20080323221249-0su72zaj13e706mk
+ 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn
1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn
1029 zouzou123gen-20080323221249-0su72zaj13e706mk
1030 arn...@gm...-20080324140623-muba1dl46m000o8c
Modified: dcplusplus/trunk/.bzrignore
===================================================================
--- dcplusplus/trunk/.bzrignore 2008-03-26 13:25:32 UTC (rev 1054)
+++ dcplusplus/trunk/.bzrignore 2008-03-26 13:39:40 UTC (rev 1055)
@@ -9,3 +9,4 @@
./htmlhelp/lib/htmlhelp.lib
natupnp.h
./help/changelog.html
+./.pydevproject
Modified: dcplusplus/trunk/SConstruct
===================================================================
--- dcplusplus/trunk/SConstruct 2008-03-26 13:25:32 UTC (rev 1054)
+++ dcplusplus/trunk/SConstruct 2008-03-26 13:39:40 UTC (rev 1055)
@@ -169,7 +169,6 @@
dev.zlib = dev.build('zlib/')
dev.bzip2 = dev.build('bzip2/')
dev.intl = dev.build('intl/')
-dev.boost = dev.build('boost/')
dev.client = dev.build('dcpp/')
dev.smartwin = dev.build('smartwin/')
dev.win32 = dev.build('win32/')
Deleted: dcplusplus/trunk/boost/SConscript
===================================================================
--- dcplusplus/trunk/boost/SConscript 2008-03-26 13:25:32 UTC (rev 1054)
+++ dcplusplus/trunk/boost/SConscript 2008-03-26 13:39:40 UTC (rev 1055)
@@ -1,8 +0,0 @@
-# vim: set filetype=py
-
-Import('dev source_path')
-
-ret = dev.build('libs/signals/src/')
-
-Return('ret')
-
Modified: dcplusplus/trunk/smartwin/SmartUtil/DateTime.cpp
===================================================================
--- dcplusplus/trunk/smartwin/SmartUtil/DateTime.cpp 2008-03-26 13:25:32 UTC (rev 1054)
+++ dcplusplus/trunk/smartwin/SmartUtil/DateTime.cpp 2008-03-26 13:39:40 UTC (rev 1055)
@@ -28,7 +28,6 @@
*/
#include "UtilSystemHeaders.h"
#include "DateTime.h"
-#include <boost/lexical_cast.hpp>
namespace SmartUtil
{
@@ -48,49 +47,6 @@
: itsSysTime( sysTime )
{}
-DateTime::DateTime( const tstring & date, const tstring & format )
-{
- itsSysTime.wYear = 1601;
- itsSysTime.wMonth = 1;
- itsSysTime.wDayOfWeek = 0;
- itsSysTime.wDay = 1;
- itsSysTime.wHour = 0;
- itsSysTime.wMinute = 0;
- itsSysTime.wSecond = 0;
- itsSysTime.wMilliseconds = 0;
-
- size_t yearsStart = format.find( _T( "yyyy" ) );
- size_t monthsStart = format.find( _T( "MM" ) );
- size_t daysStart = format.find( _T( "dd" ) );
- size_t hoursStart = format.find( _T( "HH" ) );
- size_t minutesStart = format.find( _T( "mm" ) );
- size_t secondsStart = format.find( _T( "ss" ) );
- if ( yearsStart != tstring::npos )
- {
- itsSysTime.wYear = boost::lexical_cast< WORD >( date.substr( yearsStart, 4 ) );
- }
- if ( monthsStart != tstring::npos )
- {
- itsSysTime.wMonth = boost::lexical_cast< WORD >( date.substr( monthsStart, 2 ) );
- }
- if ( daysStart != tstring::npos )
- {
- itsSysTime.wDay = boost::lexical_cast< WORD >( date.substr( daysStart, 2 ) );
- }
- if ( hoursStart != tstring::npos )
- {
- itsSysTime.wHour = boost::lexical_cast< WORD >( date.substr( hoursStart, 2 ) );
- }
- if ( minutesStart != tstring::npos )
- {
- itsSysTime.wMinute = boost::lexical_cast< WORD >( date.substr( minutesStart, 2 ) );
- }
- if ( secondsStart != tstring::npos )
- {
- itsSysTime.wSecond = boost::lexical_cast< WORD >( date.substr( secondsStart, 2 ) );
- }
-}
-
DateTime::DateTime( unsigned year, unsigned month, unsigned day, unsigned hour, unsigned minute, unsigned seconds, unsigned milliseconds )
{
itsSysTime.wDayOfWeek = 0;
Modified: dcplusplus/trunk/smartwin/SmartUtil/DateTime.h
===================================================================
--- dcplusplus/trunk/smartwin/SmartUtil/DateTime.h 2008-03-26 13:25:32 UTC (rev 1054)
+++ dcplusplus/trunk/smartwin/SmartUtil/DateTime.h 2008-03-26 13:39:40 UTC (rev 1055)
@@ -59,11 +59,6 @@
/// Construct a new DateTime from the given SYSTEMTIME
explicit DateTime( const SYSTEMTIME & sysTime );
- /// Construct a DateTime object from the given "date" which is being expected to be in the given "format"
- /** format could be e.g. "yyyy.MM.dd" while date could be e.g. "2006.11.29"
- */
- DateTime( const tstring & date, const tstring & format );
-
/// Constructs a date according to the values given
DateTime( unsigned year, unsigned month, unsigned day, unsigned hour = 0, unsigned minute = 0, unsigned seconds = 0, unsigned milliseconds = 0 );
Modified: dcplusplus/trunk/smartwin/include/smartwin/Application.h
===================================================================
--- dcplusplus/trunk/smartwin/include/smartwin/Application.h 2008-03-26 13:25:32 UTC (rev 1054)
+++ dcplusplus/trunk/smartwin/include/smartwin/Application.h 2008-03-26 13:39:40 UTC (rev 1055)
@@ -34,10 +34,9 @@
#include "ApplicationPlatform.h"
#include "xCeption.h"
#include <vector>
-#include <memory>
-#include <boost/noncopyable.hpp>
-#include <boost/signal.hpp>
+#include <list>
#include <map>
+#include <boost/noncopyable.hpp>
#include "Message.h"
#ifdef _MSC_VER
@@ -172,9 +171,8 @@
*/
bool isAppAlreadyRunning();
- /// Since boost::signal is noncopyable we use smart pointers of signals
- typedef std::tr1::shared_ptr < boost::signal < void () > > SignalPtr;
-
+ typedef std::tr1::function<void()> Callback;
+
/// Adds a waitable event HANDLE and the according signal
/** You can feed in here HANDLEs of thread handles, console inputs, mutexes,
* processes, semaphores etc. (see Win32-API on MsgWaitForMultipleObjects) you
@@ -183,7 +181,7 @@
* Windows signals the HANDLE. (Since boost::signal is noncopyable we actually
* need here a smart pointer to the signal.)
*/
- bool addWaitEvent( HANDLE hEvent, SignalPtr );
+ bool addWaitEvent( HANDLE hEvent, const Callback& );
/// Removes the waitable event HANDLE and the according signal
/** Remove the event HANDLE in case we are not longer interested in being
@@ -211,7 +209,7 @@
std::vector< HANDLE > itsVHEvents;
// The according signals we must raise, go in this vector.
- std::vector< SignalPtr > itsVSignals;
+ std::vector< Callback > itsVSignals;
FilterList filters;
Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetMenu.h
===================================================================
--- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetMenu.h 2008-03-26 13:25:32 UTC (rev 1054)
+++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetMenu.h 2008-03-26 13:39:40 UTC (rev 1055)
@@ -125,7 +125,7 @@
* WidgetWindow. <br>
* Note for Desktop version only! <br>
*/
-class WidgetMenu : public boost::enable_shared_from_this< WidgetMenu >, boost::noncopyable
+class WidgetMenu : public boost::noncopyable
{
// friends
friend class WidgetCreator< WidgetMenu >;
Modified: dcplusplus/trunk/smartwin/source/Application.cpp
===================================================================
--- dcplusplus/trunk/smartwin/source/Application.cpp 2008-03-26 13:25:32 UTC (rev 1054)
+++ dcplusplus/trunk/smartwin/source/Application.cpp 2008-03-26 13:39:40 UTC (rev 1055)
@@ -32,8 +32,6 @@
#include "../include/smartwin/aspects/AspectMouse.h"
#include "../include/smartwin/aspects/AspectSizable.h"
-#include <boost/lexical_cast.hpp>
-
using namespace SmartWin;
// link to Common Controls to relieve user of explicitly doing so
@@ -195,7 +193,7 @@
}
}
-bool Application::addWaitEvent( HANDLE hWaitEvent, Application::SignalPtr pSignal )
+bool Application::addWaitEvent( HANDLE hWaitEvent, const Application::Callback& pSignal )
{
// in case the maximum number of objects is already achieved return false
if ( itsVHEvents.size() >= MAXIMUM_WAIT_OBJECTS - 1 )
@@ -213,7 +211,7 @@
{
if ( hWaitEvent != INVALID_HANDLE_VALUE )
{
- std::vector< Application::SignalPtr >::iterator pSig;
+ std::vector< Callback >::iterator pSig;
std::vector< HANDLE >::iterator pH;
for ( pSig = itsVSignals.begin(), pH = itsVHEvents.begin();
pSig != itsVSignals.end(); pSig++, pH++ )
@@ -314,7 +312,7 @@
{
// the wait event was signalled by Windows
// signal its handlers
- ( * itsVSignals[dwWaitResult - WAIT_OBJECT_0] )();
+ itsVSignals[dwWaitResult - WAIT_OBJECT_0]();
}
else if ( dwWaitResult == WAIT_OBJECT_0 + itsVHEvents.size() )
{
@@ -345,12 +343,7 @@
}
else if ( dwWaitResult < WAIT_ABANDONED_0 + itsVHEvents.size() )
{
- SmartUtil::tstring strX =
- _T( "Application::run : Encountered an abandoned wait mutex object (index " );
- strX += boost::lexical_cast< SmartUtil::tstring >( dwWaitResult - WAIT_ABANDONED_0 );
- strX += _T( " )." );
-
- throw xCeption( strX );
+ throw xCeption( _T( "Application::run : Encountered an abandoned wait mutex object ") );
}
else if ( dwWaitResult != WAIT_TIMEOUT )
{
Modified: dcplusplus/trunk/win32/AspectUserCommand.h
===================================================================
--- dcplusplus/trunk/win32/AspectUserCommand.h 2008-03-26 13:25:32 UTC (rev 1054)
+++ dcplusplus/trunk/win32/AspectUserCommand.h 2008-03-26 13:39:40 UTC (rev 1055)
@@ -59,7 +59,7 @@
StringTokenizer<tstring> t(Text::toT(uc->getName()), _T('\\'));
for(TStringIter i = t.getTokens().begin(); i != t.getTokens().end(); ++i) {
if(i+1 == t.getTokens().end()) {
- cur->appendItem(IDC_USER_COMMAND + n, *i, std::tr1::bind(&T::runUserCommand, static_cast<T*>(this), boost::cref(*uc)));
+ cur->appendItem(IDC_USER_COMMAND + n, *i, std::tr1::bind(&T::runUserCommand, static_cast<T*>(this), std::tr1::cref(*uc)));
} else {
bool found = false;
// Let's see if we find an existing item...
Modified: dcplusplus/trunk/win32/SConscript
===================================================================
--- dcplusplus/trunk/win32/SConscript 2008-03-26 13:25:32 UTC (rev 1054)
+++ dcplusplus/trunk/win32/SConscript 2008-03-26 13:39:40 UTC (rev 1055)
@@ -17,5 +17,5 @@
headers=dev.get_sources(source_path, "*.h")
dev.i18n(source_path, env, [sources,headers], 'dcpp-win32')
-ret = env.Program(target, [sources, res, dev.client, dev.zlib, dev.bzip2, dev.smartwin, dev.boost, dev.intl])
+ret = env.Program(target, [sources, res, dev.client, dev.zlib, dev.bzip2, dev.smartwin, dev.intl])
Return('ret')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|