00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
#ifndef _conv_factor_plugin_h
00029
#define _conv_factor_plugin_h
00030
00031
#include "Plugin.h"
00032
#include "constants.h"
00033
#include "config.h"
00034
#include <iostream>
00035
#include <cassert>
00036
#include <dlfcn.h>
00037
00038
using namespace std;
00039
00040 typedef double (*
value_t)(
int,
int,
int);
00041 typedef int (*
value_array_t)(
double**,
int,
int,
int);
00042
00046 class LoadPlugin :
public Plugin
00047 {
00048
00049
private:
00050 value_t func_value;
00051
00053
LoadPlugin(
const LoadPlugin& x);
00054
00055
public:
00056
LoadPlugin(
const string=NULL);
00057
virtual ~LoadPlugin();
00058
00059
virtual void load(
const string) throw (
FileNotFound,
LibHandleError);
00060
00061
00062
00063
double getValueAt(
int,
int,
int=NO_TIME);
00064
00065
00066
load_exec_function getValueFunction();
00067 };
00068
00069 class
GreenPlugin : public
Plugin
00070 {
00071
00072
private:
00073 value_array_t func_value_array;
00074
00076
GreenPlugin(
const GreenPlugin& x);
00077
00078
public:
00079
GreenPlugin(
const string=NULL);
00080
virtual ~
GreenPlugin();
00081
00082
virtual void load(
const string) throw (FileNotFound, LibHandleError);
00083
00084
00085
00086
int getValueArrayAt(
double**,
int,
int,
int=NO_TIME);
00087
00088
00089
green_exec_function getArrayFunction();
00090 };
00091
00092 #endif