Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (8 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/external/cpptcl/cpptcl.h

    r5781 r11071  
    1717#include <map>
    1818#include <vector>
    19 #include <boost/shared_ptr.hpp>
    20 #include <boost/bind.hpp>
    21 
     19#include <memory>
     20#include <functional>
    2221
    2322namespace Tcl
    2423{
     24namespace arg = std::placeholders;
    2525
    2626// exception class used for reporting all Tcl errors
     
    141141
    142142     void register_method(std::string const &name,
    143           boost::shared_ptr<object_cmd_base> ocb, policies const &p);
     143          std::shared_ptr<object_cmd_base> ocb, policies const &p);
    144144
    145145     policies & get_policies(std::string const &name);
     
    148148     typedef std::map<
    149149          std::string,
    150           boost::shared_ptr<object_cmd_base>
     150          std::shared_ptr<object_cmd_base>
    151151          > method_map_type;
    152152
     
    214214{
    215215public:
    216      class_definer(boost::shared_ptr<class_handler<C> > ch) : ch_(ch) {}
     216     class_definer(std::shared_ptr<class_handler<C> > ch) : ch_(ch) {}
    217217
    218218     template <typename R>
     
    221221     {
    222222          ch_->register_method(name,
    223                boost::shared_ptr<details::object_cmd_base>(
     223               std::shared_ptr<details::object_cmd_base>(
    224224                    new details::method0<C, R>(f)), p);
    225225          return *this;
     
    231231     {
    232232          ch_->register_method(name,
    233                boost::shared_ptr<details::object_cmd_base>(
     233               std::shared_ptr<details::object_cmd_base>(
    234234                    new details::method0<C, R>(f)), p);
    235235          return *this;
     
    241241     {
    242242          ch_->register_method(name,
    243                boost::shared_ptr<details::object_cmd_base>(
     243               std::shared_ptr<details::object_cmd_base>(
    244244                    new details::method1<C, R, T1>(f)), p);
    245245          return *this;
     
    251251     {
    252252          ch_->register_method(name,
    253                boost::shared_ptr<details::object_cmd_base>(
     253               std::shared_ptr<details::object_cmd_base>(
    254254                    new details::method1<C, R, T1>(f)), p);
    255255          return *this;
     
    261261     {
    262262          ch_->register_method(name,
    263                boost::shared_ptr<details::object_cmd_base>(
     263               std::shared_ptr<details::object_cmd_base>(
    264264                    new details::method2<C, R, T1, T2>(f)), p);
    265265          return *this;
     
    271271     {
    272272          ch_->register_method(name,
    273                boost::shared_ptr<details::object_cmd_base>(
     273               std::shared_ptr<details::object_cmd_base>(
    274274                    new details::method2<C, R, T1, T2>(f)), p);
    275275          return *this;
     
    281281     {
    282282          ch_->register_method(name,
    283                boost::shared_ptr<details::object_cmd_base>(
     283               std::shared_ptr<details::object_cmd_base>(
    284284                    new details::method3<C, R, T1, T2, T3>(f)), p);
    285285          return *this;
     
    291291     {
    292292          ch_->register_method(name,
    293                boost::shared_ptr<details::object_cmd_base>(
     293               std::shared_ptr<details::object_cmd_base>(
    294294                    new details::method3<C, R, T1, T2, T3>(f)), p);
    295295          return *this;
     
    301301     {
    302302          ch_->register_method(name,
    303                boost::shared_ptr<details::object_cmd_base>(
     303               std::shared_ptr<details::object_cmd_base>(
    304304                    new details::method4<C, R, T1, T2, T3, T4>(f)), p);
    305305          return *this;
     
    312312     {
    313313          ch_->register_method(name,
    314                boost::shared_ptr<details::object_cmd_base>(
     314               std::shared_ptr<details::object_cmd_base>(
    315315                    new details::method4<C, R, T1, T2, T3, T4>(f)), p);
    316316          return *this;
     
    323323     {
    324324          ch_->register_method(name,
    325                boost::shared_ptr<details::object_cmd_base>(
     325               std::shared_ptr<details::object_cmd_base>(
    326326                    new details::method5<C, R, T1, T2, T3, T4, T5>(f)), p);
    327327          return *this;
     
    334334     {
    335335          ch_->register_method(name,
    336                boost::shared_ptr<details::object_cmd_base>(
     336               std::shared_ptr<details::object_cmd_base>(
    337337                    new details::method5<C, R, T1, T2, T3, T4, T5>(f)), p);
    338338          return *this;
     
    345345     {
    346346          ch_->register_method(name,
    347                boost::shared_ptr<details::object_cmd_base>(
     347               std::shared_ptr<details::object_cmd_base>(
    348348                    new details::method6<C, R, T1, T2, T3, T4, T5, T6>(f)),
    349349               p);
     
    358358     {
    359359          ch_->register_method(name,
    360                boost::shared_ptr<details::object_cmd_base>(
     360               std::shared_ptr<details::object_cmd_base>(
    361361                    new details::method6<C, R, T1, T2, T3, T4, T5, T6>(f)),
    362362               p);
     
    371371     {
    372372          ch_->register_method(name,
    373                boost::shared_ptr<details::object_cmd_base>(
     373               std::shared_ptr<details::object_cmd_base>(
    374374                    new details::method7<C, R,
    375375                    T1, T2, T3, T4, T5, T6, T7>(f)), p);
     
    384384     {
    385385          ch_->register_method(name,
    386                boost::shared_ptr<details::object_cmd_base>(
     386               std::shared_ptr<details::object_cmd_base>(
    387387                    new details::method7<C, R,
    388388                    T1, T2, T3, T4, T5, T6, T7>(f)), p);
     
    397397     {
    398398          ch_->register_method(name,
    399                boost::shared_ptr<details::object_cmd_base>(
     399               std::shared_ptr<details::object_cmd_base>(
    400400                    new details::method8<C, R,
    401401                    T1, T2, T3, T4, T5, T6, T7, T8>(f)), p);
     
    410410     {
    411411          ch_->register_method(name,
    412                boost::shared_ptr<details::object_cmd_base>(
     412               std::shared_ptr<details::object_cmd_base>(
    413413                    new details::method8<C, R,
    414414                    T1, T2, T3, T4, T5, T6, T7, T8>(f)), p);
     
    423423     {
    424424          ch_->register_method(name,
    425                boost::shared_ptr<details::object_cmd_base>(
     425               std::shared_ptr<details::object_cmd_base>(
    426426                    new details::method9<C, R,
    427427                    T1, T2, T3, T4, T5, T6, T7, T8, T9>(f)), p);
     
    436436     {
    437437          ch_->register_method(name,
    438                boost::shared_ptr<details::object_cmd_base>(
     438               std::shared_ptr<details::object_cmd_base>(
    439439                    new details::method9<C, R,
    440440                    T1, T2, T3, T4, T5, T6, T7, T8, T9>(f)), p);
     
    443443
    444444private:
    445      boost::shared_ptr<class_handler<C> > ch_;
     445     std::shared_ptr<class_handler<C> > ch_;
    446446};
    447447
     
    482482     {
    483483          add_function(name,
    484                boost::shared_ptr<details::callback_base>(
     484               std::shared_ptr<details::callback_base>(
    485485                    new details::callback0<R>(f)), p);
    486486     }
     
    491491     {
    492492          add_function(name,
    493                boost::shared_ptr<details::callback_base>(
     493               std::shared_ptr<details::callback_base>(
    494494                    new details::callback1<R, T1>(f)), p);
    495495     }
     
    500500     {
    501501          add_function(name,
    502                boost::shared_ptr<details::callback_base>(
     502               std::shared_ptr<details::callback_base>(
    503503                    new details::callback2<R, T1, T2>(f)), p);
    504504     }
     
    509509     {
    510510          add_function(name,
    511                boost::shared_ptr<details::callback_base>(
     511               std::shared_ptr<details::callback_base>(
    512512                    new details::callback3<R, T1, T2, T3>(f)), p);
    513513     }
     
    518518     {
    519519          add_function(name,
    520                boost::shared_ptr<details::callback_base>(
     520               std::shared_ptr<details::callback_base>(
    521521                    new details::callback4<R, T1, T2, T3, T4>(f)), p);
    522522     }
     
    528528     {
    529529          add_function(name,
    530                boost::shared_ptr<details::callback_base>(
     530               std::shared_ptr<details::callback_base>(
    531531                    new details::callback5<R, T1, T2, T3, T4, T5>(f)), p);
    532532     }
     
    538538     {
    539539          add_function(name,
    540                boost::shared_ptr<details::callback_base>(
     540               std::shared_ptr<details::callback_base>(
    541541                    new details::callback6<R, T1, T2, T3, T4, T5, T6>(f)), p);
    542542     }
     
    548548     {
    549549          add_function(name,
    550                boost::shared_ptr<details::callback_base>(
     550               std::shared_ptr<details::callback_base>(
    551551                    new details::callback7<R,
    552552                    T1, T2, T3, T4, T5, T6, T7>(f)), p);
     
    559559     {
    560560          add_function(name,
    561                boost::shared_ptr<details::callback_base>(
     561               std::shared_ptr<details::callback_base>(
    562562                    new details::callback8<R,
    563563                    T1, T2, T3, T4, T5, T6, T7, T8>(f)), p);
     
    572572     {
    573573          add_function(name,
    574                boost::shared_ptr<details::callback_base>(
     574               std::shared_ptr<details::callback_base>(
    575575                    new details::callback9<R,
    576576                    T1, T2, T3, T4, T5, T6, T7, T8, T9>(f)), p);
     
    583583     details::class_definer<C> class_(std::string const &name)
    584584     {
    585           boost::shared_ptr<details::class_handler<C> > ch(
     585          std::shared_ptr<details::class_handler<C> > ch(
    586586               new details::class_handler<C>());
    587587
     
    589589
    590590          add_constructor(name, ch,
    591                boost::shared_ptr<details::callback_base>(
     591               std::shared_ptr<details::callback_base>(
    592592                    new details::callback0<C*>(&details::construct<
    593593                         C, void, void, void, void, void, void, void,
     
    608608               callback_type;
    609609
    610           boost::shared_ptr<details::class_handler<C> > ch(
     610          std::shared_ptr<details::class_handler<C> > ch(
    611611               new details::class_handler<C>());
    612612
     
    614614
    615615          add_constructor(name, ch,
    616                boost::shared_ptr<details::callback_base>(
     616               std::shared_ptr<details::callback_base>(
    617617                    new callback_type(&details::construct<
    618618                         C, T1, T2, T3, T4, T5, T6, T7, T8, T9>::doit)), p);
     
    625625          std::string const &name, details::no_init_type const &)
    626626     {
    627           boost::shared_ptr<details::class_handler<C> > ch(
     627          std::shared_ptr<details::class_handler<C> > ch(
    628628               new details::class_handler<C>());
    629629
     
    660660
    661661     void add_function(std::string const &name,
    662           boost::shared_ptr<details::callback_base> cb,
     662          std::shared_ptr<details::callback_base> cb,
    663663          policies const &p = policies());
    664664
    665665     void add_class(std::string const &name,
    666           boost::shared_ptr<details::class_handler_base> chb);
     666          std::shared_ptr<details::class_handler_base> chb);
    667667
    668668     void add_constructor(std::string const &name,
    669           boost::shared_ptr<details::class_handler_base> chb,
    670           boost::shared_ptr<details::callback_base> cb,
     669          std::shared_ptr<details::class_handler_base> chb,
     670          std::shared_ptr<details::callback_base> cb,
    671671          policies const &p = policies());
    672672
Note: See TracChangeset for help on using the changeset viewer.