Changeset 10775
- Timestamp:
- Nov 8, 2015, 10:40:44 AM (9 years ago)
- Location:
- code/branches/cpp11_v2/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/external/cpptcl/cpptcl.h
r10771 r10775 17 17 #include <map> 18 18 #include <vector> 19 #include < boost/bind.hpp>20 19 #include <memory> 20 #include <functional> 21 21 22 22 namespace Tcl 23 23 { 24 namespace arg = std::placeholders; 24 25 25 26 // exception class used for reporting all Tcl errors -
code/branches/cpp11_v2/src/external/cpptcl/details/methods.h
r5781 r10775 27 27 if (cmem_) 28 28 { 29 dispatch<R>::do_dispatch(interp, boost::bind(cf_, p));30 } 31 else 32 { 33 dispatch<R>::do_dispatch(interp, boost::bind(f_, p));29 dispatch<R>::do_dispatch(interp, std::bind(cf_, p)); 30 } 31 else 32 { 33 dispatch<R>::do_dispatch(interp, std::bind(f_, p)); 34 34 } 35 35 } … … 60 60 { 61 61 dispatch<R>::template do_dispatch<T1>( 62 interp, boost::bind(cf_, p,_1),62 interp, std::bind(cf_, p, arg::_1), 63 63 tcl_cast<T1>::from(interp, objv[2])); 64 64 } … … 66 66 { 67 67 dispatch<R>::template do_dispatch<T1>( 68 interp, boost::bind(f_, p,_1),68 interp, std::bind(f_, p, arg::_1), 69 69 tcl_cast<T1>::from(interp, objv[2])); 70 70 } … … 96 96 { 97 97 dispatch<R>::template do_dispatch<T1, T2>( 98 interp, boost::bind(cf_, p, _1,_2),98 interp, std::bind(cf_, p, arg::_1, arg::_2), 99 99 tcl_cast<T1>::from(interp, objv[2]), 100 100 tcl_cast<T2>::from(interp, objv[3])); … … 103 103 { 104 104 dispatch<R>::template do_dispatch<T1, T2>( 105 interp, boost::bind(f_, p, _1,_2),105 interp, std::bind(f_, p, arg::_1, arg::_2), 106 106 tcl_cast<T1>::from(interp, objv[2]), 107 107 tcl_cast<T2>::from(interp, objv[3])); … … 134 134 { 135 135 dispatch<R>::template do_dispatch<T1, T2, T3>( 136 interp, boost::bind(cf_, p, _1, _2,_3),136 interp, std::bind(cf_, p, arg::_1, arg::_2, arg::_3), 137 137 tcl_cast<T1>::from(interp, objv[2]), 138 138 tcl_cast<T2>::from(interp, objv[3]), … … 142 142 { 143 143 dispatch<R>::template do_dispatch<T1, T2, T3>( 144 interp, boost::bind(f_, p, _1, _2,_3),144 interp, std::bind(f_, p, arg::_1, arg::_2, arg::_3), 145 145 tcl_cast<T1>::from(interp, objv[2]), 146 146 tcl_cast<T2>::from(interp, objv[3]), … … 175 175 { 176 176 dispatch<R>::template do_dispatch<T1, T2, T3, T4>( 177 interp, boost::bind(cf_, p, _1, _2, _3,_4),177 interp, std::bind(cf_, p, arg::_1, arg::_2, arg::_3, arg::_4), 178 178 tcl_cast<T1>::from(interp, objv[2]), 179 179 tcl_cast<T2>::from(interp, objv[3]), … … 184 184 { 185 185 dispatch<R>::template do_dispatch<T1, T2, T3, T4>( 186 interp, boost::bind(f_, p, _1, _2, _3,_4),186 interp, std::bind(f_, p, arg::_1, arg::_2, arg::_3, arg::_4), 187 187 tcl_cast<T1>::from(interp, objv[2]), 188 188 tcl_cast<T2>::from(interp, objv[3]), … … 218 218 { 219 219 dispatch<R>::template do_dispatch<T1, T2, T3, T4, T5>( 220 interp, boost::bind(cf_, p, _1, _2, _3, _4,_5),220 interp, std::bind(cf_, p, arg::_1, arg::_2, arg::_3, arg::_4, arg::_5), 221 221 tcl_cast<T1>::from(interp, objv[2]), 222 222 tcl_cast<T2>::from(interp, objv[3]), … … 228 228 { 229 229 dispatch<R>::template do_dispatch<T1, T2, T3, T4, T5>( 230 interp, boost::bind(f_, p, _1, _2, _3, _4,_5),230 interp, std::bind(f_, p, arg::_1, arg::_2, arg::_3, arg::_4, arg::_5), 231 231 tcl_cast<T1>::from(interp, objv[2]), 232 232 tcl_cast<T2>::from(interp, objv[3]), … … 263 263 { 264 264 dispatch<R>::template do_dispatch<T1, T2, T3, T4, T5, T6>( 265 interp, boost::bind(cf_, p, _1, _2, _3, _4, _5,_6),265 interp, std::bind(cf_, p, arg::_1, arg::_2, arg::_3, arg::_4, arg::_5, arg::_6), 266 266 tcl_cast<T1>::from(interp, objv[2]), 267 267 tcl_cast<T2>::from(interp, objv[3]), … … 274 274 { 275 275 dispatch<R>::template do_dispatch<T1, T2, T3, T4, T5, T6>( 276 interp, boost::bind(f_, p, _1, _2, _3, _4, _5,_6),276 interp, std::bind(f_, p, arg::_1, arg::_2, arg::_3, arg::_4, arg::_5, arg::_6), 277 277 tcl_cast<T1>::from(interp, objv[2]), 278 278 tcl_cast<T2>::from(interp, objv[3]), … … 310 310 { 311 311 dispatch<R>::template do_dispatch<T1, T2, T3, T4, T5, T6, T7>( 312 interp, boost::bind(cf_, p, _1, _2, _3, _4, _5, _6,_7),312 interp, std::bind(cf_, p, arg::_1, arg::_2, arg::_3, arg::_4, arg::_5, arg::_6, arg::_7), 313 313 tcl_cast<T1>::from(interp, objv[2]), 314 314 tcl_cast<T2>::from(interp, objv[3]), … … 322 322 { 323 323 dispatch<R>::template do_dispatch<T1, T2, T3, T4, T5, T6, T7>( 324 interp, boost::bind(f_, p, _1, _2, _3, _4, _5, _6,_7),324 interp, std::bind(f_, p, arg::_1, arg::_2, arg::_3, arg::_4, arg::_5, arg::_6, arg::_7), 325 325 tcl_cast<T1>::from(interp, objv[2]), 326 326 tcl_cast<T2>::from(interp, objv[3]), … … 360 360 dispatch<R>::template do_dispatch< 361 361 T1, T2, T3, T4, T5, T6, T7, T8>( 362 interp, boost::bind(cf_, p,363 _1, _2, _3, _4, _5, _6, _7,_8),362 interp, std::bind(cf_, p, 363 arg::_1, arg::_2, arg::_3, arg::_4, arg::_5, arg::_6, arg::_7, arg::_8), 364 364 tcl_cast<T1>::from(interp, objv[2]), 365 365 tcl_cast<T2>::from(interp, objv[3]), … … 375 375 dispatch<R>::template do_dispatch< 376 376 T1, T2, T3, T4, T5, T6, T7, T8>( 377 interp, boost::bind(f_, p,378 _1, _2, _3, _4, _5, _6, _7,_8),377 interp, std::bind(f_, p, 378 arg::_1, arg::_2, arg::_3, arg::_4, arg::_5, arg::_6, arg::_7, arg::_8), 379 379 tcl_cast<T1>::from(interp, objv[2]), 380 380 tcl_cast<T2>::from(interp, objv[3]), … … 416 416 dispatch<R>::template do_dispatch< 417 417 T1, T2, T3, T4, T5, T6, T7, T8, T9>( 418 interp, boost::bind(cf_, p,419 _1, _2, _3, _4, _5, _6, _7, _8,_9),418 interp, std::bind(cf_, p, 419 arg::_1, arg::_2, arg::_3, arg::_4, arg::_5, arg::_6, arg::_7, arg::_8, arg::_9), 420 420 tcl_cast<T1>::from(interp, objv[2]), 421 421 tcl_cast<T2>::from(interp, objv[3]), … … 432 432 dispatch<R>::template do_dispatch< 433 433 T1, T2, T3, T4, T5, T6, T7, T8, T9>( 434 interp, boost::bind(f_, p,435 _1, _2, _3, _4, _5, _6, _7, _8,_9),434 interp, std::bind(f_, p, 435 arg::_1, arg::_2, arg::_3, arg::_4, arg::_5, arg::_6, arg::_7, arg::_8, arg::_9), 436 436 tcl_cast<T1>::from(interp, objv[2]), 437 437 tcl_cast<T2>::from(interp, objv[3]), -
code/branches/cpp11_v2/src/external/cpptcl/details/methods_v.h
r5781 r10775 33 33 { 34 34 dispatch<R>::template do_dispatch<T1>( 35 interp, boost::bind(cf_, p,_1),35 interp, std::bind(cf_, p, arg::_1), 36 36 t1); 37 37 } … … 39 39 { 40 40 dispatch<R>::template do_dispatch<T1>( 41 interp, boost::bind(f_, p,_1),41 interp, std::bind(f_, p, arg::_1), 42 42 t1); 43 43 } … … 72 72 { 73 73 dispatch<R>::template do_dispatch<T1, T2>( 74 interp, boost::bind(cf_, p, _1,_2),74 interp, std::bind(cf_, p, arg::_1, arg::_2), 75 75 tcl_cast<T1>::from(interp, objv[2]), 76 76 t2); … … 79 79 { 80 80 dispatch<R>::template do_dispatch<T1, T2>( 81 interp, boost::bind(f_, p, _1,_2),81 interp, std::bind(f_, p, arg::_1, arg::_2), 82 82 tcl_cast<T1>::from(interp, objv[2]), 83 83 t2); … … 113 113 { 114 114 dispatch<R>::template do_dispatch<T1, T2, T3>( 115 interp, boost::bind(cf_, p, _1, _2,_3),115 interp, std::bind(cf_, p, arg::_1, arg::_2, arg::_3), 116 116 tcl_cast<T1>::from(interp, objv[2]), 117 117 tcl_cast<T2>::from(interp, objv[3]), … … 121 121 { 122 122 dispatch<R>::template do_dispatch<T1, T2, T3>( 123 interp, boost::bind(f_, p, _1, _2,_3),123 interp, std::bind(f_, p, arg::_1, arg::_2, arg::_3), 124 124 tcl_cast<T1>::from(interp, objv[2]), 125 125 tcl_cast<T2>::from(interp, objv[3]), … … 156 156 { 157 157 dispatch<R>::template do_dispatch<T1, T2, T3, T4>( 158 interp, boost::bind(cf_, p, _1, _2, _3,_4),158 interp, std::bind(cf_, p, arg::_1, arg::_2, arg::_3, arg::_4), 159 159 tcl_cast<T1>::from(interp, objv[2]), 160 160 tcl_cast<T2>::from(interp, objv[3]), … … 165 165 { 166 166 dispatch<R>::template do_dispatch<T1, T2, T3, T4>( 167 interp, boost::bind(f_, p, _1, _2, _3,_4),167 interp, std::bind(f_, p, arg::_1, arg::_2, arg::_3, arg::_4), 168 168 tcl_cast<T1>::from(interp, objv[2]), 169 169 tcl_cast<T2>::from(interp, objv[3]), … … 202 202 { 203 203 dispatch<R>::template do_dispatch<T1, T2, T3, T4, T5>( 204 interp, boost::bind(cf_, p, _1, _2, _3, _4,_5),204 interp, std::bind(cf_, p, arg::_1, arg::_2, arg::_3, arg::_4, arg::_5), 205 205 tcl_cast<T1>::from(interp, objv[2]), 206 206 tcl_cast<T2>::from(interp, objv[3]), … … 212 212 { 213 213 dispatch<R>::template do_dispatch<T1, T2, T3, T4, T5>( 214 interp, boost::bind(f_, p, _1, _2, _3, _4,_5),214 interp, std::bind(f_, p, arg::_1, arg::_2, arg::_3, arg::_4, arg::_5), 215 215 tcl_cast<T1>::from(interp, objv[2]), 216 216 tcl_cast<T2>::from(interp, objv[3]), … … 251 251 { 252 252 dispatch<R>::template do_dispatch<T1, T2, T3, T4, T5, T6>( 253 interp, boost::bind(cf_, p, _1, _2, _3, _4, _5,_6),253 interp, std::bind(cf_, p, arg::_1, arg::_2, arg::_3, arg::_4, arg::_5, arg::_6), 254 254 tcl_cast<T1>::from(interp, objv[2]), 255 255 tcl_cast<T2>::from(interp, objv[3]), … … 262 262 { 263 263 dispatch<R>::template do_dispatch<T1, T2, T3, T4, T5, T6>( 264 interp, boost::bind(f_, p, _1, _2, _3, _4, _5,_6),264 interp, std::bind(f_, p, arg::_1, arg::_2, arg::_3, arg::_4, arg::_5, arg::_6), 265 265 tcl_cast<T1>::from(interp, objv[2]), 266 266 tcl_cast<T2>::from(interp, objv[3]), … … 302 302 { 303 303 dispatch<R>::template do_dispatch<T1, T2, T3, T4, T5, T6, T7>( 304 interp, boost::bind(cf_, p, _1, _2, _3, _4, _5, _6,_7),304 interp, std::bind(cf_, p, arg::_1, arg::_2, arg::_3, arg::_4, arg::_5, arg::_6, arg::_7), 305 305 tcl_cast<T1>::from(interp, objv[2]), 306 306 tcl_cast<T2>::from(interp, objv[3]), … … 314 314 { 315 315 dispatch<R>::template do_dispatch<T1, T2, T3, T4, T5, T6, T7>( 316 interp, boost::bind(f_, p, _1, _2, _3, _4, _5, _6,_7),316 interp, std::bind(f_, p, arg::_1, arg::_2, arg::_3, arg::_4, arg::_5, arg::_6, arg::_7), 317 317 tcl_cast<T1>::from(interp, objv[2]), 318 318 tcl_cast<T2>::from(interp, objv[3]), … … 356 356 dispatch<R>::template do_dispatch< 357 357 T1, T2, T3, T4, T5, T6, T7, T8>( 358 interp, boost::bind(cf_, p,359 _1, _2, _3, _4, _5, _6, _7,_8),358 interp, std::bind(cf_, p, 359 arg::_1, arg::_2, arg::_3, arg::_4, arg::_5, arg::_6, arg::_7, arg::_8), 360 360 tcl_cast<T1>::from(interp, objv[2]), 361 361 tcl_cast<T2>::from(interp, objv[3]), … … 371 371 dispatch<R>::template do_dispatch< 372 372 T1, T2, T3, T4, T5, T6, T7, T8>( 373 interp, boost::bind(f_, p,374 _1, _2, _3, _4, _5, _6, _7,_8),373 interp, std::bind(f_, p, 374 arg::_1, arg::_2, arg::_3, arg::_4, arg::_5, arg::_6, arg::_7, arg::_8), 375 375 tcl_cast<T1>::from(interp, objv[2]), 376 376 tcl_cast<T2>::from(interp, objv[3]), … … 415 415 dispatch<R>::template do_dispatch< 416 416 T1, T2, T3, T4, T5, T6, T7, T8, T9>( 417 interp, boost::bind(cf_, p,418 _1, _2, _3, _4, _5, _6, _7, _8,_9),417 interp, std::bind(cf_, p, 418 arg::_1, arg::_2, arg::_3, arg::_4, arg::_5, arg::_6, arg::_7, arg::_8, arg::_9), 419 419 tcl_cast<T1>::from(interp, objv[2]), 420 420 tcl_cast<T2>::from(interp, objv[3]), … … 431 431 dispatch<R>::template do_dispatch< 432 432 T1, T2, T3, T4, T5, T6, T7, T8, T9>( 433 interp, boost::bind(f_, p,434 _1, _2, _3, _4, _5, _6, _7, _8,_9),433 interp, std::bind(f_, p, 434 arg::_1, arg::_2, arg::_3, arg::_4, arg::_5, arg::_6, arg::_7, arg::_8, arg::_9), 435 435 tcl_cast<T1>::from(interp, objv[2]), 436 436 tcl_cast<T2>::from(interp, objv[3]), -
code/branches/cpp11_v2/src/libraries/core/GUIManager.cc
r10773 r10775 32 32 #include <fstream> 33 33 #include <memory> 34 #include < boost/bind.hpp>34 #include <functional> 35 35 #include <OgreRenderQueue.h> 36 36 #include <OgreRenderWindow.h> … … 115 115 namespace orxonox 116 116 { 117 namespace arg = std::placeholders; 118 117 119 static void key_esc() 118 120 { GUIManager::getInstance().keyESC(); } … … 451 453 { 452 454 assert(guiSystem_); 453 this->protectedCeguiSystemCall( boost::bind(&CEGUI::System::injectTimePulse,_1, time.getDeltaTime()));455 this->protectedCeguiSystemCall(std::bind(&CEGUI::System::injectTimePulse, arg::_1, time.getDeltaTime())); 454 456 } 455 457 … … 627 629 { 628 630 #if CEGUI_VERSION >= 0x000800 629 this->protectedCeguiContextCall( boost::bind(&CEGUI::GUIContext::injectKeyDown,_1, (CEGUI::Key::Scan) evt.getKeyCode())); // TODO: will this cast always work?630 this->protectedCeguiContextCall( boost::bind(&CEGUI::GUIContext::injectChar,_1, evt.getText()));631 #else 632 this->protectedCeguiSystemCall( boost::bind(&CEGUI::System::injectKeyDown,_1, evt.getKeyCode()));633 this->protectedCeguiSystemCall( boost::bind(&CEGUI::System::injectChar,_1, evt.getText()));631 this->protectedCeguiContextCall(std::bind(&CEGUI::GUIContext::injectKeyDown, arg::_1, (CEGUI::Key::Scan) evt.getKeyCode())); // TODO: will this cast always work? 632 this->protectedCeguiContextCall(std::bind(&CEGUI::GUIContext::injectChar, arg::_1, evt.getText())); 633 #else 634 this->protectedCeguiSystemCall(std::bind(&CEGUI::System::injectKeyDown, arg::_1, evt.getKeyCode())); 635 this->protectedCeguiSystemCall(std::bind(&CEGUI::System::injectChar, arg::_1, evt.getText())); 634 636 #endif 635 637 } … … 638 640 { 639 641 #if CEGUI_VERSION >= 0x000800 640 this->protectedCeguiContextCall( boost::bind(&CEGUI::GUIContext::injectKeyUp,_1, (CEGUI::Key::Scan) evt.getKeyCode())); // TODO: will this cast always work?641 #else 642 this->protectedCeguiSystemCall( boost::bind(&CEGUI::System::injectKeyUp,_1, evt.getKeyCode()));642 this->protectedCeguiContextCall(std::bind(&CEGUI::GUIContext::injectKeyUp, arg::_1, (CEGUI::Key::Scan) evt.getKeyCode())); // TODO: will this cast always work? 643 #else 644 this->protectedCeguiSystemCall(std::bind(&CEGUI::System::injectKeyUp, arg::_1, evt.getKeyCode())); 643 645 #endif 644 646 } … … 656 658 { 657 659 #if CEGUI_VERSION >= 0x000800 658 this->protectedCeguiContextCall( boost::bind(&CEGUI::GUIContext::injectMouseButtonDown,_1, convertButton(id)));659 #else 660 this->protectedCeguiSystemCall( boost::bind(&CEGUI::System::injectMouseButtonDown,_1, convertButton(id)));660 this->protectedCeguiContextCall(std::bind(&CEGUI::GUIContext::injectMouseButtonDown, arg::_1, convertButton(id))); 661 #else 662 this->protectedCeguiSystemCall(std::bind(&CEGUI::System::injectMouseButtonDown, arg::_1, convertButton(id))); 661 663 #endif 662 664 } … … 674 676 { 675 677 #if CEGUI_VERSION >= 0x000800 676 this->protectedCeguiContextCall( boost::bind(&CEGUI::GUIContext::injectMouseButtonUp,_1, convertButton(id)));677 #else 678 this->protectedCeguiSystemCall( boost::bind(&CEGUI::System::injectMouseButtonUp,_1, convertButton(id)));678 this->protectedCeguiContextCall(std::bind(&CEGUI::GUIContext::injectMouseButtonUp, arg::_1, convertButton(id))); 679 #else 680 this->protectedCeguiSystemCall(std::bind(&CEGUI::System::injectMouseButtonUp, arg::_1, convertButton(id))); 679 681 #endif 680 682 } … … 683 685 { 684 686 #if CEGUI_VERSION >= 0x000800 685 this->protectedCeguiContextCall( boost::bind(&CEGUI::GUIContext::injectMousePosition,_1, (float)abs.x, (float)abs.y));686 #else 687 this->protectedCeguiSystemCall( boost::bind(&CEGUI::System::injectMousePosition,_1, (float)abs.x, (float)abs.y));687 this->protectedCeguiContextCall(std::bind(&CEGUI::GUIContext::injectMousePosition, arg::_1, (float)abs.x, (float)abs.y)); 688 #else 689 this->protectedCeguiSystemCall(std::bind(&CEGUI::System::injectMousePosition, arg::_1, (float)abs.x, (float)abs.y)); 688 690 #endif 689 691 } … … 692 694 { 693 695 #if CEGUI_VERSION >= 0x000800 694 this->protectedCeguiContextCall( boost::bind(&CEGUI::GUIContext::injectMouseWheelChange,_1, (float)sgn(rel) * this->numScrollLines_));695 #else 696 this->protectedCeguiSystemCall( boost::bind(&CEGUI::System::injectMouseWheelChange,_1, (float)sgn(rel) * this->numScrollLines_));696 this->protectedCeguiContextCall(std::bind(&CEGUI::GUIContext::injectMouseWheelChange, arg::_1, (float)sgn(rel) * this->numScrollLines_)); 697 #else 698 this->protectedCeguiSystemCall(std::bind(&CEGUI::System::injectMouseWheelChange, arg::_1, (float)sgn(rel) * this->numScrollLines_)); 697 699 #endif 698 700 } … … 704 706 { 705 707 #if CEGUI_VERSION >= 0x000800 706 this->protectedCeguiContextCall( boost::bind(&CEGUI::GUIContext::injectMouseLeaves,_1));707 #else 708 this->protectedCeguiSystemCall( boost::bind(&CEGUI::System::injectMouseLeaves,_1));708 this->protectedCeguiContextCall(std::bind(&CEGUI::GUIContext::injectMouseLeaves, arg::_1)); 709 #else 710 this->protectedCeguiSystemCall(std::bind(&CEGUI::System::injectMouseLeaves, arg::_1)); 709 711 #endif 710 712 } … … 753 755 terminate the whole program... 754 756 @note 755 Your life gets easier if you use boost::bind to create the object/function.757 Your life gets easier if you use std::bind to create the object/function. 756 758 @param function 757 759 Any callable object/function that takes this->guiSystem_ as its only parameter. -
code/branches/cpp11_v2/src/libraries/core/Thread.cc
r10768 r10775 34 34 35 35 #include <cassert> 36 #include <functional> 36 37 #include <boost/thread/thread.hpp> 37 #include <boost/bind.hpp>38 38 #include <boost/thread/mutex.hpp> 39 39 #include <boost/thread/thread_time.hpp> … … 55 55 this->isWorkingMutex_ = new boost::mutex; 56 56 this->stopThreadMutex_ = new boost::mutex; 57 this->workerThread_ = new boost::thread( boost::bind(&Thread::threadLoop, this) );57 this->workerThread_ = new boost::thread( std::bind(&Thread::threadLoop, this) ); 58 58 } 59 59 -
code/branches/cpp11_v2/src/libraries/core/ThreadWin.cc
r10768 r10775 31 31 32 32 #include <cassert> 33 // #include <functional> 33 34 // #include <boost/thread/thread.hpp> 34 // #include <boost/bind.hpp>35 35 // #include <boost/thread/mutex.hpp> 36 36 // #include <boost/thread/thread_time.hpp> … … 52 52 // this->isWorkingMutex_ = new boost::mutex; 53 53 // this->stopThreadMutex_ = new boost::mutex; 54 // this->workerThread_ = new boost::thread( boost::bind(&Thread::threadLoop, this) );54 // this->workerThread_ = new boost::thread( std::bind(&Thread::threadLoop, this) ); 55 55 } 56 56 -
code/branches/cpp11_v2/src/libraries/core/command/TclThreadManager.cc
r10768 r10775 34 34 #include "TclThreadManager.h" 35 35 36 #include < boost/bind.hpp>36 #include <functional> 37 37 #include <boost/thread/thread.hpp> 38 38 #include <boost/thread/locks.hpp> … … 163 163 { 164 164 // Start a thread to execute the command 165 boost::thread( boost::bind(&tclThread, bundle, command));165 boost::thread(std::bind(&tclThread, bundle, command)); 166 166 } 167 167 else … … 488 488 void TclThreadManager::source(const std::string& file) 489 489 { 490 boost::thread( boost::bind(&sourceThread, file));490 boost::thread(std::bind(&sourceThread, file)); 491 491 } 492 492 -
code/branches/cpp11_v2/src/libraries/core/input/InputManager.h
r10769 r10775 35 35 #include <string> 36 36 #include <vector> 37 #include < boost/function.hpp>37 #include <functional> 38 38 39 39 #include "util/Singleton.h" … … 186 186 // Function call caching 187 187 //------------------------------- 188 void pushCall(const boost::function<void ()>& function)188 void pushCall(const std::function<void ()>& function) 189 189 { this->callBuffer_.push_back(function); } 190 190 … … 225 225 std::vector<InputState*> activeStatesTicked_; //!< Like activeStates_, but only contains the ones that currently receive events 226 226 227 std::vector< boost::function<void ()>> callBuffer_; //!< Caches all calls from InputStates to be executed afterwards (see preUpdate)227 std::vector<std::function<void ()>> callBuffer_; //!< Caches all calls from InputStates to be executed afterwards (see preUpdate) 228 228 229 229 static InputManager* singletonPtr_s; //!< Pointer reference to the singleton -
code/branches/cpp11_v2/src/libraries/core/input/InputState.h
r10765 r10775 35 35 #include <string> 36 36 #include <vector> 37 #include <boost/function.hpp> 38 #include <boost/bind.hpp> 37 #include <functional> 39 38 40 39 #include "util/tribool.h" … … 44 43 45 44 #define INPUT_STATE_PUSH_CALL(deviceIndex, functionName, ...) \ 46 InputManager::getInstance().pushCall( boost::function<void ()>(boost::bind(&InputHandler::functionName, handlers_[deviceIndex], __VA_ARGS__)))45 InputManager::getInstance().pushCall(std::function<void ()>(std::bind(&InputHandler::functionName, handlers_[deviceIndex], __VA_ARGS__))) 47 46 48 47 namespace orxonox … … 212 211 // We have to store the function pointer to tell the compiler about its actual type because of overloading 213 212 void (InputHandler::*function)(unsigned int, ButtonTypeParam, EventType) = &InputHandler::buttonEvent<ButtonTypeParam>; 214 InputManager::getInstance().pushCall( boost::function<void ()>(boost::bind(function, handlers_[device], device, button, EventType())));213 InputManager::getInstance().pushCall(std::function<void ()>(std::bind(function, handlers_[device], device, button, EventType()))); 215 214 } 216 215 } -
code/branches/cpp11_v2/src/libraries/network/TrafficControl.cc
r10769 r10775 30 30 31 31 #include <cassert> 32 #include < boost/bind.hpp>32 #include <functional> 33 33 34 34 #include "core/CoreIncludes.h" … … 39 39 40 40 static const unsigned int SCHED_PRIORITY_OFFSET = static_cast<unsigned int>(-1); 41 namespace arg = std::placeholders; 41 42 42 43 objInfo::objInfo(uint32_t ID, uint32_t creatorID, int32_t curGsID, int32_t diffGsID, uint32_t size, unsigned int prioperm, unsigned int priosched) … … 258 259 259 260 //sort copied list according to priorities 260 // use boostbind here because we need to pass a memberfunction to stl sort261 // sort( list.begin(), list.end(), boost::bind(&TrafficControl::prioritySort, this, clientID, _1,_2) );262 list.sort( boost::bind(&TrafficControl::prioritySort, this, clientID, _1,_2) );263 264 // list.sort( boost::bind(&TrafficControl::prioritySort, this, clientID, _1,_2) );261 // use std::bind here because we need to pass a memberfunction to stl sort 262 // sort( list.begin(), list.end(), std::bind(&TrafficControl::prioritySort, this, clientID, arg::_1, arg::_2) ); 263 list.sort( std::bind(&TrafficControl::prioritySort, this, clientID, arg::_1, arg::_2) ); 264 265 // list.sort(std::bind(&TrafficControl::prioritySort, this, clientID, arg::_1, arg::_2) ); 265 266 266 267 //now we check, that the creator of an object always exists on a client … … 275 276 cut(list, targetSize); 276 277 //now sort again after objDataOffset 277 // sort(list.begin(), list.end(), boost::bind(&TrafficControl::dataSort, this, _1,_2) );278 list.sort( boost::bind(&TrafficControl::dataSort, this, _1,_2) );278 // sort(list.begin(), list.end(), std::bind(&TrafficControl::dataSort, this, arg::_1, arg::_2) ); 279 list.sort( std::bind(&TrafficControl::dataSort, this, arg::_1, arg::_2) ); 279 280 280 281 //diese Funktion updateClientList muss noch gemacht werden
Note: See TracChangeset
for help on using the changeset viewer.