/** * Registers all functions defined in a given Model. * This basically iterates over all instances of spin:Function and calls * <code>register(function)</code> for each of them. * @param model the Model to add the functions of * @param source an optional source of the Model */ public static void registerFunctions(SpinProcessor model) { foreach (IResource resource in model.GetAllInstances(SPIN.ClassFunction)) { IFunction function = SPINFactory.asFunction(resource); register(function, function.getSource().Graph, true); } }