1 | /* |
---|
2 | * ---------------------------------------------------------------------- |
---|
3 | * rp_optimizer_plugin |
---|
4 | * |
---|
5 | * This file defines the API for various optimization packages to |
---|
6 | * plug into the Rappture Optimization module. Each plug-in defines |
---|
7 | * the following: |
---|
8 | * |
---|
9 | * initialization procedure ... malloc's a ball of data |
---|
10 | * cleanup procedure .......... frees the ball of data |
---|
11 | * configuration options ...... says how to configure the data |
---|
12 | * |
---|
13 | * ====================================================================== |
---|
14 | * AUTHOR: Michael McLennan, Purdue University |
---|
15 | * Copyright (c) 2008 Purdue Research Foundation |
---|
16 | * |
---|
17 | * See the file "license.terms" for information on usage and |
---|
18 | * redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
---|
19 | * ====================================================================== |
---|
20 | */ |
---|
21 | #ifndef RP_OPTIMIZER_PLUGIN |
---|
22 | #define RP_OPTIMIZER_PLUGIN |
---|
23 | |
---|
24 | #include "rp_optimizer.h" |
---|
25 | #include "rp_tcloptions.h" |
---|
26 | |
---|
27 | /* |
---|
28 | * Each optimization package is plugged in to this infrastructure |
---|
29 | * by defining the following data at the top of rp_optimizer_tcl.c |
---|
30 | */ |
---|
31 | typedef struct RpOptimPlugin { |
---|
32 | char *name; /* name of this package for -using */ |
---|
33 | RpOptimInit *initProc; /* initialization routine */ |
---|
34 | RpOptimHandler *runProc; /* handles the core optimization */ |
---|
35 | RpOptimCleanup *cleanupProc; /* cleanup routine */ |
---|
36 | RpTclOption *optionSpec; /* specs for config options */ |
---|
37 | } RpOptimPlugin; |
---|
38 | |
---|
39 | #endif |
---|