def decorator(cls): self._cls[name] = cls self._doc[name] = doc class LegacySolver(LegacySolverInterface, cls): pass LegacySolverFactory.register(name, doc)(LegacySolver) return cls
def load(): DownloadFactory.register('gjh')(get_gjh) SolverFactory.register('contrib.gjh', doc='Interface to the AMPL GJH "solver"')(GJHSolver)