Skip to content
Snippets Groups Projects
Select Git revision
  • 8a6d1c946ad60f49a184e496608004e21b250386
  • master default protected
  • develop protected
  • conda
  • 3.6.0
  • 3.5.0
  • 3.4.2
  • 3.4.1
  • 3.4.0
  • 3.4.0-rc2
  • 3.4.0-rc
  • 3.3.1
  • 3.3.1-rc
  • 3.3.0
  • 3.3.0-rc2
  • 3.3.0-rc
  • 3.2.1
  • 3.2.1-rc
  • 3.2.0
  • 3.2.0-rc
  • 3.1.1
  • 3.1.1-rc2
  • 3.1.1-rc
  • 3.1.0
24 results

export_extension_scheme.cc

Blame
  • export_extension_scheme.cc 1.29 KiB
    // Copyright (c) 2013-2018, SIB - Swiss Institute of Bioinformatics and 
    //                          Biozentrum - University of Basel
    // 
    // Licensed under the Apache License, Version 2.0 (the "License");
    // you may not use this file except in compliance with the License.
    // You may obtain a copy of the License at
    // 
    //   http://www.apache.org/licenses/LICENSE-2.0
    // 
    // Unless required by applicable law or agreed to in writing, software
    // distributed under the License is distributed on an "AS IS" BASIS,
    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    // See the License for the specific language governing permissions and
    // limitations under the License.
    
    
    #include <boost/python.hpp>
    #include <boost/python/suite/indexing/vector_indexing_suite.hpp>
    #include <promod3/modelling/extension_scheme.hh>
    
    using namespace boost::python;
    using namespace promod3::modelling;
    
    namespace{
      boost::python::tuple WrapShiftExtend(ShiftExtension& ext){
        std::pair<int,int> e = ext.Extend();
        boost::python::tuple tuple_e = boost::python::make_tuple(e.first,
                                                                 e.second);
        return tuple_e;
      }
    }
    
    
    void export_extension_scheme()
    {
      class_<ShiftExtension>("ShiftExtension", init<int,int>())
        .def("Extend", &WrapShiftExtend)
      ;
    }