source:
code/branches/kicklib2/src/external/cpptcl/changes_orxonox.diff
@
8740
Last change on this file since 8740 was 8298, checked in by rgrieder, 14 years ago | |
---|---|
|
|
File size: 2.8 KB |
-
cpptcl.cc
16 16 using namespace Tcl; 17 17 using namespace Tcl::details; 18 18 using namespace std; 19 using namespace boost; 19 // boost::shared_ptr conflicts with the new std::shared_ptr 20 //using namespace boost; 20 21 21 22 22 23 result::result(Tcl_Interp *interp) : interp_(interp) {} … … 166 167 { 167 168 168 169 // map of polymorphic callbacks 169 typedef map<string, shared_ptr<callback_base> > callback_interp_map;170 typedef map<string, boost::shared_ptr<callback_base> > callback_interp_map; 170 171 typedef map<Tcl_Interp *, callback_interp_map> callback_map; 171 172 172 173 callback_map callbacks; … … 179 180 policies_map call_policies; 180 181 181 182 // map of object handlers 182 typedef map<string, shared_ptr<class_handler_base> > class_interp_map;183 typedef map<string, boost::shared_ptr<class_handler_base> > class_interp_map; 183 184 typedef map<Tcl_Interp *, class_interp_map> class_handlers_map; 184 185 185 186 class_handlers_map class_handlers; … … 320 321 321 322 post_process_policies(interp, pol, objv, false); 322 323 } 323 catch ( exception const &e)324 catch (std::exception const &e) 324 325 { 325 326 Tcl_SetResult(interp, const_cast<char*>(e.what()), TCL_VOLATILE); 326 327 return TCL_ERROR; … … 363 364 364 365 post_process_policies(interp, pol, objv, true); 365 366 } 366 catch ( exception const &e)367 catch (std::exception const &e) 367 368 { 368 369 Tcl_SetResult(interp, const_cast<char*>(e.what()), TCL_VOLATILE); 369 370 return TCL_ERROR; … … 430 431 Tcl_GetString(Tcl_GetObjResult(interp)), 431 432 object_handler, static_cast<ClientData>(chb), 0); 432 433 } 433 catch ( exception const &e)434 catch (std::exception const &e) 434 435 { 435 436 Tcl_SetResult(interp, const_cast<char*>(e.what()), TCL_VOLATILE); 436 437 return TCL_ERROR; … … 490 491 } 491 492 492 493 void class_handler_base::register_method(string const &name, 493 shared_ptr<object_cmd_base> ocb, policies const &p)494 boost::shared_ptr<object_cmd_base> ocb, policies const &p) 494 495 { 495 496 methods_[name] = ocb; 496 497 policies_[name] = p; … … 989 990 } 990 991 991 992 void interpreter::add_function(string const &name, 992 shared_ptr<callback_base> cb, policies const &p)993 boost::shared_ptr<callback_base> cb, policies const &p) 993 994 { 994 995 Tcl_CreateObjCommand(interp_, name.c_str(), 995 996 callback_handler, 0, 0); … … 999 1000 } 1000 1001 1001 1002 void interpreter::add_class(string const &name, 1002 shared_ptr<class_handler_base> chb)1003 boost::shared_ptr<class_handler_base> chb) 1003 1004 { 1004 1005 class_handlers[interp_][name] = chb; 1005 1006 } 1006 1007 1007 1008 void interpreter::add_constructor(string const &name, 1008 shared_ptr<class_handler_base> chb,shared_ptr<callback_base> cb,1009 boost::shared_ptr<class_handler_base> chb, boost::shared_ptr<callback_base> cb, 1009 1010 policies const &p) 1010 1011 { 1011 1012 Tcl_CreateObjCommand(interp_, name.c_str(),
Note: See TracBrowser
for help on using the repository browser.