Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/kicklib2/src/external/cpptcl/changes_orxonox.diff @ 8529

Last change on this file since 8529 was 8298, checked in by rgrieder, 14 years ago

Fixed build for MSVC 10: disabling the C++0x features seems a bad idea because some boost code relies on it for the new Visual Studio version.
Leaving it enabled breaks cpptcl though —> fixed.

  • Property svn:eol-style set to native
File size: 2.8 KB
  • cpptcl.cc

     
    1616using namespace Tcl;
    1717using namespace Tcl::details;
    1818using namespace std;
    19 using namespace boost;
     19// boost::shared_ptr conflicts with the new std::shared_ptr
     20//using namespace boost;
    2021
    2122
    2223result::result(Tcl_Interp *interp) : interp_(interp) {}
     
    166167{
    167168
    168169// map of polymorphic callbacks
    169 typedef map<string, shared_ptr<callback_base> > callback_interp_map;
     170typedef map<string, boost::shared_ptr<callback_base> > callback_interp_map;
    170171typedef map<Tcl_Interp *, callback_interp_map> callback_map;
    171172
    172173callback_map callbacks;
     
    179180policies_map call_policies;
    180181
    181182// map of object handlers
    182 typedef map<string, shared_ptr<class_handler_base> > class_interp_map;
     183typedef map<string, boost::shared_ptr<class_handler_base> > class_interp_map;
    183184typedef map<Tcl_Interp *, class_interp_map> class_handlers_map;
    184185
    185186class_handlers_map class_handlers;
     
    320321
    321322          post_process_policies(interp, pol, objv, false);
    322323     }
    323      catch (exception const &e)
     324     catch (std::exception const &e)
    324325     {
    325326          Tcl_SetResult(interp, const_cast<char*>(e.what()), TCL_VOLATILE);
    326327          return TCL_ERROR;
     
    363364
    364365          post_process_policies(interp, pol, objv, true);
    365366     }
    366      catch (exception const &e)
     367     catch (std::exception const &e)
    367368     {
    368369          Tcl_SetResult(interp, const_cast<char*>(e.what()), TCL_VOLATILE);
    369370          return TCL_ERROR;
     
    430431               Tcl_GetString(Tcl_GetObjResult(interp)),
    431432               object_handler, static_cast<ClientData>(chb), 0);
    432433     }
    433      catch (exception const &e)
     434     catch (std::exception const &e)
    434435     {
    435436          Tcl_SetResult(interp, const_cast<char*>(e.what()), TCL_VOLATILE);
    436437          return TCL_ERROR;
     
    490491}
    491492
    492493void 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)
    494495{
    495496     methods_[name] = ocb;
    496497     policies_[name] = p;
     
    989990}
    990991
    991992void 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)
    993994{
    994995     Tcl_CreateObjCommand(interp_, name.c_str(),
    995996          callback_handler, 0, 0);
     
    9991000}
    10001001
    10011002void interpreter::add_class(string const &name,
    1002      shared_ptr<class_handler_base> chb)
     1003     boost::shared_ptr<class_handler_base> chb)
    10031004{
    10041005     class_handlers[interp_][name] = chb;
    10051006}
    10061007
    10071008void 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,
    10091010     policies const &p)
    10101011{
    10111012     Tcl_CreateObjCommand(interp_, name.c_str(),
Note: See TracBrowser for help on using the repository browser.