// Copyright (C) by Josh Blum. See LICENSE.txt for licensing information. %include %module (package="gras") GRAS_Factory %{ #include %} namespace gras { %ignore Factory::register_make; %ignore Factory::make; } %newobject gras::Factory::_handle_make; //////////////////////////////////////////////////////////////////////// // Export swig element comprehension //////////////////////////////////////////////////////////////////////// %include %import %import %include %include //////////////////////////////////////////////////////////////////////// // Create python make method for the factory //////////////////////////////////////////////////////////////////////// %extend gras::Factory { %insert("python") %{ @staticmethod def make(name, *args): from PMC import PMC_M pmcargs = PMC_M(list(args)) return Factory._handle_make(name, pmcargs) %} }